Record Class LongType

java.lang.Object
java.lang.Record
org.jfuncmachine.compiler.model.types.LongType
All Implemented Interfaces:
Type

public record LongType() extends Record implements Type
A long type
  • Field Details

  • Constructor Details

    • LongType

      public LongType()
      Creates an instance of a LongType record class.
  • Method Details

    • getBoxTypeName

      public String getBoxTypeName()
      Description copied from interface: Type
      Returns the name of this type's box class, if any For example, SimpleTypes.INT has a box class name of "java.lang.Integer"
      Specified by:
      getBoxTypeName in interface Type
      Returns:
      The name of the box class, or null if there isn't one
    • isUnboxableFrom

      public boolean isUnboxableFrom(String className)
      Description copied from interface: Type
      Test whether this type can be unboxed from the given class name
      Specified by:
      isUnboxableFrom in interface Type
      Parameters:
      className - The name of a possible box type
      Returns:
      True if this type can be unboxed from the given class name
    • getStackSize

      public int getStackSize()
      Description copied from interface: Type
      The number of stack slots that this type consumes on the JVM stack. A long or double type consumes two slots, all others consume one.
      Specified by:
      getStackSize in interface Type
      Returns:
      The number of stack slots this type consumes
    • equals

      public boolean equals(Object other)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal.
      Specified by:
      equals in class Record
      Parameters:
      other - the object with which to compare
      Returns:
      true if this object is the same as the other argument; false otherwise.
    • hashCode

      public int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • toString

      public String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object