Record Class ByteType

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

public record ByteType() extends Record implements Type
A byte type
  • Field Details

  • Constructor Details

    • ByteType

      public ByteType()
      Creates an instance of a ByteType 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
    • hasIntRepresentation

      public boolean hasIntRepresentation()
      Description copied from interface: Type
      Tests whether this type is represented as an int in the JVM. This is true for boolean, byte, char, int, and short.
      Specified by:
      hasIntRepresentation in interface Type
      Returns:
      True if this type is represented as an int by the JVM
    • 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