Package org.revapi.java.spi
Class ElementPairVisitor<R>
- java.lang.Object
-
- javax.lang.model.util.AbstractElementVisitor6<R,P>
-
- javax.lang.model.util.SimpleElementVisitor6<R,P>
-
- javax.lang.model.util.SimpleElementVisitor7<R,Element>
-
- org.revapi.java.spi.ElementPairVisitor<R>
-
- All Implemented Interfaces:
ElementVisitor<R,Element>
public class ElementPairVisitor<R> extends SimpleElementVisitor7<R,Element>
Can be used by various checks and problem transformations to work with two elements of the same type.Typical usage:
javax.lang.model.element.Element e1 = ...; javax.lang.model.element.Element e2 = ...; e1.accept(new ElementPairVisitor<Void>() { protected Void visitType(TypeElement e1, TypeElement e2) { ... } }, e2);
- Since:
- 0.1
- Author:
- Lukas Krejci
- See Also:
TypeMirrorPairVisitor
-
-
Field Summary
-
Fields inherited from class javax.lang.model.util.SimpleElementVisitor6
DEFAULT_VALUE
-
-
Constructor Summary
Constructors Constructor Description ElementPairVisitor()
-
Method Summary
-
Methods inherited from class javax.lang.model.util.SimpleElementVisitor6
defaultAction
-
Methods inherited from class javax.lang.model.util.AbstractElementVisitor6
visit, visit
-
-
-
-
Method Detail
-
unmatchedAction
protected R unmatchedAction(@Nonnull Element element, @Nullable Element otherElement)
-
defaultMatchAction
protected R defaultMatchAction(@Nonnull Element element, @Nullable Element otherElement)
-
visitPackage
public final R visitPackage(@Nonnull PackageElement element, @Nullable Element otherElement)
- Specified by:
visitPackage
in interfaceElementVisitor<R,Element>
- Overrides:
visitPackage
in classSimpleElementVisitor6<R,Element>
-
visitPackage
protected R visitPackage(@Nonnull PackageElement element, @Nonnull PackageElement otherElement)
-
visitType
public final R visitType(@Nonnull TypeElement element, @Nullable Element otherElement)
- Specified by:
visitType
in interfaceElementVisitor<R,Element>
- Overrides:
visitType
in classSimpleElementVisitor6<R,Element>
-
visitType
protected R visitType(@Nonnull TypeElement element, @Nonnull TypeElement otherElement)
-
visitVariable
public final R visitVariable(@Nonnull VariableElement element, @Nullable Element otherElement)
- Specified by:
visitVariable
in interfaceElementVisitor<R,Element>
- Overrides:
visitVariable
in classSimpleElementVisitor7<R,Element>
-
visitVariable
protected R visitVariable(@Nonnull VariableElement element, @Nonnull VariableElement otherElement)
-
visitExecutable
public final R visitExecutable(@Nonnull ExecutableElement element, @Nullable Element otherElement)
- Specified by:
visitExecutable
in interfaceElementVisitor<R,Element>
- Overrides:
visitExecutable
in classSimpleElementVisitor6<R,Element>
-
visitExecutable
protected R visitExecutable(@Nonnull ExecutableElement element, @Nonnull ExecutableElement otherElement)
-
visitTypeParameter
public final R visitTypeParameter(@Nonnull TypeParameterElement element, @Nullable Element otherElement)
- Specified by:
visitTypeParameter
in interfaceElementVisitor<R,Element>
- Overrides:
visitTypeParameter
in classSimpleElementVisitor6<R,Element>
-
visitTypeParameter
protected R visitTypeParameter(@Nonnull TypeParameterElement element, @Nonnull TypeParameterElement otherElement)
-
visitUnknown
public R visitUnknown(@Nonnull Element element, @Nullable Element otherElement)
- Specified by:
visitUnknown
in interfaceElementVisitor<R,Element>
- Overrides:
visitUnknown
in classAbstractElementVisitor6<R,Element>
-
-