revapi-java-spi/src/main/java/org/revapi/java/spi/JavaTypeElement.java
/**
     * Visits the uses of the provided type. The visit will stop as soon as a non-null value is returned
     * from the visitor, even if some use sites are left unvisited.
     *
     * @param <R>       the return type (use {@link java.lang.Void} for no return type)
     * @param <P>       the type of the parameter (use {@link java.lang.Void} for no particular type)
     * @param visitor   the visitor
     * @param parameter the parameter to supply to the visitor
     *
     * @return the value returned by the visitor
     */
Visits the uses of the provided type. The visit will stop as soon as a non-null value is returned
from the visitor, even if some use sites are left unvisited.

@param        the return type (use  java.lang.Void for no return type)
@param        the type of the parameter (use  java.lang.Void for no particular type)
@param visitor   the visitor
@param parameter the parameter to supply to the visitor

@return the value returned by the visitor
Visits the uses of the provided type . The visit will stop as soon as a non - null value is returned from the visitor even if some use sites are left unvisited . @param the return type ( use java . lang . Void for no return type ) @param the type of the parameter ( use java . lang . Void for no particular type ) @param visitor the visitor @param parameter the parameter to supply to the visitor @return the value returned by the visitor
default <R, P> R visitUseSites(UseSite.Visitor<R, P> visitor, P parameter) {
        DeclaredType type = getModelRepresentation();
        for (UseSite u : getUseSites()) {
            R ret = visitor.visit(type, u, parameter);
            if (ret != null) {
                return ret;
            }
        }
        return visitor.end(type, parameter);
    }
default < R , P > R visitUseSites ( UseSite . Visitor < R , P > visitor , P parameter ) { DeclaredType type = getModelRepresentation ( ) ; for ( UseSite u : getUseSites ( ) ) { R ret = visitor . visit ( type , u , parameter ) ; if ( ret != null ) { return ret ; } } return visitor . end ( type , parameter ) ; }
Visits the uses of the provided type.
Visits the uses of the provided type .