Class ScalaPropertyElement
- All Implemented Interfaces:
io.micronaut.core.annotation.AnnotatedElement, io.micronaut.core.annotation.AnnotationMetadata, io.micronaut.core.annotation.AnnotationMetadataDelegate, io.micronaut.core.annotation.AnnotationMetadataProvider, io.micronaut.core.annotation.AnnotationSource, io.micronaut.core.naming.Described, io.micronaut.core.naming.Named, io.micronaut.inject.ast.annotation.MutableAnnotationMetadataDelegate<io.micronaut.inject.ast.Element>, io.micronaut.inject.ast.Element, io.micronaut.inject.ast.MemberElement, io.micronaut.inject.ast.PropertyElement, io.micronaut.inject.ast.TypedElement
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.micronaut.inject.ast.PropertyElement
io.micronaut.inject.ast.PropertyElement.AccessKind -
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 TypeMethodDescription<T extends Annotation>
io.micronaut.inject.ast.Elementannotate(io.micronaut.core.annotation.AnnotationValue<T> annotationValue) <T extends Annotation>
io.micronaut.inject.ast.Elementannotate(String annotationType, Consumer<io.micronaut.core.annotation.AnnotationValueBuilder<T>> consumer) protected Objectprotected Class<?> booleanio.micronaut.core.annotation.AnnotationMetadataprotected io.micronaut.inject.ast.annotation.MutableAnnotationMetadataDelegate<?> io.micronaut.inject.ast.ClassElementgetDocumentation(boolean parse) The documentation of this property, falling back to the declaring class's tag for it.protected io.micronaut.inject.ast.annotation.ElementAnnotationMetadataOptional<io.micronaut.inject.ast.FieldElement> getField()Set<io.micronaut.inject.ast.ElementModifier> getName()io.micronaut.inject.ast.ClassElementio.micronaut.inject.ast.PropertyElement.AccessKindOptional<? extends io.micronaut.inject.ast.MemberElement> Optional<io.micronaut.inject.ast.MethodElement> io.micronaut.inject.ast.ClassElementgetType()io.micronaut.inject.ast.PropertyElement.AccessKindOptional<? extends io.micronaut.inject.ast.MemberElement> Optional<io.micronaut.inject.ast.MethodElement> inthashCode()protected booleanWhether an absent nullability annotation on this member means non-null.booleanbooleanbooleanisFinal()booleanbooleanbooleanbooleanbooleanisPublic()booleanbooleanisStatic()booleanio.micronaut.inject.ast.ElementremoveAnnotation(String annotationType) <T extends Annotation>
io.micronaut.inject.ast.ElementremoveAnnotationIf(Predicate<io.micronaut.core.annotation.AnnotationValue<T>> predicate) io.micronaut.inject.ast.ElementremoveStereotype(String annotationType) io.micronaut.inject.ast.PropertyElementwithAnnotationMetadata(io.micronaut.core.annotation.AnnotationMetadata annotationMetadata) Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.core.annotation.AnnotatedElement
isDeclaredNonNull, isDeclaredNullable, isNonNull, isNullableMethods inherited from interface io.micronaut.core.annotation.AnnotationMetadata
enumValuesSet, enumValuesSet, getValues, hasDeclaredStereotype, 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, hasEvaluatedExpressions, 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.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, hides, isAccessible, isAccessible, isAccessible, isReflectionRequired, isReflectionRequiredMethods inherited from interface io.micronaut.inject.ast.PropertyElement
getReadType, getReadTypeAnnotationMetadata, getWriteType, getWriteTypeAnnotationMetadata, overridesMethods inherited from interface io.micronaut.inject.ast.TypedElement
getArrayDimensions, getGenericType, isArray, isPrimitive, isVoid
-
Method Details
-
getType
public io.micronaut.inject.ast.ClassElement getType()- Specified by:
getTypein interfaceio.micronaut.inject.ast.PropertyElement- Specified by:
getTypein interfaceio.micronaut.inject.ast.TypedElement
-
getOwningType
public io.micronaut.inject.ast.ClassElement getOwningType()- Specified by:
getOwningTypein interfaceio.micronaut.inject.ast.MemberElement
-
getField
- Specified by:
getFieldin interfaceio.micronaut.inject.ast.PropertyElement
-
getWriteMethod
- Specified by:
getWriteMethodin interfaceio.micronaut.inject.ast.PropertyElement
-
getReadMethod
- Specified by:
getReadMethodin interfaceio.micronaut.inject.ast.PropertyElement
-
getReadMember
- Specified by:
getReadMemberin interfaceio.micronaut.inject.ast.PropertyElement
-
getWriteMember
- Specified by:
getWriteMemberin interfaceio.micronaut.inject.ast.PropertyElement
-
getDocumentation
The documentation of this property, falling back to the declaring class's tag for it.The inherited resolution looks where a property is documented in Java: on the field, or on the accessor. A Scala class parameter is documented in neither --
class Engine(val manufacturer: String)declares a property whose description belongs to the class, as a@paramtag, because that is the only place the author can write it. Without this a configuration class written the ordinary Scala way produces metadata with no descriptions at all, which is the whole reason to read documentation.- Specified by:
getDocumentationin interfaceio.micronaut.inject.ast.Element- Specified by:
getDocumentationin interfaceio.micronaut.inject.ast.PropertyElement- Parameters:
parse- Whether the comment may be parsed- Returns:
- The documentation for this property, if anything documents it
-
getAnnotationMetadata
public io.micronaut.core.annotation.AnnotationMetadata getAnnotationMetadata()- Specified by:
getAnnotationMetadatain interfaceio.micronaut.core.annotation.AnnotationMetadataProvider
-
getAnnotationMetadataToWrite
protected io.micronaut.inject.ast.annotation.MutableAnnotationMetadataDelegate<?> getAnnotationMetadataToWrite() -
withAnnotationMetadata
public io.micronaut.inject.ast.PropertyElement withAnnotationMetadata(io.micronaut.core.annotation.AnnotationMetadata annotationMetadata) - Specified by:
withAnnotationMetadatain interfaceio.micronaut.inject.ast.Element- Specified by:
withAnnotationMetadatain interfaceio.micronaut.inject.ast.MemberElement
-
getReadAccessKind
public io.micronaut.inject.ast.PropertyElement.AccessKind getReadAccessKind()- Specified by:
getReadAccessKindin interfaceio.micronaut.inject.ast.PropertyElement
-
getWriteAccessKind
public io.micronaut.inject.ast.PropertyElement.AccessKind getWriteAccessKind()- Specified by:
getWriteAccessKindin interfaceio.micronaut.inject.ast.PropertyElement
-
isExcluded
public boolean isExcluded()- Specified by:
isExcludedin interfaceio.micronaut.inject.ast.PropertyElement
-
isReadOnly
public boolean isReadOnly()- Specified by:
isReadOnlyin interfaceio.micronaut.inject.ast.PropertyElement
-
isWriteOnly
public boolean isWriteOnly()- Specified by:
isWriteOnlyin interfaceio.micronaut.inject.ast.PropertyElement
-
getDeclaringType
public io.micronaut.inject.ast.ClassElement getDeclaringType()- Specified by:
getDeclaringTypein interfaceio.micronaut.inject.ast.MemberElement
-
equalityKey
-
hasNullMarked
protected boolean hasNullMarked()Whether an absent nullability annotation on this member means non-null.`@NullMarked` annotates nothing itself: it changes what saying nothing means for everything inside it. Core leaves that to the language module -- `isNonNull()` on the shared `AnnotatedElement` only asks whether the stereotype is present -- and the Java module implements it by walking from the member out to its owning type. Without the same walk here, every unannotated member of a `@NullMarked` Scala class reported neither nullable nor non-null, so binding and validation treated it as unconstrained.
- Returns:
- true when this member, or the type declaring it, is null-marked
-
isNonNull
public boolean isNonNull()- Specified by:
isNonNullin interfaceio.micronaut.core.annotation.AnnotatedElement
-
rawDocumentation
-
getName
- Specified by:
getNamein interfaceio.micronaut.inject.ast.Element- Specified by:
getNamein interfaceio.micronaut.core.naming.Named
-
isProtected
public boolean isProtected()- Specified by:
isProtectedin interfaceio.micronaut.inject.ast.Element
-
isPublic
public boolean isPublic()- Specified by:
isPublicin interfaceio.micronaut.inject.ast.Element
-
isPrivate
public boolean isPrivate()- Specified by:
isPrivatein interfaceio.micronaut.inject.ast.Element
-
isPackagePrivate
public boolean isPackagePrivate()- Specified by:
isPackagePrivatein interfaceio.micronaut.inject.ast.Element
-
isAbstract
public boolean isAbstract()- Specified by:
isAbstractin interfaceio.micronaut.inject.ast.Element
-
isStatic
public boolean isStatic()- Specified by:
isStaticin interfaceio.micronaut.inject.ast.Element
-
isFinal
public boolean isFinal()- Specified by:
isFinalin interfaceio.micronaut.inject.ast.Element
-
getModifiers
- Specified by:
getModifiersin interfaceio.micronaut.inject.ast.Element
-
getNativeType
- Specified by:
getNativeTypein interfaceio.micronaut.inject.ast.Element
-
getElementAnnotationMetadata
protected io.micronaut.inject.ast.annotation.ElementAnnotationMetadata getElementAnnotationMetadata() -
annotate
public <T extends Annotation> io.micronaut.inject.ast.Element annotate(String annotationType, Consumer<io.micronaut.core.annotation.AnnotationValueBuilder<T>> consumer) - Specified by:
annotatein interfaceio.micronaut.inject.ast.Element- Specified by:
annotatein interfaceio.micronaut.inject.ast.annotation.MutableAnnotationMetadataDelegate<io.micronaut.inject.ast.Element>
-
annotate
public <T extends Annotation> io.micronaut.inject.ast.Element annotate(io.micronaut.core.annotation.AnnotationValue<T> annotationValue) - Specified by:
annotatein interfaceio.micronaut.inject.ast.Element- Specified by:
annotatein interfaceio.micronaut.inject.ast.annotation.MutableAnnotationMetadataDelegate<io.micronaut.inject.ast.Element>
-
removeAnnotation
- Specified by:
removeAnnotationin interfaceio.micronaut.inject.ast.Element- Specified by:
removeAnnotationin interfaceio.micronaut.inject.ast.annotation.MutableAnnotationMetadataDelegate<io.micronaut.inject.ast.Element>
-
removeAnnotationIf
public <T extends Annotation> io.micronaut.inject.ast.Element removeAnnotationIf(Predicate<io.micronaut.core.annotation.AnnotationValue<T>> predicate) - Specified by:
removeAnnotationIfin interfaceio.micronaut.inject.ast.Element- Specified by:
removeAnnotationIfin interfaceio.micronaut.inject.ast.annotation.MutableAnnotationMetadataDelegate<io.micronaut.inject.ast.Element>
-
removeStereotype
- Specified by:
removeStereotypein interfaceio.micronaut.inject.ast.Element- Specified by:
removeStereotypein interfaceio.micronaut.inject.ast.annotation.MutableAnnotationMetadataDelegate<io.micronaut.inject.ast.Element>
-
equals
-
hashCode
-
equalityType
-