Interface JTypeVisitable
-
- All Known Subinterfaces:
JClassType
,JMethodSig
,JTypeMirror
,JTypeVar
,JWildcardType
,SubstVar
- All Known Implementing Classes:
JArrayType
,JIntersectionType
,JPrimitiveType
public interface JTypeVisitable
Common supertype forJMethodSig
andJTypeMirror
. Those are the kinds of objects that aJTypeVisitor
can explore.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T,P>
TacceptVisitor(JTypeVisitor<T,P> visitor, P p)
Accept a type visitor, dispatching on this object's runtime type to the correct method of the visitor.JTypeVisitable
subst(Function<? super SubstVar,? extends @NonNull JTypeMirror> subst)
Replace the type variables occurring in the given type by their image by the given function.
-
-
-
Method Detail
-
subst
JTypeVisitable subst(Function<? super SubstVar,? extends @NonNull JTypeMirror> subst)
Replace the type variables occurring in the given type by their image by the given function. Substitutions are not applied recursively (ie, is not applied on the result of a substitution).- Parameters:
subst
- Substitution function, eg aSubstitution
-
acceptVisitor
<T,P> T acceptVisitor(JTypeVisitor<T,P> visitor, P p)
Accept a type visitor, dispatching on this object's runtime type to the correct method of the visitor.- Type Parameters:
P
- Type of data of the visitorT
- Type of result of the visitor
-
-