Class CdiComponentProcessor
- java.lang.Object
-
- org.mapstruct.ap.internal.processor.AnnotationBasedComponentModelProcessor
-
- org.mapstruct.ap.internal.processor.CdiComponentProcessor
-
- All Implemented Interfaces:
ModelElementProcessor<Mapper,Mapper>
public class CdiComponentProcessor extends AnnotationBasedComponentModelProcessor
AModelElementProcessor
which converts the givenMapper
object into an application-scoped CDI bean in case CDI is configured as the target component model for this 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 CdiComponentProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
additionalPublicEmptyConstructor()
protected String
getComponentModelIdentifier()
protected List<Annotation>
getMapperReferenceAnnotations()
protected List<Annotation>
getTypeAnnotations(Mapper mapper)
protected boolean
requiresGenerationOfDecoratorClass()
-
Methods inherited from class org.mapstruct.ap.internal.processor.AnnotationBasedComponentModelProcessor
adjustDecorator, getDecoratorAnnotations, getDelegatorReferenceAnnotations, getPriority, getTypeFactory, process, replacementMapperReference
-
-
-
-
Method Detail
-
getComponentModelIdentifier
protected String getComponentModelIdentifier()
- Specified by:
getComponentModelIdentifier
in classAnnotationBasedComponentModelProcessor
- Returns:
- the component model identifier
-
getTypeAnnotations
protected List<Annotation> getTypeAnnotations(Mapper mapper)
- Specified by:
getTypeAnnotations
in classAnnotationBasedComponentModelProcessor
- Parameters:
mapper
- the mapper- Returns:
- the annotation(s) to be added at the mapper type implementation
-
getMapperReferenceAnnotations
protected List<Annotation> getMapperReferenceAnnotations()
- Specified by:
getMapperReferenceAnnotations
in classAnnotationBasedComponentModelProcessor
- Returns:
- the annotation of the field for the mapper reference
-
requiresGenerationOfDecoratorClass
protected boolean requiresGenerationOfDecoratorClass()
- Specified by:
requiresGenerationOfDecoratorClass
in classAnnotationBasedComponentModelProcessor
- Returns:
- if a decorator (sub-)class needs to be generated or not
-
additionalPublicEmptyConstructor
protected boolean additionalPublicEmptyConstructor()
- Overrides:
additionalPublicEmptyConstructor
in classAnnotationBasedComponentModelProcessor
-
-