Class VoidType

  • All Implemented Interfaces:
    IRType

    public final class VoidType
    extends Object
    implements IRType
    Represents the void type (for method returns).
    • Field Detail

      • INSTANCE

        public static final VoidType INSTANCE
    • Method Detail

      • getDescriptor

        public String getDescriptor()
        Specified by:
        getDescriptor in interface IRType
        Returns:
        the JVM type descriptor for this type
      • getSize

        public int getSize()
        Specified by:
        getSize in interface IRType
        Returns:
        the number of stack or local slots a value of this type occupies
      • isReference

        public boolean isReference()
        Specified by:
        isReference in interface IRType
        Returns:
        true for object and array types
      • isPrimitive

        public boolean isPrimitive()
        Specified by:
        isPrimitive in interface IRType
        Returns:
        true for the eight primitive types
      • isVoid

        public boolean isVoid()
        Specified by:
        isVoid in interface IRType
        Returns:
        true for the void type
      • isArray

        public boolean isArray()
        Specified by:
        isArray in interface IRType
        Returns:
        true for array types
      • isTwoSlot

        public boolean isTwoSlot()
        Specified by:
        isTwoSlot in interface IRType
        Returns:
        true for long and double, which occupy two slots