Interface PropertyElement

All Superinterfaces:
AnnotatedElement, AnnotationMetadata, AnnotationMetadataDelegate, AnnotationMetadataProvider, AnnotationSource, Described, Element, MemberElement, MutableAnnotationMetadataDelegate<Element>, Named, TypedElement

public interface PropertyElement extends TypedElement, MemberElement
A property element represents a JavaBean property on a ClassElement.
Since:
1.0
Author:
graemerocher
  • Method Details

    • getType

      Specified by:
      getType in interface TypedElement
      Returns:
      The type of the property
    • isExcluded

      default boolean isExcluded()
      Return true the property is excluded.
      Returns:
      True if the property is excluded
      Since:
      4.0.0
    • isReadOnly

      default boolean isReadOnly()
      Return true only if the property has a getter but no setter.
      Returns:
      True if the property is read only.
    • isWriteOnly

      default boolean isWriteOnly()
      Return true only if the property doesn't support modifying the value.
      Returns:
      True if the property is write only.
      Since:
      4.0.0
    • getField

      default Optional<FieldElement> getField()
      The field representing the property. NOTE: The field can be returned even if getter/setter are present.
      Returns:
      The field
      Since:
      4.0.0
    • getWriteMethod

      default Optional<MethodElement> getWriteMethod()
      Returns:
      The method to write the property
      Since:
      4.0.0
    • getReadMethod

      default Optional<MethodElement> getReadMethod()
      Returns:
      The method to read the property
    • getReadMember

      default Optional<? extends MemberElement> getReadMember()
      Returns:
      The member to read the property
      Since:
      4.0.0
    • getWriteMember

      default Optional<? extends MemberElement> getWriteMember()
      Returns:
      The member to write the property
      Since:
      4.0.0
    • getReadAccessKind

      default PropertyElement.AccessKind getReadAccessKind()
      Returns:
      The read access kind of the property
      Since:
      4.0.0
    • getWriteAccessKind

      default PropertyElement.AccessKind getWriteAccessKind()
      Returns:
      The write access kind of the property
      Since:
      4.0.0
    • overrides

      default boolean overrides(PropertyElement overridden)
      Does a this property override the given property. Supported only with languages that have native properties.
      Parameters:
      overridden - The overridden method.
      Returns:
      True this property overrides the given property.
      Since:
      4.0.0