org.eclipse.jdt.internal.compiler.impl
类 Constant

java.lang.Object
  继承者 org.eclipse.jdt.internal.compiler.impl.Constant
所有已实现的接口:
OperatorIds, TypeIds
直接已知子类:
BooleanConstant, ByteConstant, CharConstant, DoubleConstant, FloatConstant, IntConstant, LongConstant, ShortConstant, StringConstant

public abstract class Constant
extends Object
implements TypeIds, OperatorIds


字段摘要
static Constant NotAConstant
           
 
从接口 org.eclipse.jdt.internal.compiler.lookup.TypeIds 继承的字段
Boolean2Boolean, Boolean2Int, Boolean2String, BOXING, Byte2Byte, Byte2Char, Byte2Double, Byte2Float, Byte2Int, Byte2Long, Byte2Short, Byte2String, Char2Byte, Char2Char, Char2Double, Char2Float, Char2Int, Char2Long, Char2Short, Char2String, COMPILE_TYPE_MASK, Double2Byte, Double2Char, Double2Double, Double2Float, Double2Int, Double2Long, Double2Short, Double2String, Float2Byte, Float2Char, Float2Double, Float2Float, Float2Int, Float2Long, Float2Short, Float2String, IMPLICIT_CONVERSION_MASK, Int2Byte, Int2Char, Int2Double, Int2Float, Int2Int, Int2Long, Int2Short, Int2String, Long2Byte, Long2Char, Long2Double, Long2Float, Long2Int, Long2Long, Long2Short, Long2String, NoId, Null2Null, Null2String, Object2boolean, Object2byte, Object2char, Object2double, Object2float, Object2int, Object2long, Object2Object, Object2short, Object2String, Short2Byte, Short2Char, Short2Double, Short2Float, Short2Int, Short2Long, Short2Short, Short2String, String2String, T_boolean, T_byte, T_char, T_double, T_float, T_int, T_JavaIoException, T_JavaIoExternalizable, T_JavaIoObjectStreamException, T_JavaIoPrintStream, T_JavaIoSerializable, T_JavaLangAnnotationAnnotation, T_JavaLangAnnotationDocumented, T_JavaLangAnnotationElementType, T_JavaLangAnnotationInherited, T_JavaLangAnnotationRetention, T_JavaLangAnnotationRetentionPolicy, T_JavaLangAnnotationTarget, T_JavaLangAssertionError, T_JavaLangAutoCloseable, T_JavaLangBoolean, T_JavaLangByte, T_JavaLangCharacter, T_JavaLangClass, T_JavaLangClassNotFoundException, T_JavaLangCloneable, T_JavaLangDeprecated, T_JavaLangDouble, T_JavaLangEnum, T_JavaLangError, T_JavaLangException, T_JavaLangFloat, T_JavaLangIllegalArgumentException, T_JavaLangInteger, T_JavaLangInvokeMethodHandlePolymorphicSignature, T_JavaLangIterable, T_JavaLangLong, T_JavaLangNoClassDefError, T_JavaLangObject, T_JavaLangOverride, T_JavaLangReflectConstructor, T_JavaLangReflectField, T_JavaLangReflectMethod, T_JavaLangRuntimeException, T_JavaLangSafeVarargs, T_JavaLangShort, T_JavaLangString, T_JavaLangStringBuffer, T_JavaLangStringBuilder, T_JavaLangSuppressWarnings, T_JavaLangSystem, T_JavaLangThrowable, T_JavaLangVoid, T_JavaUtilCollection, T_JavaUtilIterator, T_long, T_null, T_short, T_undefined, T_void, UNBOXING
 
从接口 org.eclipse.jdt.internal.compiler.ast.OperatorIds 继承的字段
AND, AND_AND, DIVIDE, EQUAL, EQUAL_EQUAL, GREATER, GREATER_EQUAL, INSTANCEOF, LEFT_SHIFT, LESS, LESS_EQUAL, MINUS, MINUS_MINUS, MULTIPLY, NOT, NOT_EQUAL, NumberOfTables, OR, OR_OR, PLUS, PLUS_PLUS, QUESTIONCOLON, REMAINDER, RIGHT_SHIFT, TWIDDLE, UNSIGNED_RIGHT_SHIFT, XOR
 
构造方法摘要
Constant()
           
 
方法摘要
 boolean booleanValue()
           
 byte byteValue()
           
 Constant castTo(int conversionToTargetType)
           
 char charValue()
           
static Constant computeConstantOperation(Constant cst, int id, int operator)
           
static Constant computeConstantOperation(Constant left, int leftId, int operator, Constant right, int rightId)
           
static Constant computeConstantOperationAND_AND(Constant left, int leftId, Constant right, int rightId)
           
static Constant computeConstantOperationAND(Constant left, int leftId, Constant right, int rightId)
           
static Constant computeConstantOperationDIVIDE(Constant left, int leftId, Constant right, int rightId)
           
static Constant computeConstantOperationEQUAL_EQUAL(Constant left, int leftId, Constant right, int rightId)
           
static Constant computeConstantOperationGREATER_EQUAL(Constant left, int leftId, Constant right, int rightId)
           
static Constant computeConstantOperationGREATER(Constant left, int leftId, Constant right, int rightId)
           
static Constant computeConstantOperationLEFT_SHIFT(Constant left, int leftId, Constant right, int rightId)
           
static Constant computeConstantOperationLESS_EQUAL(Constant left, int leftId, Constant right, int rightId)
           
static Constant computeConstantOperationLESS(Constant left, int leftId, Constant right, int rightId)
           
static Constant computeConstantOperationMINUS(Constant left, int leftId, Constant right, int rightId)
           
static Constant computeConstantOperationMULTIPLY(Constant left, int leftId, Constant right, int rightId)
           
static Constant computeConstantOperationOR_OR(Constant left, int leftId, Constant right, int rightId)
           
static Constant computeConstantOperationOR(Constant left, int leftId, Constant right, int rightId)
           
static Constant computeConstantOperationPLUS(Constant left, int leftId, Constant right, int rightId)
           
static Constant computeConstantOperationREMAINDER(Constant left, int leftId, Constant right, int rightId)
           
static Constant computeConstantOperationRIGHT_SHIFT(Constant left, int leftId, Constant right, int rightId)
           
static Constant computeConstantOperationUNSIGNED_RIGHT_SHIFT(Constant left, int leftId, Constant right, int rightId)
           
static Constant computeConstantOperationXOR(Constant left, int leftId, Constant right, int rightId)
           
 double doubleValue()
           
 float floatValue()
           
 boolean hasSameValue(Constant otherConstant)
          Returns true if both constants have the same type and the same actual value
 int intValue()
           
 long longValue()
           
 short shortValue()
           
 String stringValue()
           
 String toString()
           
abstract  int typeID()
           
 String typeName()
           
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

字段详细信息

NotAConstant

public static final Constant NotAConstant
构造方法详细信息

Constant

public Constant()
方法详细信息

booleanValue

public boolean booleanValue()

byteValue

public byte byteValue()

castTo

public final Constant castTo(int conversionToTargetType)

charValue

public char charValue()

computeConstantOperation

public static final Constant computeConstantOperation(Constant cst,
                                                      int id,
                                                      int operator)

computeConstantOperation

public static final Constant computeConstantOperation(Constant left,
                                                      int leftId,
                                                      int operator,
                                                      Constant right,
                                                      int rightId)

computeConstantOperationAND

public static final Constant computeConstantOperationAND(Constant left,
                                                         int leftId,
                                                         Constant right,
                                                         int rightId)

computeConstantOperationAND_AND

public static final Constant computeConstantOperationAND_AND(Constant left,
                                                             int leftId,
                                                             Constant right,
                                                             int rightId)

computeConstantOperationDIVIDE

public static final Constant computeConstantOperationDIVIDE(Constant left,
                                                            int leftId,
                                                            Constant right,
                                                            int rightId)

computeConstantOperationEQUAL_EQUAL

public static final Constant computeConstantOperationEQUAL_EQUAL(Constant left,
                                                                 int leftId,
                                                                 Constant right,
                                                                 int rightId)

computeConstantOperationGREATER

public static final Constant computeConstantOperationGREATER(Constant left,
                                                             int leftId,
                                                             Constant right,
                                                             int rightId)

computeConstantOperationGREATER_EQUAL

public static final Constant computeConstantOperationGREATER_EQUAL(Constant left,
                                                                   int leftId,
                                                                   Constant right,
                                                                   int rightId)

computeConstantOperationLEFT_SHIFT

public static final Constant computeConstantOperationLEFT_SHIFT(Constant left,
                                                                int leftId,
                                                                Constant right,
                                                                int rightId)

computeConstantOperationLESS

public static final Constant computeConstantOperationLESS(Constant left,
                                                          int leftId,
                                                          Constant right,
                                                          int rightId)

computeConstantOperationLESS_EQUAL

public static final Constant computeConstantOperationLESS_EQUAL(Constant left,
                                                                int leftId,
                                                                Constant right,
                                                                int rightId)

computeConstantOperationMINUS

public static final Constant computeConstantOperationMINUS(Constant left,
                                                           int leftId,
                                                           Constant right,
                                                           int rightId)

computeConstantOperationMULTIPLY

public static final Constant computeConstantOperationMULTIPLY(Constant left,
                                                              int leftId,
                                                              Constant right,
                                                              int rightId)

computeConstantOperationOR

public static final Constant computeConstantOperationOR(Constant left,
                                                        int leftId,
                                                        Constant right,
                                                        int rightId)

computeConstantOperationOR_OR

public static final Constant computeConstantOperationOR_OR(Constant left,
                                                           int leftId,
                                                           Constant right,
                                                           int rightId)

computeConstantOperationPLUS

public static final Constant computeConstantOperationPLUS(Constant left,
                                                          int leftId,
                                                          Constant right,
                                                          int rightId)

computeConstantOperationREMAINDER

public static final Constant computeConstantOperationREMAINDER(Constant left,
                                                               int leftId,
                                                               Constant right,
                                                               int rightId)

computeConstantOperationRIGHT_SHIFT

public static final Constant computeConstantOperationRIGHT_SHIFT(Constant left,
                                                                 int leftId,
                                                                 Constant right,
                                                                 int rightId)

computeConstantOperationUNSIGNED_RIGHT_SHIFT

public static final Constant computeConstantOperationUNSIGNED_RIGHT_SHIFT(Constant left,
                                                                          int leftId,
                                                                          Constant right,
                                                                          int rightId)

computeConstantOperationXOR

public static final Constant computeConstantOperationXOR(Constant left,
                                                         int leftId,
                                                         Constant right,
                                                         int rightId)

doubleValue

public double doubleValue()

floatValue

public float floatValue()

hasSameValue

public boolean hasSameValue(Constant otherConstant)
Returns true if both constants have the same type and the same actual value

参数:
otherConstant -

intValue

public int intValue()

longValue

public long longValue()

shortValue

public short shortValue()

stringValue

public String stringValue()

toString

public String toString()
覆盖:
Object 中的 toString

typeID

public abstract int typeID()

typeName

public String typeName()


Copyright © 2013. All Rights Reserved.