Package net.bytebuddy.implementation
Enum MethodCall.ArgumentLoader.ForNullConstant
- java.lang.Object
-
- java.lang.Enum<MethodCall.ArgumentLoader.ForNullConstant>
-
- net.bytebuddy.implementation.MethodCall.ArgumentLoader.ForNullConstant
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<MethodCall.ArgumentLoader.ForNullConstant>
,InstrumentedType.Prepareable
,MethodCall.ArgumentLoader
,MethodCall.ArgumentLoader.ArgumentProvider
,MethodCall.ArgumentLoader.Factory
- Enclosing interface:
- MethodCall.ArgumentLoader
public static enum MethodCall.ArgumentLoader.ForNullConstant extends java.lang.Enum<MethodCall.ArgumentLoader.ForNullConstant> implements MethodCall.ArgumentLoader, MethodCall.ArgumentLoader.ArgumentProvider, MethodCall.ArgumentLoader.Factory
An argument loader that loads thenull
value onto the operand stack.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.MethodCall.ArgumentLoader
MethodCall.ArgumentLoader.ArgumentProvider, MethodCall.ArgumentLoader.Factory, MethodCall.ArgumentLoader.ForField, MethodCall.ArgumentLoader.ForInstance, MethodCall.ArgumentLoader.ForInstrumentedType, MethodCall.ArgumentLoader.ForMethodCall, MethodCall.ArgumentLoader.ForMethodParameter, MethodCall.ArgumentLoader.ForMethodParameterArray, MethodCall.ArgumentLoader.ForMethodParameterArrayElement, MethodCall.ArgumentLoader.ForNullConstant, MethodCall.ArgumentLoader.ForStackManipulation, MethodCall.ArgumentLoader.ForThisReference
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INSTANCE
The singleton instance.
-
Constructor Summary
Constructors Modifier Constructor Description private
ForNullConstant()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MethodCall.ArgumentLoader.ArgumentProvider
make(Implementation.Target implementationTarget)
Creates an argument provider for the supplied implementation target.InstrumentedType
prepare(InstrumentedType instrumentedType)
Prepares a given instrumented type.java.util.List<MethodCall.ArgumentLoader>
resolve(MethodDescription instrumentedMethod, MethodDescription invokedMethod)
Resolves this provider to an argument loader for each provided argument.StackManipulation
toStackManipulation(ParameterDescription target, Assigner assigner, Assigner.Typing typing)
Loads the argument that is represented by this instance onto the operand stack.static MethodCall.ArgumentLoader.ForNullConstant
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static MethodCall.ArgumentLoader.ForNullConstant[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INSTANCE
public static final MethodCall.ArgumentLoader.ForNullConstant INSTANCE
The singleton instance.
-
-
Method Detail
-
values
public static MethodCall.ArgumentLoader.ForNullConstant[] 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 (MethodCall.ArgumentLoader.ForNullConstant c : MethodCall.ArgumentLoader.ForNullConstant.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MethodCall.ArgumentLoader.ForNullConstant 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
-
prepare
public InstrumentedType prepare(InstrumentedType instrumentedType)
Prepares a given instrumented type.- Specified by:
prepare
in interfaceInstrumentedType.Prepareable
- Parameters:
instrumentedType
- The instrumented type in its current form.- Returns:
- The prepared instrumented type.
-
make
public MethodCall.ArgumentLoader.ArgumentProvider make(Implementation.Target implementationTarget)
Creates an argument provider for the supplied implementation target.- Specified by:
make
in interfaceMethodCall.ArgumentLoader.Factory
- Parameters:
implementationTarget
- The implementation target to use.- Returns:
- An appropriate argument provider.
-
resolve
public java.util.List<MethodCall.ArgumentLoader> resolve(MethodDescription instrumentedMethod, MethodDescription invokedMethod)
Resolves this provider to an argument loader for each provided argument.- Specified by:
resolve
in interfaceMethodCall.ArgumentLoader.ArgumentProvider
- Parameters:
instrumentedMethod
- The instrumented method.invokedMethod
- The invoked method.- Returns:
- A list of provided argument loaders.
-
toStackManipulation
public StackManipulation toStackManipulation(ParameterDescription target, Assigner assigner, Assigner.Typing typing)
Loads the argument that is represented by this instance onto the operand stack.- Specified by:
toStackManipulation
in interfaceMethodCall.ArgumentLoader
- Parameters:
target
- The target parameter.assigner
- The assigner to be used.typing
- Indicates if dynamic type castings should be attempted for incompatible assignments.- Returns:
- The stack manipulation that loads the represented argument onto the stack.
-
-