public enum Duplication extends Enum<Duplication> implements StackManipulation
StackManipulation.Compound, StackManipulation.Illegal, StackManipulation.LegalTrivial, StackManipulation.Size| Enum Constant and Description |
|---|
DOUBLE
A duplication of a double-sized stack value.
|
SINGLE
A duplication of a single-sized stack values.
|
ZERO
A duplication of no values.
|
| Modifier and Type | Method and Description |
|---|---|
StackManipulation.Size |
apply(org.objectweb.asm.MethodVisitor methodVisitor,
Instrumentation.Context instrumentationContext)
Applies the stack manipulation that is described by this instance.
|
static StackManipulation |
duplicate(TypeDescription typeDescription)
Duplicates a value given its type.
|
boolean |
isValid()
Determines if this stack manipulation is valid.
|
static Duplication |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Duplication[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Duplication ZERO
public static final Duplication SINGLE
public static final Duplication DOUBLE
public static Duplication[] values()
for (Duplication c : Duplication.values()) System.out.println(c);
public static Duplication 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 duplicate(TypeDescription typeDescription)
typeDescription - The type to be duplicated.public boolean isValid()
StackManipulationisValid in interface StackManipulationfalse, this manipulation cannot be applied and should throw an exception.public StackManipulation.Size apply(org.objectweb.asm.MethodVisitor methodVisitor, Instrumentation.Context instrumentationContext)
StackManipulationapply in interface StackManipulationmethodVisitor - The method visitor used to write the method implementation to.instrumentationContext - The context of the current instrumentation.Copyright © 2014. All rights reserved.