Class CrudCraftProcessor

java.lang.Object
javax.annotation.processing.AbstractProcessor
nl.datasteel.crudcraft.codegen.CrudCraftProcessor
All Implemented Interfaces:
Processor

@AutoService(javax.annotation.processing.Processor.class) @SupportedAnnotationTypes({"nl.datasteel.crudcraft.annotations.classes.CrudCrafted","nl.datasteel.crudcraft.annotations.classes.CrudCraftExtension","nl.datasteel.crudcraft.annotations.fields.Dto","nl.datasteel.crudcraft.annotations.fields.Request","nl.datasteel.crudcraft.annotations.fields.Response","nl.datasteel.crudcraft.annotations.fields.Searchable","jakarta.persistence.Embeddable"}) @SupportedSourceVersion(RELEASE_21) public class CrudCraftProcessor extends AbstractProcessor
Annotation processor for CrudCraft. This processor scans for classes annotated with CrudCrafted and Embeddable, and generates the necessary code based on the annotations present. It supports various annotations related to CRUD operations, including Dto, Request, Response, Searchable, and others.
  • Constructor Details

    • CrudCraftProcessor

      public CrudCraftProcessor()
  • Method Details

    • init

      public void init(ProcessingEnvironment env)
      Initializes the processor with the processing environment. This method is called by the annotation processing framework before any processing occurs.
      Specified by:
      init in interface Processor
      Overrides:
      init in class AbstractProcessor
      Parameters:
      env - The processing environment provided by the framework.
    • process

      public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv)
      Processes the annotations found in the current round. It collects all model descriptors from classes annotated with CrudCrafted and Embeddable, and writes the generated code using the WriterRegistry.
      Specified by:
      process in interface Processor
      Specified by:
      process in class AbstractProcessor
      Parameters:
      annotations - The set of annotations to process.
      roundEnv - The current round environment.
      Returns:
      true if the annotations were processed successfully, false otherwise.