public class TypeMirrorPairVisitor<R> extends SimpleTypeVisitor7<R,TypeMirror>
ElementPairVisitor
but provides a visitor to visit two type mirrors
of the same type.
Typical usage:
javax.lang.model.type.TypeMirror t1 = ...;
javax.lang.model.type.TypeMirror t2 = ...;
t1.accept(new TypeMirrorPairVisitor<Void>() {
protected Void visitArray(ArrayType t1, ArrayType t2) {
...
}
}, t2);
ElementPairVisitor
DEFAULT_VALUE
Constructor and Description |
---|
TypeMirrorPairVisitor() |
defaultAction
visit, visit
protected R unmatchedAction(@Nonnull TypeMirror type, @Nullable TypeMirror otherType)
protected R defaultMatchAction(@Nonnull TypeMirror type, @Nullable TypeMirror otherType)
public final R visitPrimitive(PrimitiveType type, TypeMirror otherType)
visitPrimitive
in interface TypeVisitor<R,TypeMirror>
visitPrimitive
in class SimpleTypeVisitor6<R,TypeMirror>
protected R visitPrimitive(PrimitiveType type, PrimitiveType otherType)
public final R visitNull(NullType type, TypeMirror otherType)
visitNull
in interface TypeVisitor<R,TypeMirror>
visitNull
in class SimpleTypeVisitor6<R,TypeMirror>
public final R visitArray(ArrayType type, TypeMirror otherType)
visitArray
in interface TypeVisitor<R,TypeMirror>
visitArray
in class SimpleTypeVisitor6<R,TypeMirror>
public final R visitDeclared(DeclaredType type, TypeMirror otherType)
visitDeclared
in interface TypeVisitor<R,TypeMirror>
visitDeclared
in class SimpleTypeVisitor6<R,TypeMirror>
protected R visitDeclared(DeclaredType type, DeclaredType otherType)
public final R visitError(ErrorType type, TypeMirror otherType)
visitError
in interface TypeVisitor<R,TypeMirror>
visitError
in class SimpleTypeVisitor6<R,TypeMirror>
public final R visitTypeVariable(TypeVariable type, TypeMirror otherType)
visitTypeVariable
in interface TypeVisitor<R,TypeMirror>
visitTypeVariable
in class SimpleTypeVisitor6<R,TypeMirror>
protected R visitTypeVariable(TypeVariable type, TypeVariable otherType)
public final R visitWildcard(WildcardType type, TypeMirror otherType)
visitWildcard
in interface TypeVisitor<R,TypeMirror>
visitWildcard
in class SimpleTypeVisitor6<R,TypeMirror>
protected R visitWildcard(WildcardType type, WildcardType otherType)
public final R visitExecutable(ExecutableType type, TypeMirror otherType)
visitExecutable
in interface TypeVisitor<R,TypeMirror>
visitExecutable
in class SimpleTypeVisitor6<R,TypeMirror>
protected R visitExecutable(ExecutableType type, ExecutableType otherType)
public final R visitNoType(NoType type, TypeMirror otherType)
visitNoType
in interface TypeVisitor<R,TypeMirror>
visitNoType
in class SimpleTypeVisitor6<R,TypeMirror>
public final R visitIntersection(IntersectionType type, TypeMirror otherType)
visitIntersection
in interface TypeVisitor<R,TypeMirror>
visitIntersection
in class AbstractTypeVisitor6<R,TypeMirror>
protected R visitIntersection(IntersectionType type, IntersectionType otherType)
public final R visitUnion(UnionType type, TypeMirror otherType)
visitUnion
in interface TypeVisitor<R,TypeMirror>
visitUnion
in class SimpleTypeVisitor7<R,TypeMirror>
public R visitUnknown(TypeMirror type, TypeMirror otherType)
visitUnknown
in interface TypeVisitor<R,TypeMirror>
visitUnknown
in class AbstractTypeVisitor6<R,TypeMirror>
Copyright © 2014-2020 Lukas Krejci. All Rights Reserved.