Class LongConstant

  • All Implemented Interfaces:
    Value

    public final class LongConstant
    extends Constant
    Represents a long constant.
    • Constructor Detail

      • LongConstant

        public LongConstant​(long value)
        Creates a long constant with the given value.
        Parameters:
        value - the long value
    • Method Detail

      • of

        public static LongConstant of​(long value)
        Creates a long constant, using cached instances for common values.
        Parameters:
        value - the long value
        Returns:
        a LongConstant instance
      • getType

        public IRType getType()
        Description copied from interface: Value
        Gets the IR type of this value.
        Returns:
        the IR type
      • getValue

        public Long getValue()
        Description copied from class: Constant
        Gets the value of this constant.
        Specified by:
        getValue in class Constant
        Returns:
        the constant value
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object