Annotation Interface PostProcess


@Target({FIELD,METHOD,RECORD_COMPONENT}) @Retention(RUNTIME) public @interface PostProcess
Indicates that the annotated element should be post-processed. This annotation can be applied to configuration elements and methods.

Applying this annotation to configuration elements allows filtering these elements easily via ConfigurationElementFilter.byPostProcessKey. There mere presence of this annotation on a configuration element, however, does not cause any post-processing to be triggered automatically.

Applying this annotation to some (non-static/abstract) method of a configuration type, results in that method being called after a configuration instance of that type has been initialized. If the return type of the annotated method is 'void', then the method is simply called. If the return type equals the configuration type, the instance is replaced by the return value of that method call.

See Also:
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Returns some key that can be used for filtering configuration elements.
  • Element Details

    • key

      String key
      Returns some key that can be used for filtering configuration elements.

      Specifying a key if this annotation is used on a method currently has no effect but may be changed in the future.

      Returns:
      some arbitrary (developer-chosen) value
      Default:
      ""