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
{{ message }}
Repository navigation
Allow inherited DelegatingConverter to be processed #104
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.
Activity
Chessray commentedon Feb 12, 2024
Logically speaking, the second portion (generating the Delegating Converter) would need to happen inside the Processor for the
@Mapperannotation. This goes a bit against how we're doing things at the moment. Not sure whether this is feasible.