@Target(value=METHOD) @Retention(value=RUNTIME) public @interface Record
BuildStep method 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.
The value() element determines when the generated bytecode is executed. If this
is ExecutionTime.STATIC_INIT then it will be executed from a static init method,
so will run at native image generation time.
If this is ExecutionTime.RUNTIME_INIT then it will run from a main method at application
start.| Modifier and Type | Required Element and Description |
|---|---|
ExecutionTime |
value
The time to execute the recorded bytecode
|
| Modifier and Type | Optional Element and Description |
|---|---|
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 another
BuildItem
that is consumed by the build. |
public abstract ExecutionTime value
public abstract boolean optional
BuildItem
that is consumed by the build.
If a method is optional it must be capable of producing at least one other itemCopyright © 2020 JBoss by Red Hat. All rights reserved.