Package net.bytebuddy.asm
Annotation Type MemberSubstitution.DynamicConstant
- Enclosing class:
MemberSubstitution
@Documented
@Retention(RUNTIME)
@Target(PARAMETER)
public static @interface MemberSubstitution.DynamicConstant
Indicates that the annotated parameter should load a dynamic constant using the specificied bootstrap method. The constant can be bound using constantdynamic or invokedynamic.
Important: Don't confuse this annotation with Advice.DynamicConstant
or
DynamicConstant
. This annotation should be used only in
combination with MemberSubstitution.Substitution.Chain.Step.ForDelegation
.
- See Also:
-
Required Element Summary
Required Elements -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionClass
<?> Returns the owner type of the bootstrap method handle, orvoid
, to represent the instrumented type.boolean
Returnstrue
if invokedynamic should be used to bind the annotated parameter.Returns the name of the dynamic constant that is supplied to the bootstrap method.
-
Element Details
-
name
String nameReturns the name of the dynamic constant that is supplied to the bootstrap method.- Returns:
- The name of the dynamic constant that is supplied to the bootstrap method.
- Default:
"_"
-
bootstrapType
JavaConstant.MethodHandle.HandleType bootstrapTypeReturns the type of the bootstrap method handle to resolve.- Returns:
- The type of the bootstrap method handle to resolve.
-
bootstrapOwner
Class<?> bootstrapOwnerReturns the owner type of the bootstrap method handle, orvoid
, to represent the instrumented type.- Returns:
- The owner type of the bootstrap method handle, or
void
, to represent the instrumented type.
- Default:
void.class
-
bootstrapName
String bootstrapNameReturns the name of the bootstrap method handle.- Returns:
- The name of the bootstrap method handle.
-
bootstrapReturnType
Class<?> bootstrapReturnTypeReturns the return type of the bootstrap method handle.- Returns:
- The return type of the bootstrap method handle.
-
bootstrapParameterTypes
Class<?>[] bootstrapParameterTypesReturns the parameter types of the bootstrap method handle.- Returns:
- The parameter types of the bootstrap method handle.
-
invokedynamic
boolean invokedynamicReturnstrue
if invokedynamic should be used to bind the annotated parameter.- Returns:
true
if invokedynamic should be used to bind the annotated parameter.
- Default:
false
-