Class ConstantValue

java.lang.Object
com.ibm.wala.ssa.ConstantValue
All Implemented Interfaces:
Value

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

    • ConstantValue

      public ConstantValue(Object constant)
    • ConstantValue

      public ConstantValue(int constant)
    • ConstantValue

      public ConstantValue(double constant)
  • Method Details

    • getValue

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

      public String toString()
      Overrides:
      toString in class Object
    • 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"
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object