Interface ModelElementProcessor<P,R>
-
- Type Parameters:
P
- The parameter type processed by this processorR
- The return type created by this processor
- All Known Implementing Classes:
AnnotationBasedComponentModelProcessor
,CdiComponentProcessor
,JakartaCdiComponentProcessor
,JakartaComponentProcessor
,Jsr330ComponentProcessor
,MapperCreationProcessor
,MapperRenderingProcessor
,MapperServiceProcessor
,MethodRetrievalProcessor
,SpringComponentProcessor
public interface ModelElementProcessor<P,R>
A processor which performs one task of the mapper generation, e.g. retrieving methods from the sourceTypeElement
, performing validity checks or generating the output source file.- Author:
- Gunnar Morling
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
ModelElementProcessor.ProcessorContext
Context object passed toprocess(ProcessorContext, TypeElement, Object)
providing access to common infrastructure objects such asTypeUtils
etc.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getPriority()
Returns the priority value of this processor which must be between 1 (highest priority) and 10000 (lowest priority).R
process(ModelElementProcessor.ProcessorContext context, TypeElement mapperTypeElement, P sourceModel)
Processes the given source element, representing a Java bean mapper in one form or another.
-
-
-
Method Detail
-
process
R process(ModelElementProcessor.ProcessorContext context, TypeElement mapperTypeElement, P sourceModel)
Processes the given source element, representing a Java bean mapper in one form or another.- Parameters:
context
- Context providing common infrastructure objects.mapperTypeElement
- The original type element from which the given mapper object is derived.sourceModel
- The current representation of the bean mapper. Nevernull
(the very first processor receives the original type element).- Returns:
- The resulting representation of the bean mapper; may be the same
as the source representation, e.g. if a given implementation just
performs some sort of validity check. Implementations must never
return
null
except for the very last processor which generates the resulting Java source file.
-
getPriority
int getPriority()
Returns the priority value of this processor which must be between 1 (highest priority) and 10000 (lowest priority). Processors are invoked in order from highest to lowest priority, starting with the mapping method retrieval processor (priority 1) and finishing with the code generation processor (priority 10000). Processors working on the builtMapper
model must have a priority > 1000.- Returns:
- The priority value of this processor.
-
-