Interface TypeElementVisitor<C,E>

Type Parameters:
C - The annotation required on the class. Use Object for all classes.
E - The annotation required on the element. Use Object for all elements.
All Superinterfaces:
Ordered, Toggleable
All Known Subinterfaces:
ExpressionEvaluationContextRegistrar
All Known Implementing Classes:
AsyncTypeElementVisitor, BeanImportVisitor, ConfigurationReaderVisitor, ContextConfigurerVisitor, ContextRegistrar, ExecutableVisitor, FilterVisitor, GraalTypeElementVisitor, InternalApiTypeElementVisitor, IntrospectedTypeElementVisitor, MapperVisitor, RouteValidationVisitor, WebSocketVisitor

public interface TypeElementVisitor<C,E> extends Ordered, Toggleable
Provides a hook into the compilation process to allow user defined functionality to be created at compile time.
Since:
1.0
Author:
James Kleeh
  • Method Details

    • visitClass

      default void visitClass(ClassElement element, VisitorContext context)
      Executed when a class is encountered that matches the <C> generic.
      Parameters:
      element - The element
      context - The visitor context
    • visitMethod

      default void visitMethod(MethodElement element, VisitorContext context)
      Executed when a method is encountered that matches the <E> generic.
      Parameters:
      element - The element
      context - The visitor context
    • visitConstructor

      default void visitConstructor(ConstructorElement element, VisitorContext context)
      Executed when a constructor is encountered that matches the <C> generic.
      Parameters:
      element - The element
      context - The visitor context
    • visitField

      default void visitField(FieldElement element, VisitorContext context)
      Executed when a field is encountered that matches the <E> generic.
      Parameters:
      element - The element
      context - The visitor context
    • visitEnumConstant

      default void visitEnumConstant(EnumConstantElement element, VisitorContext context)
      Executed when an enum constant is encountered that matches the <E> generic.
      Parameters:
      element - The element
      context - The visitor context
      Since:
      3.6.0
    • start

      default void start(VisitorContext visitorContext)
      Called once when visitor processing starts.
      Parameters:
      visitorContext - The visitor context
    • finish

      default void finish(VisitorContext visitorContext)
      Called once when visitor processing finishes.
      Parameters:
      visitorContext - The visitor context
    • getSupportedAnnotationNames

      default Set<String> getSupportedAnnotationNames()
      Returns:
      The supported default annotation names.
    • getClassType

      default String getClassType()
    • getElementType

      default String getElementType()
    • getSupportedOptions

      default Set<String> getSupportedOptions()
      Called once when processor loads. Used to expose visitors custom processor options.
      Returns:
      Set with custom options
    • getVisitorKind

      Returns:
      The visitor kind.