Annotation Type Record
-
@Target(METHOD) @Retention(RUNTIME) public @interface Record
Indicates that thisBuildStepmethod will also output recorded bytecode. If this annotation is present at least one method parameter must be a recorder object (i.e. a runtime object annotated with@Recorder). Any invocations made against this object will be recorded, and written out to bytecode to be invoked at runtime. Thevalue()element determines when the generated bytecode is executed. If this isExecutionTime.STATIC_INITthen it will be executed from a static init method, so will run at native image generation time. If this isExecutionTime.RUNTIME_INITthen it will run from a main method at application start. There are some limitations on what can be recorded. Only the following objects are allowed as parameters to recording proxies:- primitives - String - Class - Objects returned from a previous recorder invocation - Objects with a no-arg constructor and getter/setters for all properties (or public fields) - Objects with a constructor annotated with @RecordableConstructor with parameter names that match field names - Any arbitrary object via the
RecorderContext.registerSubstitution(Class, Class, Class)mechanism - arrays, lists and maps of the above
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description ExecutionTimevalueThe time to execute the recorded bytecode
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description booleanoptionalIf this is true then the bytecode produced by this method will be considered to be optional, and will only be created if this build step also produces anotherBuildItemthat is consumed by the build.
-
-
-
Element Detail
-
value
ExecutionTime value
The time to execute the recorded bytecode
-
-
-
optional
boolean optional
If this is true then the bytecode produced by this method will be considered to be optional, and will only be created if this build step also produces anotherBuildItemthat is consumed by the build. If a method is optional it must be capable of producing at least one other item- Default:
- false
-
-