public enum Removal extends Enum<Removal> implements StackManipulation
StackManipulation.Compound, StackManipulation.Illegal, StackManipulation.LegalTrivial, StackManipulation.Size
Enum Constant and Description |
---|
DOUBLE
A removal of a double-sized value.
|
SINGLE
A removal of a single-sized value.
|
ZERO
A removal of no value.
|
Modifier and Type | Method and Description |
---|---|
StackManipulation.Size |
apply(MethodVisitor methodVisitor,
Implementation.Context implementationContext)
Applies the stack manipulation that is described by this instance.
|
boolean |
isValid()
Determines if this stack manipulation is valid.
|
static StackManipulation |
pop(TypeDescription typeDescription)
Removes a value from the operand stack dependant of its size.
|
String |
toString() |
static Removal |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Removal[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Removal ZERO
public static final Removal SINGLE
public static final Removal DOUBLE
public static Removal[] values()
for (Removal c : Removal.values()) System.out.println(c);
public static Removal 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 StackManipulation pop(TypeDescription typeDescription)
typeDescription
- The type to remove from the stack.public boolean isValid()
StackManipulation
isValid
in interface StackManipulation
false
, this manipulation cannot be applied and should throw an exception.public StackManipulation.Size apply(MethodVisitor methodVisitor, Implementation.Context implementationContext)
StackManipulation
apply
in interface StackManipulation
methodVisitor
- The method visitor used to write the method implementation to.implementationContext
- The context of the current implementation.Copyright © 2014–2015. All rights reserved.