Class VoidSourceType

  • All Implemented Interfaces:
    ASTNode, SourceType

    public final class VoidSourceType
    extends Object
    implements SourceType
    The void type in the source AST, held as a singleton.
    • Field Detail

      • INSTANCE

        public static final VoidSourceType INSTANCE
        The singleton instance.
    • Method Detail

      • toJavaSource

        public String toJavaSource()
        Description copied from interface: SourceType
        Converts this source type to Java source code representation.
        Specified by:
        toJavaSource in interface SourceType
        Returns:
        the Java source representation (e.g., "int", "String", "int[]")
      • toIRType

        public IRType toIRType()
        Description copied from interface: SourceType
        Converts this source type to the equivalent IR type.
        Specified by:
        toIRType in interface SourceType
        Returns:
        the corresponding IRType
      • accept

        public <T> T accept​(SourceVisitor<T> visitor)
        Description copied from interface: ASTNode
        Accepts a visitor for this node.
        Specified by:
        accept in interface ASTNode
        Type Parameters:
        T - the return type of the visitor
        Parameters:
        visitor - the visitor to accept
        Returns:
        the result from the visitor
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object