Package net.bytebuddy.asm
Enum MemberSubstitution.Replacement.InvocationType
- java.lang.Object
-
- java.lang.Enum<MemberSubstitution.Replacement.InvocationType>
-
- net.bytebuddy.asm.MemberSubstitution.Replacement.InvocationType
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<MemberSubstitution.Replacement.InvocationType>
- Enclosing interface:
- MemberSubstitution.Replacement
public static enum MemberSubstitution.Replacement.InvocationType extends java.lang.Enum<MemberSubstitution.Replacement.InvocationType>
Describes a method invocation type.
-
-
Constructor Summary
Constructors Modifier Constructor Description private
InvocationType()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
matches(boolean includeVirtualCalls, boolean includeSuperCalls)
Checks if this invokation type matches the specified inputs.protected static MemberSubstitution.Replacement.InvocationType
of(int opcode, MethodDescription methodDescription)
Resolves an invocation type.static MemberSubstitution.Replacement.InvocationType
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static MemberSubstitution.Replacement.InvocationType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
VIRTUAL
public static final MemberSubstitution.Replacement.InvocationType VIRTUAL
Desribes a virtual method invocation.
-
SUPER
public static final MemberSubstitution.Replacement.InvocationType SUPER
Describes a super method invocation.
-
OTHER
public static final MemberSubstitution.Replacement.InvocationType OTHER
Describes any method invocation that is not virtual or a super method invocation.
-
-
Method Detail
-
values
public static MemberSubstitution.Replacement.InvocationType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (MemberSubstitution.Replacement.InvocationType c : MemberSubstitution.Replacement.InvocationType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MemberSubstitution.Replacement.InvocationType valueOf(java.lang.String name)
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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
of
protected static MemberSubstitution.Replacement.InvocationType of(int opcode, MethodDescription methodDescription)
Resolves an invocation type.- Parameters:
opcode
- The opcode that is used for invoking the method.methodDescription
- The method that is being invoked.- Returns:
- The invokation type for the method given that opcode.
-
matches
protected boolean matches(boolean includeVirtualCalls, boolean includeSuperCalls)
Checks if this invokation type matches the specified inputs.- Parameters:
includeVirtualCalls
-true
if a virtual method should be matched.includeSuperCalls
-true
if a super method call should be matched.- Returns:
true
if this invocation type matches the specified parameters.
-
-