Class AnnotationMemberReflection

java.lang.Object
io.micronaut.python.processing.annotation.AnnotationMemberReflection

@Internal public final class AnnotationMemberReflection extends Object
The one place the Python processor reads a loaded annotation class: the bare parser (no javac) resolves Java annotation types as loaded classes, so their members can only be read reflectively. Lives in this package because it is the package allowed to read classes (see config/checkstyle/reflection-import-control.xml).
Since:
5.2.0
  • Method Details

    • memberReturnTypeNames

      public static List<String> memberReturnTypeNames(Class<?> annotationType)
      The declared return type names of an annotation class's members, as Class.getName() spells them (example.Nested, [Lexample.Nested;).
      Parameters:
      annotationType - The loaded annotation type
      Returns:
      The member return type names
    • valueMemberTypeName

      @Nullable public static @Nullable String valueMemberTypeName(Class<?> annotationType)
      The return type name of the value member of an annotation class, as Class.getTypeName() spells it (java.lang.Class, java.lang.String[]).
      Parameters:
      annotationType - The loaded annotation type
      Returns:
      The type name, or null when the annotation has no value member