Package net.bytebuddy.asm
Class MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForDynamicConstant
java.lang.Object
net.bytebuddy.asm.MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForDynamicConstant
- All Implemented Interfaces:
MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping
- Enclosing interface:
MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping
@Enhance
public static class MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForDynamicConstant
extends Object
implements MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping
An offset mapping for a dynamic constant.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static enum
A factory to create an offset mapping for a dynamic constant.Nested classes/interfaces inherited from interface net.bytebuddy.asm.MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping
MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForAllArguments, MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForArgument, MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForCurrent, MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForDynamicConstant, MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForField, MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForFieldHandle, MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForHandle, MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForOrigin, MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForSelfCallHandle, MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForStackManipulation, MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForStubValue, MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForThisReference, MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Resolved
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List
<JavaConstant> The constant arguments to the bootstrap method.private final String
The name of the bootstrap method.private final TypeDescription
The type that declares the bootstrap method, orvoid
if the instrumented type.private final List
<? extends TypeDescription> The parameter types of the boostrap method.private final TypeDescription
The return type of the boostrap method.private final JavaConstant.MethodHandle.HandleType
The type of the bootstrap method.private final boolean
true
if invokedynamic should be used to bind the constant.private final String
The name of the dynamic constant.private final TypeDescription
The type of the dynamic constant. -
Constructor Summary
ConstructorsConstructorDescriptionForDynamicConstant
(String name, TypeDescription typeDescription, JavaConstant.MethodHandle.HandleType bootstrapType, TypeDescription bootstrapOwner, String bootstrapName, TypeDescription bootstrapReturnType, List<? extends TypeDescription> bootstrapParameterTypes, List<JavaConstant> arguments, boolean invokedynamic) Creates an offset mapping for a dynamic constant. -
Method Summary
Modifier and TypeMethodDescriptionresolve
(Assigner assigner, Assigner.Typing typing, TypeDescription instrumentedType, MethodDescription instrumentedMethod) Resolves an offset mapping for a given instrumented method.
-
Field Details
-
name
The name of the dynamic constant. -
typeDescription
The type of the dynamic constant. -
bootstrapType
The type of the bootstrap method. -
bootstrapOwner
The type that declares the bootstrap method, orvoid
if the instrumented type. -
bootstrapName
The name of the bootstrap method. -
bootstrapReturnType
The return type of the boostrap method. -
bootstrapParameterTypes
The parameter types of the boostrap method. -
arguments
The constant arguments to the bootstrap method. -
invokedynamic
private final boolean invokedynamictrue
if invokedynamic should be used to bind the constant.
-
-
Constructor Details
-
ForDynamicConstant
public ForDynamicConstant(String name, TypeDescription typeDescription, JavaConstant.MethodHandle.HandleType bootstrapType, TypeDescription bootstrapOwner, String bootstrapName, TypeDescription bootstrapReturnType, List<? extends TypeDescription> bootstrapParameterTypes, List<JavaConstant> arguments, boolean invokedynamic) Creates an offset mapping for a dynamic constant.- Parameters:
name
- The name of the dynamic constant.typeDescription
- The type of the dynamic constant.bootstrapType
- The type of the bootstrap method.bootstrapOwner
- The type that declares the bootstrap method, orvoid
if the instrumented type.bootstrapName
- The name of the bootstrap method.bootstrapReturnType
- The return type of the boostrap method.bootstrapParameterTypes
- The parameter types of the boostrap method.arguments
- The constant arguments to the bootstrap method.invokedynamic
-true
if invokedynamic should be used to bind the constant.
-
-
Method Details
-
resolve
public MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Resolved resolve(Assigner assigner, Assigner.Typing typing, TypeDescription instrumentedType, MethodDescription instrumentedMethod) Resolves an offset mapping for a given instrumented method.- Specified by:
resolve
in interfaceMemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping
- Parameters:
assigner
- The assigner to use.typing
- The typing to use if no explicit typing is specified.instrumentedType
- The instrumented type.instrumentedMethod
- The instrumented method.- Returns:
- A resolved version of this offset mapping.
-