@Documented @Retention(value=RUNTIME) @Target(value=PARAMETER) public static @interface Advice.DynamicConstant
Indicates that the annotated parameter should resolve a dynamic constant, using either constantdynamic or invokedynamic which is then bound to the parameter as a value.
Important: Don't confuse this annotation with MemberSubstitution.DynamicConstant
or DynamicConstant
. This annotation should be used only
in combination with Advice
.
Advice
,
Advice.OnMethodEnter
,
Advice.OnMethodExit
Modifier and Type | Required Element and Description |
---|---|
String |
bootstrapName
Returns the name of the bootstrap method handle.
|
Class<?>[] |
bootstrapParameterTypes
Returns the parameter types of the bootstrap method handle.
|
Class<?> |
bootstrapReturnType
Returns the return type of the bootstrap method handle.
|
JavaConstant.MethodHandle.HandleType |
bootstrapType
Returns the type of the bootstrap method handle to resolve.
|
Modifier and Type | Optional Element and Description |
---|---|
Class<?> |
bootstrapOwner
Returns the owner type of the bootstrap method handle, or
void , to represent the instrumented type. |
boolean |
invokedynamic
Returns
true if invokedynamic should be used to bind the annotated parameter. |
String |
name
Returns the name of the dynamic constant that is supplied to the bootstrap method.
|
public abstract JavaConstant.MethodHandle.HandleType bootstrapType
public abstract String bootstrapName
public abstract Class<?> bootstrapReturnType
public abstract Class<?>[] bootstrapParameterTypes
public abstract String name
public abstract Class<?> bootstrapOwner
void
, to represent the instrumented type.void
, to represent the instrumented type.Copyright © 2014–2025. All rights reserved.