public enum MethodVariableAccess extends Enum<MethodVariableAccess>
Enum Constant and Description |
---|
DOUBLE |
FLOAT |
INTEGER |
LONG |
REFERENCE |
Modifier and Type | Method and Description |
---|---|
static MethodVariableAccess |
forType(TypeDescription typeDescription)
Locates the correct accessor for a variable of a given type.
|
static StackManipulation |
loadArguments(MethodDescription methodDescription) |
StackManipulation |
loadFromIndex(int variableOffset)
Creates a stack assignment for a given index of the local variable array.
|
static StackManipulation |
loadThisAndArguments(MethodDescription methodDescription)
Loads all method parameters for a given method, including a reference to the object instance if the method is
not static.
|
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
public static final MethodVariableAccess FLOAT
public static final MethodVariableAccess 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 forType(TypeDescription typeDescription)
typeDescription
- The type of the variable to be loaded.public static StackManipulation loadThisAndArguments(MethodDescription methodDescription)
methodDescription
- The method for which all parameters and an instance reference, if any, is to be loaded.public static StackManipulation loadArguments(MethodDescription methodDescription)
public StackManipulation loadFromIndex(int variableOffset)
The index has to be relative to the method's local variable array size.
variableOffset
- The offset of the variable where double
and long
types
count two slots.Copyright © 2014. All rights reserved.