Package io.airlift.bytecode.instruction
Class Constant
- java.lang.Object
-
- io.airlift.bytecode.instruction.Constant
-
- All Implemented Interfaces:
BytecodeNode,InstructionNode
- Direct Known Subclasses:
Constant.BooleanConstant,Constant.BoxedBooleanConstant,Constant.BoxedDoubleConstant,Constant.BoxedFloatConstant,Constant.BoxedIntegerConstant,Constant.BoxedLongConstant,Constant.ClassConstant,Constant.DoubleConstant,Constant.FloatConstant,Constant.IntConstant,Constant.LongConstant,Constant.NullConstant,Constant.StringConstant
public abstract class Constant extends Object implements InstructionNode
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classConstant.BooleanConstantstatic classConstant.BoxedBooleanConstantstatic classConstant.BoxedDoubleConstantstatic classConstant.BoxedFloatConstantstatic classConstant.BoxedIntegerConstantstatic classConstant.BoxedLongConstantstatic classConstant.ClassConstantstatic classConstant.DoubleConstantstatic classConstant.FloatConstantstatic classConstant.IntConstantstatic classConstant.LongConstantstatic classConstant.NullConstantstatic classConstant.StringConstant
-
Constructor Summary
Constructors Constructor Description Constant()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description <T> Taccept(BytecodeNode parent, BytecodeVisitor<T> visitor)List<BytecodeNode>getChildNodes()abstract ObjectgetValue()static ConstantloadBoolean(boolean value)static ConstantloadBoxedBoolean(boolean value)static ConstantloadBoxedDouble(double value)static ConstantloadBoxedFloat(float value)static ConstantloadBoxedInt(int value)static ConstantloadBoxedLong(long value)static ConstantloadClass(ParameterizedType value)static ConstantloadClass(Class<?> value)static ConstantloadDouble(double value)static ConstantloadFloat(float value)static ConstantloadInt(int value)static ConstantloadLong(long value)static ConstantloadNull()static ConstantloadNumber(Number value)static ConstantloadString(String value)StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.airlift.bytecode.BytecodeNode
accept
-
-
-
-
Method Detail
-
loadNull
public static Constant loadNull()
-
loadBoolean
public static Constant loadBoolean(boolean value)
-
loadBoxedBoolean
public static Constant loadBoxedBoolean(boolean value)
-
loadInt
public static Constant loadInt(int value)
-
loadBoxedInt
public static Constant loadBoxedInt(int value)
-
loadFloat
public static Constant loadFloat(float value)
-
loadBoxedFloat
public static Constant loadBoxedFloat(float value)
-
loadLong
public static Constant loadLong(long value)
-
loadBoxedLong
public static Constant loadBoxedLong(long value)
-
loadDouble
public static Constant loadDouble(double value)
-
loadBoxedDouble
public static Constant loadBoxedDouble(double value)
-
loadClass
public static Constant loadClass(ParameterizedType value)
-
getValue
public abstract Object getValue()
-
getChildNodes
public List<BytecodeNode> getChildNodes()
- Specified by:
getChildNodesin interfaceBytecodeNode
-
accept
public <T> T accept(BytecodeNode parent, BytecodeVisitor<T> visitor)
- Specified by:
acceptin interfaceBytecodeNode
-
-