You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to modify the annotation processor to support custom Converter interface but I don't know how to process DelegatingConverter by inheritance.
New code in ConverterMapperProcessor:
delegatingConverterDescriptors =
annotations.stream()
.filter(ConverterMapperProcessor::isDelegatingConverterAnnotation)
.map(roundEnv::getElementsAnnotatedWith)
.flatMap(Set::stream)
.map(ExecutableElement.class::cast)
// Do not generate delegate without Mapper annotation on class
.filter(annotatedMethod -> annotatedMethod.getEnclosingElement().getAnnotationMirrors().stream().anyMatch(x -> x.getAnnotationType().toString().equals(MAPPER)))
.map(annotatedMethod -> newDelegatingConverterDescriptor(annotatedMethod, processingEnv))
.collect(toList());
Logically speaking, the second portion (generating the Delegating Converter) would need to happen inside the Processor for the @Mapper annotation. This goes a bit against how we're doing things at the moment. Not sure whether this is feasible.
Related to #101
Hi,
I am trying to modify the annotation processor to support custom Converter interface but I don't know how to process DelegatingConverter by inheritance.
New code in
ConverterMapperProcessor
:Custom converter:
Mapper:
Delegate:
Wanted mapper:
Thanks
The text was updated successfully, but these errors were encountered: