Interface SourceType

    • Method Detail

      • toJavaSource

        String toJavaSource()
        Converts this source type to Java source code representation.
        Returns:
        the Java source representation (e.g., "int", "String", "int[]")
      • toIRType

        IRType toIRType()
        Converts this source type to the equivalent IR type.
        Returns:
        the corresponding IRType
      • fromIRType

        static SourceType fromIRType​(IRType irType)
        Creates a SourceType from an IR type.
        Parameters:
        irType - the IR type to convert
        Returns:
        the corresponding SourceType
      • isPrimitive

        default boolean isPrimitive()
        Returns:
        true if this type is a primitive type
      • isReference

        default boolean isReference()
        Returns:
        true if this type is a reference type (class or interface)
      • isArray

        default boolean isArray()
        Returns:
        true if this type is an array type
      • isVoid

        default boolean isVoid()
        Returns:
        true if this type is void
      • getParent

        default ASTNode getParent()
        Types are shared and carry no link to the node that uses them.
        Specified by:
        getParent in interface ASTNode
        Returns:
        null
      • setParent

        default void setParent​(ASTNode parent)
        Does nothing, since types keep no parent link.
        Specified by:
        setParent in interface ASTNode
        Parameters:
        parent - ignored