Interface JTypeVisitable

All Known Subinterfaces:
JClassType, JMethodSig, JTypeMirror, JTypeVar, JWildcardType, SubstVar
All Known Implementing Classes:
JArrayType, JIntersectionType, JPrimitiveType

public interface JTypeVisitable
Common supertype for JMethodSig and JTypeMirror. Those are the kinds of objects that a JTypeVisitor can explore.
  • Method Summary

    Modifier and Type
    Method
    Description
    <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.
    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 Details

    • 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 a Substitution
    • 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:
      T - Type of result of the visitor
      P - Type of data of the visitor