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:
visitPackagein interfaceElementVisitor<R,Element>- Overrides:
visitPackagein 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:
visitTypein interfaceElementVisitor<R,Element>- Overrides:
visitTypein 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:
visitVariablein interfaceElementVisitor<R,Element>- Overrides:
visitVariablein 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:
visitExecutablein interfaceElementVisitor<R,Element>- Overrides:
visitExecutablein 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:
visitTypeParameterin interfaceElementVisitor<R,Element>- Overrides:
visitTypeParameterin 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:
visitUnknownin interfaceElementVisitor<R,Element>- Overrides:
visitUnknownin classAbstractElementVisitor6<R,Element>
-
-