Class MethodRetrievalProcessor
- java.lang.Object
-
- org.mapstruct.ap.internal.processor.MethodRetrievalProcessor
-
- All Implemented Interfaces:
ModelElementProcessor<Void,List<SourceMethod>>
public class MethodRetrievalProcessor extends Object implements ModelElementProcessor<Void,List<SourceMethod>>
AModelElementProcessor
which retrieves a list ofSourceMethod
s representing all the mapping methods of the given bean mapper type as well as all referenced mapper methods declared by other mappers referenced by the current mapper.- Author:
- Gunnar Morling
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.mapstruct.ap.internal.processor.ModelElementProcessor
ModelElementProcessor.ProcessorContext
-
-
Constructor Summary
Constructors Constructor Description MethodRetrievalProcessor()
-
Method Summary
All Methods Instance Methods Concrete 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).List<SourceMethod>
process(ModelElementProcessor.ProcessorContext context, TypeElement mapperTypeElement, Void sourceModel)
Processes the given source element, representing a Java bean mapper in one form or another.
-
-
-
Method Detail
-
process
public List<SourceMethod> process(ModelElementProcessor.ProcessorContext context, TypeElement mapperTypeElement, Void sourceModel)
Description copied from interface:ModelElementProcessor
Processes the given source element, representing a Java bean mapper in one form or another.- Specified by:
process
in interfaceModelElementProcessor<Void,List<SourceMethod>>
- 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
public int getPriority()
Description copied from interface:ModelElementProcessor
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.- Specified by:
getPriority
in interfaceModelElementProcessor<Void,List<SourceMethod>>
- Returns:
- The priority value of this processor.
-
-