diff --git a/tweed5/annotation-inheritance/src/main/java/de/siphalor/tweed5/annotationinheritance/api/AnnotationInheritanceAwareAnnotatedElement.java b/tweed5/annotation-inheritance/src/main/java/de/siphalor/tweed5/annotationinheritance/api/AnnotationInheritanceAwareAnnotatedElement.java index 86ff447..0d349f5 100644 --- a/tweed5/annotation-inheritance/src/main/java/de/siphalor/tweed5/annotationinheritance/api/AnnotationInheritanceAwareAnnotatedElement.java +++ b/tweed5/annotation-inheritance/src/main/java/de/siphalor/tweed5/annotationinheritance/api/AnnotationInheritanceAwareAnnotatedElement.java @@ -82,6 +82,15 @@ public class AnnotationInheritanceAwareAnnotatedElement implements AnnotatedElem return inner.getDeclaredAnnotations(); } + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()).append('['); + getOrResolveAnnotations().forEach(annotation -> + sb.append(annotation).append(';') + ); + return sb.append(']').toString(); + } + private ClassToInstanceMap getOrResolveAnnotations() { if (resolvedAnnotations == null) { resolvedAnnotations = new AnnotationInheritanceResolver(inner).resolve();