Class ConstantValue

  • All Implemented Interfaces:
    Value

    public class ConstantValue
    extends Object
    implements Value
    The value of a constant which appears in an SSA IR.
    • Constructor Detail

      • ConstantValue

        public ConstantValue​(Object constant)
      • ConstantValue

        public ConstantValue​(int constant)
      • ConstantValue

        public ConstantValue​(double constant)
    • Method Detail

      • getValue

        public Object getValue()
        Returns:
        an object which represents the constant value
      • isStringConstant

        public boolean isStringConstant()
        Description copied from interface: Value
        Is this value a string constant?
        Specified by:
        isStringConstant in interface Value
      • isFalseConstant

        public boolean isFalseConstant()
        Returns:
        true iff this constant is "false"
      • isTrueConstant

        public boolean isTrueConstant()
        Returns:
        true iff this constant is "true"
      • isZeroConstant

        public boolean isZeroConstant()
        Returns:
        true iff this constant is "zero"
      • isNullConstant

        public boolean isNullConstant()
        Description copied from interface: Value
        Is this value a null constant?
        Specified by:
        isNullConstant in interface Value
        Returns:
        true iff this constant is "null"
      • isOneConstant

        public boolean isOneConstant()
        Returns:
        true iff this constant is "one"
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object