Record Class LongType
java.lang.Object
java.lang.Record
org.jfuncmachine.compiler.model.types.LongType
- All Implemented Interfaces:
Type
A long type
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether some other object is "equal to" this one.Returns the name of this type's box class, if any For example, SimpleTypes.INT has a box class name of "java.lang.Integer"intThe number of stack slots that this type consumes on the JVM stack.inthashCode()Returns a hash code value for this object.booleanisUnboxableFrom(String className) Test whether this type can be unboxed from the given class nametoString()Returns a string representation of this record class.Methods inherited from interface org.jfuncmachine.compiler.model.types.Type
getBoxType, getJVMTypeRepresentation, getUnboxedType, hasIntRepresentation, isBoxType, isEnum, sameJavaType
-
Field Details
-
BOX_TYPE
The Java class name of the equivalent box type- See Also:
-
-
Constructor Details
-
LongType
public LongType()Creates an instance of aLongTyperecord class.
-
-
Method Details
-
getBoxTypeName
Description copied from interface:TypeReturns 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:
getBoxTypeNamein interfaceType- Returns:
- The name of the box class, or null if there isn't one
-
isUnboxableFrom
Description copied from interface:TypeTest whether this type can be unboxed from the given class name- Specified by:
isUnboxableFromin interfaceType- 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:TypeThe 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:
getStackSizein interfaceType- Returns:
- The number of stack slots this type consumes
-
equals
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. -
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. -
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.
-