Search in sources :

Example 1 with MappingResolverImpl

use of org.mapstruct.ap.internal.processor.creation.MappingResolverImpl in project mapstruct by mapstruct.

the class MapperCreationProcessor method process.

@Override
public Mapper process(ProcessorContext context, TypeElement mapperTypeElement, List<SourceMethod> sourceModel) {
    this.elementUtils = context.getElementUtils();
    this.typeUtils = context.getTypeUtils();
    this.messager = context.getMessager();
    this.options = context.getOptions();
    this.versionInformation = context.getVersionInformation();
    this.typeFactory = context.getTypeFactory();
    MapperConfiguration mapperConfig = MapperConfiguration.getInstanceOn(mapperTypeElement);
    List<MapperReference> mapperReferences = initReferencedMappers(mapperTypeElement, mapperConfig);
    MappingBuilderContext ctx = new MappingBuilderContext(typeFactory, elementUtils, typeUtils, messager, options, new MappingResolverImpl(messager, elementUtils, typeUtils, typeFactory, new ArrayList<Method>(sourceModel), mapperReferences), mapperTypeElement, // Consider removing those methods directly into MappingBuilderContext.
    Collections.unmodifiableList(sourceModel), mapperReferences);
    this.mappingContext = ctx;
    return getMapper(mapperTypeElement, mapperConfig, sourceModel);
}
Also used : MappingBuilderContext(org.mapstruct.ap.internal.model.MappingBuilderContext) MappingResolverImpl(org.mapstruct.ap.internal.processor.creation.MappingResolverImpl) DefaultMapperReference(org.mapstruct.ap.internal.model.DefaultMapperReference) MapperReference(org.mapstruct.ap.internal.model.MapperReference) ArrayList(java.util.ArrayList) MapperConfiguration(org.mapstruct.ap.internal.util.MapperConfiguration)

Aggregations

ArrayList (java.util.ArrayList)1 DefaultMapperReference (org.mapstruct.ap.internal.model.DefaultMapperReference)1 MapperReference (org.mapstruct.ap.internal.model.MapperReference)1 MappingBuilderContext (org.mapstruct.ap.internal.model.MappingBuilderContext)1 MappingResolverImpl (org.mapstruct.ap.internal.processor.creation.MappingResolverImpl)1 MapperConfiguration (org.mapstruct.ap.internal.util.MapperConfiguration)1