use of org.mapstruct.ap.internal.util.AnnotationProcessingException in project mapstruct by mapstruct.
the class MethodRetrievalProcessor method process.
@Override
public List<SourceMethod> process(ProcessorContext context, TypeElement mapperTypeElement, Void sourceModel) {
this.messager = context.getMessager();
this.typeFactory = context.getTypeFactory();
this.accessorNaming = context.getAccessorNaming();
this.typeUtils = context.getTypeUtils();
this.elementUtils = context.getElementUtils();
this.enumTransformationStrategies = context.getEnumTransformationStrategies();
this.options = context.getOptions();
this.messager.note(0, Message.PROCESSING_NOTE, mapperTypeElement);
MapperOptions mapperOptions = MapperOptions.getInstanceOn(mapperTypeElement, context.getOptions());
if (mapperOptions.hasMapperConfig()) {
this.messager.note(0, Message.CONFIG_NOTE, mapperOptions.mapperConfigType().asElement().getSimpleName());
}
if (!mapperOptions.isValid()) {
throw new AnnotationProcessingException("Couldn't retrieve @Mapper annotation", mapperTypeElement, mapperOptions.getAnnotationMirror());
}
List<SourceMethod> prototypeMethods = retrievePrototypeMethods(mapperTypeElement, mapperOptions);
return retrieveMethods(mapperTypeElement, mapperTypeElement, mapperOptions, prototypeMethods);
}
Aggregations