Interface FieldElement

All Superinterfaces:
AnnotatedElement, AnnotationMetadata, AnnotationMetadataDelegate, AnnotationMetadataProvider, AnnotationSource, Described, Element, MemberElement, MutableAnnotationMetadataDelegate<Element>, Named, TypedElement
All Known Subinterfaces:
BeanFieldElement, EnumConstantElement
All Known Implementing Classes:
GroovyEnumConstantElement, GroovyFieldElement

public interface FieldElement extends TypedElement, MemberElement
Stores data about an element that references a field.
Since:
1.0
Author:
James Kleeh
  • Method Details

    • getGenericField

      default ClassElement getGenericField()
      Obtain the generic type with the associated annotation metadata for the field.
      Returns:
      The generic field
    • getDescription

      @NonNull default @NonNull String getDescription(boolean simple)
      Description copied from interface: Described
      Allows returning a more simple description if requested.
      Specified by:
      getDescription in interface Described
      Specified by:
      getDescription in interface Element
      Parameters:
      simple - True if a simple description is required
      Returns:
      The simple description
    • withAnnotationMetadata

      default FieldElement withAnnotationMetadata(AnnotationMetadata annotationMetadata)
      Description copied from interface: Element
      Copies this element and overrides its annotations.
      Specified by:
      withAnnotationMetadata in interface Element
      Specified by:
      withAnnotationMetadata in interface MemberElement
      Parameters:
      annotationMetadata - The annotation metadata
      Returns:
      A new element
    • hides

      default boolean hides(@NonNull @NonNull MemberElement memberElement)
      Description copied from interface: MemberElement
      Checks if this member element hides another.
      Specified by:
      hides in interface MemberElement
      Parameters:
      memberElement - The possibly hidden element
      Returns:
      true if this member element hides passed field element