Record Class ByteType
java.lang.Object
java.lang.Record
org.jfuncmachine.compiler.model.types.ByteType
- All Implemented Interfaces:
Type
A byte 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"inthashCode()Returns a hash code value for this object.booleanTests whether this type is represented as an int in the JVM.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, getStackSize, getUnboxedType, isBoxType, isEnum, sameJavaType
-
Field Details
-
BOX_TYPE
The Java class name of the equivalent box type- See Also:
-
-
Constructor Details
-
ByteType
public ByteType()Creates an instance of aByteTyperecord 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
-
hasIntRepresentation
public boolean hasIntRepresentation()Description copied from interface:TypeTests whether this type is represented as an int in the JVM. This is true for boolean, byte, char, int, and short.- Specified by:
hasIntRepresentationin interfaceType- Returns:
- True if this type is represented as an int by the JVM
-
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.
-