public enum MethodVariableAccess extends Enum<MethodVariableAccess>
Modifier and Type | Class and Description |
---|---|
static class |
MethodVariableAccess.MethodLoading
A stack manipulation that loads all parameters of a given method onto the operand stack.
|
protected static class |
MethodVariableAccess.OffsetIncrementing
A stack manipulation that increments an integer variable.
|
protected class |
MethodVariableAccess.OffsetLoading
A stack manipulation for loading a variable of a method's local variable array onto the operand stack.
|
protected class |
MethodVariableAccess.OffsetWriting
A stack manipulation for storing a variable into a method's local variable array.
|
Enum Constant and Description |
---|
DOUBLE
The accessor handler for a
double . |
FLOAT
The accessor handler for a
float . |
INTEGER
The accessor handler for a JVM-integer.
|
LONG
The accessor handler for a
long . |
REFERENCE
The accessor handler for a reference type.
|
Modifier and Type | Method and Description |
---|---|
static MethodVariableAccess.MethodLoading |
allArgumentsOf(MethodDescription methodDescription)
Loads all arguments of the provided method onto the operand stack.
|
StackManipulation |
increment(int offset,
int value)
Creates a stack assignment for incrementing the given offset of the local variable array.
|
static StackManipulation |
increment(ParameterDescription parameterDescription,
int value)
Increments the value of the supplied parameter.
|
static StackManipulation |
load(ParameterDescription parameterDescription)
Loads a parameter's value onto the operand stack.
|
StackManipulation |
loadFrom(int offset)
Creates a stack assignment for a reading given offset of the local variable array.
|
static StackManipulation |
loadThis()
Loads a reference to the
this reference what is only meaningful for a non-static method. |
static MethodVariableAccess |
of(TypeDefinition typeDefinition)
Locates the correct accessor for a variable of a given type.
|
static StackManipulation |
store(ParameterDescription parameterDescription)
Stores the top operand stack value at the supplied parameter.
|
StackManipulation |
storeAt(int offset)
Creates a stack assignment for writing to a given offset of the local variable array.
|
static MethodVariableAccess |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static MethodVariableAccess[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final MethodVariableAccess INTEGER
public static final MethodVariableAccess LONG
long
.public static final MethodVariableAccess FLOAT
float
.public static final MethodVariableAccess DOUBLE
double
.public static final MethodVariableAccess REFERENCE
public static MethodVariableAccess[] values()
for (MethodVariableAccess c : MethodVariableAccess.values()) System.out.println(c);
public static MethodVariableAccess valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static MethodVariableAccess of(TypeDefinition typeDefinition)
typeDefinition
- The type of the variable to be loaded.public static MethodVariableAccess.MethodLoading allArgumentsOf(MethodDescription methodDescription)
methodDescription
- The method for which all parameters are to be loaded onto the operand stack.@CachedReturnPlugin.Enhance(value="loadThis") public static StackManipulation loadThis()
this
reference what is only meaningful for a non-static method.this
reference.public StackManipulation loadFrom(int offset)
offset
- The offset of the variable where double
and long
types count two slots.public StackManipulation storeAt(int offset)
offset
- The offset of the variable where double
and long
types count two slots.public StackManipulation increment(int offset, int value)
offset
- The offset of the variable where double
and long
types count two slots.value
- The incremented value.public static StackManipulation load(ParameterDescription parameterDescription)
parameterDescription
- The parameter which to load onto the operand stack.public static StackManipulation store(ParameterDescription parameterDescription)
parameterDescription
- The parameter which to store a value for.public static StackManipulation increment(ParameterDescription parameterDescription, int value)
parameterDescription
- The parameter which to increment.value
- The value to increment with.Copyright © 2014–2022. All rights reserved.