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
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumThe access type for bean properties. -
Field Summary
Fields inherited from interface io.micronaut.core.annotation.AnnotationMetadata
CLASS_NAME_SUFFIX, EMPTY_METADATA, VALUE_MEMBERFields inherited from interface io.micronaut.core.annotation.AnnotationSource
EMPTYFields inherited from interface io.micronaut.inject.ast.Element
EMPTY_ELEMENT_ARRAYFields 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.AccessKinddefault Optional<? extends MemberElement>default Optional<MethodElement>default Optional<ClassElement>default Optional<AnnotationMetadata>getType()default PropertyElement.AccessKinddefault Optional<? extends MemberElement>default Optional<MethodElement>default Optional<ClassElement>default Optional<AnnotationMetadata>default booleanReturn true the property is excluded.default booleanReturn true only if the property has a getter but no setter.default booleanReturn true only if the property doesn't support modifying the value.default booleanoverrides(PropertyElement overridden) Does this property override the given property.Methods inherited from interface io.micronaut.core.annotation.AnnotatedElement
isDeclaredNonNull, isDeclaredNullable, isNonNull, isNullableMethods inherited from interface io.micronaut.core.annotation.AnnotationMetadata
enumValuesSet, enumValuesSet, getValues, hasDeclaredStereotype, hasEvaluatedExpressions, hasStereotypeNonRepeating, isAnnotationPresent, isDeclaredAnnotationPresentMethods 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, synthesizeDeclaredAnnotationsByTypeMethods inherited from interface io.micronaut.core.annotation.AnnotationMetadataProvider
getAnnotationMetadataMethods 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, removeStereotypeMethods inherited from interface io.micronaut.inject.ast.MemberElement
getDeclaringType, getModifiers, getOwningType, hides, isAccessible, isAccessible, isAccessible, isReflectionRequired, isReflectionRequired, withAnnotationMetadataMethods inherited from interface io.micronaut.inject.ast.TypedElement
getArrayDimensions, getGenericType, isArray, isPrimitive, isVoid
-
Method Details
-
getType
- Specified by:
getTypein 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 writing 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
-
getReadType
- Returns:
- The read type.
- Since:
- 4.4.0
-
getWriteMember
- Returns:
- The member to write the property
- Since:
- 4.0.0
-
getWriteType
- Returns:
- The write type.
- Since:
- 4.4.0
-
getReadTypeAnnotationMetadata
- Returns:
- The read type annotation metadata.
- Since:
- 4.4.0
-
getWriteTypeAnnotationMetadata
- Returns:
- The write type annotation metadata.
- Since:
- 4.4.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
-