public enum IntegerConstant extends Enum<IntegerConstant> implements StackManipulation
int constant onto the operand stack. Note that within the JVM,
 boolean, byte, short and char values are represented by integers and can therefore
 be loaded by using this class.| Modifier and Type | Class and Description | 
|---|---|
| protected static class  | IntegerConstant.ConstantPoolA stack manipulation that loads a JVM-integer value from a constant pool value onto the operand stack. | 
| protected static class  | IntegerConstant.SingleBytePushA stack manipulation that loads a JVM-integer value by a  BIPUSHoperation which is
 legal for single byte integer values. | 
| protected static class  | IntegerConstant.TwoBytePushA stack manipulation that loads a JVM-integer value by a  SIPUSHoperation which is
 legal for up to two byte integer values. | 
StackManipulation.Compound, StackManipulation.Illegal, StackManipulation.LegalTrivial, StackManipulation.Size| Enum Constant and Description | 
|---|
| FIVEA JVM-type  intconstant of value5. | 
| FOURA JVM-type  intconstant of value4. | 
| MINUS_ONEA JVM-type  intconstant of value-1. | 
| ONEA JVM-type  intconstant of value1. | 
| THREEA JVM-type  intconstant of value3. | 
| TWOA JVM-type  intconstant of value2. | 
| ZEROA JVM-type  intconstant of value0. | 
| Modifier and Type | Method and Description | 
|---|---|
| StackManipulation.Size | apply(org.objectweb.asm.MethodVisitor methodVisitor,
     Implementation.Context implementationContext)Applies the stack manipulation that is described by this instance. | 
| static StackManipulation | forValue(boolean value)Creates a stack manipulation for loading a boolean value onto the stack. | 
| static StackManipulation | forValue(int value)Creates a stack manipulation for loading an  intvalue onto the stack. | 
| boolean | isValid()Determines if this stack manipulation is valid. | 
| String | toString() | 
| static IntegerConstant | valueOf(String name)Returns the enum constant of this type with the specified name. | 
| static IntegerConstant[] | values()Returns an array containing the constants of this enum type, in
the order they are declared. | 
public static final IntegerConstant MINUS_ONE
int constant of value -1.public static final IntegerConstant ZERO
int constant of value 0.public static final IntegerConstant ONE
int constant of value 1.public static final IntegerConstant TWO
int constant of value 2.public static final IntegerConstant THREE
int constant of value 3.public static final IntegerConstant FOUR
int constant of value 4.public static final IntegerConstant FIVE
int constant of value 5.public static IntegerConstant[] values()
for (IntegerConstant c : IntegerConstant.values()) System.out.println(c);
public static IntegerConstant 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 forValue(boolean value)
value - The boolean to load onto the stack.boolean.public static StackManipulation forValue(int value)
int value onto the stack.
 This is achieved either by invoking a constant opcode, if any, or by creating a binary push operation.
value - The int (or byte, short, char) value to load onto the stack.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, Implementation.Context implementationContext)
StackManipulationapply in interface StackManipulationmethodVisitor - The method visitor used to write the method implementation to.implementationContext - The context of the current implementation.public String toString()
toString in class Enum<IntegerConstant>Copyright © 2014–2015. All rights reserved.