Package net.bytebuddy.asm
Enum MemberSubstitution.Replacement.NoOp
java.lang.Object
java.lang.Enum<MemberSubstitution.Replacement.NoOp>
net.bytebuddy.asm.MemberSubstitution.Replacement.NoOp
- All Implemented Interfaces:
Serializable
,Comparable<MemberSubstitution.Replacement.NoOp>
,java.lang.constant.Constable
,MemberSubstitution.Replacement
,MemberSubstitution.Replacement.Factory
- Enclosing interface:
MemberSubstitution.Replacement
public static enum MemberSubstitution.Replacement.NoOp
extends Enum<MemberSubstitution.Replacement.NoOp>
implements MemberSubstitution.Replacement, MemberSubstitution.Replacement.Factory
A non-operational replacement.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
Nested classes/interfaces inherited from interface net.bytebuddy.asm.MemberSubstitution.Replacement
MemberSubstitution.Replacement.Binding, MemberSubstitution.Replacement.Factory, MemberSubstitution.Replacement.ForDynamicInvocation, MemberSubstitution.Replacement.ForElementMatchers, MemberSubstitution.Replacement.ForFirstBinding, MemberSubstitution.Replacement.InvocationType, MemberSubstitution.Replacement.NoOp
Nested classes/interfaces inherited from interface net.bytebuddy.asm.MemberSubstitution.Replacement.Factory
MemberSubstitution.Replacement.Factory.Compound
-
Enum Constant Summary
Enum Constants -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbind
(TypeDescription instrumentedType, MethodDescription instrumentedMethod, TypeDescription typeDescription, FieldDescription fieldDescription, boolean writeAccess) Binds this replacement for a field that was discovered.bind
(TypeDescription instrumentedType, MethodDescription instrumentedMethod, TypeDescription typeDescription, MethodDescription methodDescription, MemberSubstitution.Replacement.InvocationType invocationType) Binds this replacement for a field that was discovered.bind
(TypeDescription instrumentedType, MethodDescription instrumentedMethod, JavaConstant.MethodHandle methodHandle, JavaConstant.MethodType methodType, String name, List<JavaConstant> constants) Binds this replacement for a dynamic method invocation that was discovered.make
(TypeDescription instrumentedType, MethodDescription instrumentedMethod, TypePool typePool) Creates a replacement for an instrumented method.Returns the enum constant of this type with the specified name.static MemberSubstitution.Replacement.NoOp[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
INSTANCE
The singleton instance.
-
-
Constructor Details
-
NoOp
private NoOp()
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
make
public MemberSubstitution.Replacement make(TypeDescription instrumentedType, MethodDescription instrumentedMethod, TypePool typePool) Creates a replacement for an instrumented method.- Specified by:
make
in interfaceMemberSubstitution.Replacement.Factory
- Parameters:
instrumentedType
- The instrumented type.instrumentedMethod
- The instrumented method.typePool
- The type pool being used within the member substitution being applied.- Returns:
- A replacement to use within the supplied instrumented method.
-
bind
public MemberSubstitution.Replacement.Binding bind(TypeDescription instrumentedType, MethodDescription instrumentedMethod, TypeDescription typeDescription, FieldDescription fieldDescription, boolean writeAccess) Binds this replacement for a field that was discovered.- Specified by:
bind
in interfaceMemberSubstitution.Replacement
- Parameters:
instrumentedType
- The instrumented type.instrumentedMethod
- The instrumented method.typeDescription
- The type on which the field was read.fieldDescription
- The field that was discovered.writeAccess
-true
if this field was written to.- Returns:
- A binding for the discovered field access.
-
bind
public MemberSubstitution.Replacement.Binding bind(TypeDescription instrumentedType, MethodDescription instrumentedMethod, TypeDescription typeDescription, MethodDescription methodDescription, MemberSubstitution.Replacement.InvocationType invocationType) Binds this replacement for a field that was discovered.- Specified by:
bind
in interfaceMemberSubstitution.Replacement
- Parameters:
instrumentedType
- The instrumented type.FieldDescriptioninstrumentedMethod
- The instrumented method.typeDescription
- The type on which the method was invoked.methodDescription
- The method that was discovered.invocationType
- The invocation type for this method.- Returns:
- A binding for the discovered method invocation.
-
bind
public MemberSubstitution.Replacement.Binding bind(TypeDescription instrumentedType, MethodDescription instrumentedMethod, JavaConstant.MethodHandle methodHandle, JavaConstant.MethodType methodType, String name, List<JavaConstant> constants) Binds this replacement for a dynamic method invocation that was discovered.- Specified by:
bind
in interfaceMemberSubstitution.Replacement
- Parameters:
instrumentedType
- The instrumented type.FieldDescriptioninstrumentedMethod
- The instrumented method.methodHandle
- The method handle of the bootstrap method.methodType
- The type of the method that is bound.name
- The name of the method that is bound.constants
- The constant arguments to the bootstrap method.- Returns:
- A binding for the discovered method invocation.
-