Class WildcardSourceType

  • All Implemented Interfaces:
    ASTNode, SourceType

    public final class WildcardSourceType
    extends Object
    implements SourceType
    A wildcard type argument such as "?", "? extends Number" or "? super Integer"; erases to java/lang/Object.
    • Method Detail

      • getBound

        public SourceType getBound()
        Returns:
        the bound
      • isUnbounded

        public boolean isUnbounded()
        Returns:
        true for a bare "?" wildcard
      • hasUpperBound

        public boolean hasUpperBound()
        Returns:
        true for a "? extends" wildcard
      • hasLowerBound

        public boolean hasLowerBound()
        Returns:
        true for a "? super" wildcard
      • 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