Class SpringComponentProcessor
java.lang.Object
org.mapstruct.ap.internal.processor.AnnotationBasedComponentModelProcessor
org.mapstruct.ap.internal.processor.SpringComponentProcessor
- All Implemented Interfaces:
ModelElementProcessor<Mapper,Mapper>
A
ModelElementProcessor which converts the given Mapper
object into a Spring bean in case Spring is configured as the
target component model for this mapper.- Author:
- Gunnar Morling, Andreas Gudian
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.mapstruct.ap.internal.processor.ModelElementProcessor
ModelElementProcessor.ProcessorContext -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Stringprotected List<Annotation> getDecoratorAnnotations(Decorator decorator) Returns the annotations that need to be added to the generated decorator, filtering out any annotations that are already present or represented as meta-annotations.protected List<Annotation> protected List<Annotation> protected List<Annotation> getTypeAnnotations(Mapper mapper) protected booleanMethods inherited from class org.mapstruct.ap.internal.processor.AnnotationBasedComponentModelProcessor
additionalPublicEmptyConstructor, adjustDecorator, getPriority, getTypeFactory, process, replacementMapperReference
-
Constructor Details
-
SpringComponentProcessor
public SpringComponentProcessor()
-
-
Method Details
-
getComponentModelIdentifier
- Specified by:
getComponentModelIdentifierin classAnnotationBasedComponentModelProcessor- Returns:
- the component model identifier
-
getTypeAnnotations
- Specified by:
getTypeAnnotationsin classAnnotationBasedComponentModelProcessor- Parameters:
mapper- the mapper- Returns:
- the annotation(s) to be added at the mapper type implementation
-
getDecoratorAnnotations
Returns the annotations that need to be added to the generated decorator, filtering out any annotations that are already present or represented as meta-annotations.- Overrides:
getDecoratorAnnotationsin classAnnotationBasedComponentModelProcessor- Parameters:
decorator- the decorator to process- Returns:
- A list of annotations that should be added to the generated decorator.
-
getMapperReferenceAnnotations
- Specified by:
getMapperReferenceAnnotationsin classAnnotationBasedComponentModelProcessor- Returns:
- the annotation of the field for the mapper reference
-
getDelegatorReferenceAnnotations
- Overrides:
getDelegatorReferenceAnnotationsin classAnnotationBasedComponentModelProcessor
-
requiresGenerationOfDecoratorClass
protected boolean requiresGenerationOfDecoratorClass()- Specified by:
requiresGenerationOfDecoratorClassin classAnnotationBasedComponentModelProcessor- Returns:
- if a decorator (sub-)class needs to be generated or not
-