Interface MemberElement

    • Field Summary

      • Fields inherited from interface io.micronaut.core.annotation.AnnotationMetadata

        CLASS_NAME_SUFFIX, EMPTY_METADATA, VALUE_MEMBER
      • Fields inherited from interface io.micronaut.core.annotation.AnnotationSource

        EMPTY
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      ClassElement getDeclaringType()  
      default java.util.Set<ElementModifier> getModifiers()  
      default ClassElement getOwningType()
      The owing type is the type that owns this element.
      default boolean isAccessible()
      Returns whether this member element can be invoked or retrieved at runtime.
      default boolean isAccessible​(ClassElement callingType)
      Returns whether this member element can be invoked or retrieved at runtime.
      default boolean isReflectionRequired()
      Returns whether this member element will require reflection to invoke or retrieve at runtime.
      default boolean isReflectionRequired​(ClassElement callingType)
      Returns whether this member element will require reflection to invoke or retrieve at runtime.
      • Methods inherited from interface io.micronaut.core.annotation.AnnotatedElement

        isDeclaredNonNull, isDeclaredNullable, isNonNull, isNullable
      • Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadata

        getAnnotationValuesByName, getAnnotationValuesByStereotype, getDeclaredAnnotationValuesByName, getValues, hasDeclaredStereotype, isAnnotationPresent, isDeclaredAnnotationPresent
      • Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadataDelegate

        booleanValue, booleanValue, booleanValue, booleanValue, classValue, classValue, classValue, classValue, classValues, classValues, classValues, classValues, doubleValue, doubleValue, doubleValue, enumValue, enumValue, enumValue, enumValue, enumValues, enumValues, enumValues, enumValues, findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, findRepeatableAnnotation, findRepeatableAnnotation, getAnnotation, getAnnotation, getAnnotationNameByStereotype, getAnnotationNameByStereotype, getAnnotationNames, getAnnotationNamesByStereotype, getAnnotationNamesByStereotype, getAnnotationType, getAnnotationType, getAnnotationTypeByStereotype, getAnnotationTypeByStereotype, getAnnotationTypesByStereotype, getAnnotationTypesByStereotype, getAnnotationTypesByStereotype, getAnnotationValuesByType, getDeclaredAnnotation, getDeclaredAnnotation, getDeclaredAnnotationNameByStereotype, getDeclaredAnnotationNames, getDeclaredAnnotationNamesByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationValuesByType, getDeclaredMetadata, getDeclaredStereotypeAnnotationNames, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValues, getStereotypeAnnotationNames, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValues, getValues, hasAnnotation, hasAnnotation, hasDeclaredAnnotation, hasDeclaredAnnotation, hasDeclaredStereotype, hasDeclaredStereotype, hasDeclaredStereotype, hasPropertyExpressions, hasSimpleAnnotation, hasSimpleDeclaredAnnotation, hasStereotype, hasStereotype, hasStereotype, hasStereotype, intValue, intValue, intValue, isAnnotationPresent, isDeclaredAnnotationPresent, isEmpty, isFalse, isFalse, isPresent, isPresent, isRepeatableAnnotation, isRepeatableAnnotation, isTrue, isTrue, longValue, longValue, stringValue, stringValue, stringValue, stringValue, stringValues, stringValues, stringValues, stringValues, synthesize, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByType
      • Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadataProvider

        getAnnotationMetadata
    • Method Detail

      • getDeclaringType

        ClassElement getDeclaringType()
        Returns:
        The declaring type of the element.
      • getOwningType

        default ClassElement getOwningType()
        The owing type is the type that owns this element. This can differ from getDeclaringType() in the case of inheritance since this method will return the subclass that owners the inherited member, whilst getDeclaringType() will return the super class that declares the type.
        Returns:
        The owning type.
      • isReflectionRequired

        default boolean isReflectionRequired()
        Returns whether this member element will require reflection to invoke or retrieve at runtime.

        This method uses getOwningType() as the calling type for this method.

        Returns:
        Will return true if reflection is required.
        Since:
        3.4.0
      • isReflectionRequired

        default boolean isReflectionRequired​(@NonNull
                                             ClassElement callingType)
        Returns whether this member element will require reflection to invoke or retrieve at runtime.
        Parameters:
        callingType - The calling type
        Returns:
        Will return true if reflection is required.
        Since:
        3.4.0
      • isAccessible

        default boolean isAccessible()
        Returns whether this member element can be invoked or retrieved at runtime. It can be accessible by a simple invocation or a reflection invocation.

        This method uses isReflectionRequired() with a checks if the reflection access is allowed. By checking for ReflectiveAccess annotation.

        Returns:
        Will return true if is accessible.
        Since:
        3.7.0
      • isAccessible

        default boolean isAccessible​(@NonNull
                                     ClassElement callingType)
        Returns whether this member element can be invoked or retrieved at runtime. It can be accessible by a simple invocation or a reflection invocation.

        This method uses isReflectionRequired() with a checks if the reflection access is allowed. By checking for ReflectiveAccess annotation.

        Parameters:
        callingType - The calling type
        Returns:
        Will return true if is accessible.
        Since:
        3.7.0