Interface JWildcardType

    • Method Detail

      • isUnbounded

        default boolean isUnbounded()
        Returns true if this is an "extends" wildcard, with no bound ("?").
      • isUpperBound

        boolean isUpperBound()
        Returns true if this is an "extends" wildcard, the bound is then an upper bound.
      • isLowerBound

        default boolean isLowerBound()
        Returns true if this is a "super" wildcard, the bound is then a lower bound.
      • asLowerBound

        default @NonNull JTypeMirror asLowerBound()
        Returns the lower bound, or the bottom type if this is an "extends" wildcard.
      • asUpperBound

        default @NonNull JTypeMirror asUpperBound()
        Returns the upper bound, or Object if this is a "super" wildcard.
      • getErasure

        default JTypeMirror getErasure()
        This is implemented for convenience. However, the erasure of a wildcard type is undefined and useless. This is because they can only occur in type arguments, which are erased themselves.
        Specified by:
        getErasure in interface JTypeMirror
      • streamMethods

        default Stream<JMethodSig> streamMethods​(Predicate<? super JMethodSymbol> prefilter)
        Description copied from interface: JTypeMirror
        Returns a stream of method signatures declared in and inherited by this type. Method signatures are created on-demand by this method, they're not reused between calls. This stream does not include constructors.
        Specified by:
        streamMethods in interface JTypeMirror
        Parameters:
        prefilter - Filter selecting symbols for which a signature should be created and yielded by the stream
      • withAnnotations

        JWildcardType withAnnotations​(org.pcollections.PSet<SymbolicValue.SymAnnot> newTypeAnnots)
        Description copied from interface: JTypeMirror
        Returns a type mirror that is equal to this instance but has different type annotations. Note that some types ignore this method and return themselves without changing. Eg the null type cannot be annotated.
        Specified by:
        withAnnotations in interface JTypeMirror
        Parameters:
        newTypeAnnots - New type annotations (not null)
        Returns:
        A new type, maybe this one
      • acceptVisitor

        default <T,​P> T acceptVisitor​(JTypeVisitor<T,​P> visitor,
                                            P p)
        Description copied from interface: JTypeVisitable
        Accept a type visitor, dispatching on this object's runtime type to the correct method of the visitor.
        Specified by:
        acceptVisitor in interface JTypeVisitable
        Type Parameters:
        T - Type of result of the visitor
        P - Type of data of the visitor