C
- The annotation required on the class. Use Object
for all classes.E
- The annotation required on the element. Use Object
for all elements.public interface TypeElementVisitor<C,E> extends Ordered, Toggleable
Modifier and Type | Interface and Description |
---|---|
static class |
TypeElementVisitor.VisitorKind
Implementors of the
TypeElementVisitor interface should specify what kind of visitor it is. |
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Modifier and Type | Method and Description |
---|---|
default void |
finish(VisitorContext visitorContext)
Called once when visitor processing finishes.
|
default String |
getClassType() |
default String |
getElementType() |
default Set<String> |
getSupportedAnnotationNames() |
default Set<String> |
getSupportedOptions()
Called once when processor loads.
|
default TypeElementVisitor.VisitorKind |
getVisitorKind() |
default void |
start(VisitorContext visitorContext)
Called once when visitor processing starts.
|
default void |
visitClass(ClassElement element,
VisitorContext context)
Executed when a class is encountered that matches the <C> generic.
|
default void |
visitConstructor(ConstructorElement element,
VisitorContext context)
Executed when a constructor is encountered that matches the <C> generic.
|
default void |
visitEnumConstant(EnumConstantElement element,
VisitorContext context)
Executed when a enum constant is encountered that matches the <E> generic.
|
default void |
visitField(FieldElement element,
VisitorContext context)
Executed when a field is encountered that matches the <E> generic.
|
default void |
visitMethod(MethodElement element,
VisitorContext context)
Executed when a method is encountered that matches the <E> generic.
|
isEnabled
default void visitClass(ClassElement element, VisitorContext context)
element
- The elementcontext
- The visitor contextdefault void visitMethod(MethodElement element, VisitorContext context)
element
- The elementcontext
- The visitor contextdefault void visitConstructor(ConstructorElement element, VisitorContext context)
element
- The elementcontext
- The visitor contextdefault void visitField(FieldElement element, VisitorContext context)
element
- The elementcontext
- The visitor contextdefault void visitEnumConstant(EnumConstantElement element, VisitorContext context)
element
- The elementcontext
- The visitor contextdefault void start(VisitorContext visitorContext)
visitorContext
- The visitor contextdefault void finish(VisitorContext visitorContext)
visitorContext
- The visitor contextdefault Set<String> getSupportedAnnotationNames()
default String getClassType()
default String getElementType()
default Set<String> getSupportedOptions()
@NonNull default TypeElementVisitor.VisitorKind getVisitorKind()