Package io.micronaut.inject.ast
Interface PropertyElement
- All Superinterfaces:
AnnotatedElement
,AnnotationMetadata
,AnnotationMetadataDelegate
,AnnotationMetadataProvider
,AnnotationSource
,Described
,Element
,MemberElement
,MutableAnnotationMetadataDelegate<Element>
,Named
,TypedElement
A property element represents a JavaBean property on a
ClassElement
.- Since:
- 1.0
- Author:
- graemerocher
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
The access type for bean properties. -
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
Fields inherited from interface io.micronaut.inject.ast.Element
EMPTY_ELEMENT_ARRAY
Fields inherited from interface io.micronaut.inject.ast.annotation.MutableAnnotationMetadataDelegate
EMPTY
-
Method Summary
Modifier and TypeMethodDescriptiondefault Optional<FieldElement>
getField()
The field representing the property.default PropertyElement.AccessKind
default Optional<? extends MemberElement>
default Optional<MethodElement>
getType()
default PropertyElement.AccessKind
default Optional<? extends MemberElement>
default Optional<MethodElement>
default boolean
Return true the property is excluded.default boolean
Return true only if the property has a getter but no setter.default boolean
Return true only if the property doesn't support modifying the value.default boolean
overrides
(PropertyElement overridden) Does this property override the given property.Methods inherited from interface io.micronaut.core.annotation.AnnotatedElement
isDeclaredNonNull, isDeclaredNullable, isNonNull, isNullable
Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadata
enumValuesSet, enumValuesSet, getValues, hasDeclaredStereotype, hasEvaluatedExpressions, hasStereotypeNonRepeating, isAnnotationPresent, isDeclaredAnnotationPresent
Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadataDelegate
booleanValue, booleanValue, booleanValue, booleanValue, classValue, classValue, classValue, classValue, classValues, classValues, classValues, classValues, copyAnnotationMetadata, 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, getAnnotationValuesByName, getAnnotationValuesByStereotype, getAnnotationValuesByType, getDeclaredAnnotation, getDeclaredAnnotation, getDeclaredAnnotationNameByStereotype, getDeclaredAnnotationNames, getDeclaredAnnotationNamesByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationValuesByName, getDeclaredAnnotationValuesByType, getDeclaredMetadata, getDeclaredStereotypeAnnotationNames, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValues, getStereotypeAnnotationNames, getTargetAnnotationMetadata, 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
Methods inherited from interface io.micronaut.inject.ast.Element
annotate, annotate, annotate, annotate, annotate, getDescription, getDescription, getDocumentation, getName, getNativeType, getSimpleName, isAbstract, isFinal, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, isSynthetic, removeAnnotation, removeAnnotation, removeAnnotationIf, removeStereotype, removeStereotype
Methods inherited from interface io.micronaut.inject.ast.MemberElement
getDeclaringType, getModifiers, getOwningType, hides, isAccessible, isAccessible, isReflectionRequired, isReflectionRequired, withAnnotationMetadata
Methods inherited from interface io.micronaut.inject.ast.TypedElement
getArrayDimensions, getGenericType, isArray, isPrimitive, isVoid
-
Method Details
-
getType
- Specified by:
getType
in interfaceTypedElement
- 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
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
- Returns:
- The method to write the property
- Since:
- 4.0.0
-
getReadMethod
- Returns:
- The method to read the property
-
getReadMember
- Returns:
- The member to read the property
- Since:
- 4.0.0
-
getWriteMember
- Returns:
- The member to write the property
- Since:
- 4.0.0
-
getReadAccessKind
- Returns:
- The read access kind of the property
- Since:
- 4.0.0
-
getWriteAccessKind
- Returns:
- The write access kind of the property
- Since:
- 4.0.0
-
overrides
Does 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
-