Package nl.datasteel.crudcraft.codegen
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.
- 
Field SummaryFields inherited from class javax.annotation.processing.AbstractProcessorprocessingEnv
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidInitializes the processor with the processing environment.booleanprocess(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) Processes the annotations found in the current round.Methods inherited from class javax.annotation.processing.AbstractProcessorgetCompletions, getSupportedAnnotationTypes, getSupportedOptions, getSupportedSourceVersion, isInitialized
- 
Constructor Details- 
CrudCraftProcessorpublic CrudCraftProcessor()
 
- 
- 
Method Details- 
initInitializes the processor with the processing environment. This method is called by the annotation processing framework before any processing occurs.- Specified by:
- initin interface- Processor
- Overrides:
- initin class- AbstractProcessor
- Parameters:
- env- The processing environment provided by the framework.
 
- 
processProcesses 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:
- processin interface- Processor
- Specified by:
- processin 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.
 
 
-