Package io.micronaut.inject.ast
Interface ParameterElement
- All Superinterfaces:
AnnotatedElement,AnnotationMetadata,AnnotationMetadataDelegate,AnnotationMetadataProvider,AnnotationSource,Described,Element,MutableAnnotationMetadataDelegate<Element>,Named,TypedElement
- All Known Subinterfaces:
BeanParameterElement,KotlinParameterElement
- All Known Implementing Classes:
GroovyParameterElement
Represents a parameter to a method or constructor.
- Since:
- 1.0
- Author:
- graemerocher
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ParameterElement[]Constant for an empty parameter element array.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 TypeMethodDescriptiongetDescription(boolean simple) Allows returning a more simple description if requested.default MethodElementReturn method associated with this parameter.getType()static @NonNull ParameterElementof(@NonNull ClassElement type, @NonNull String name) Creates a parameter element for the given arguments.static @NonNull ParameterElementof(@NonNull ClassElement type, @NonNull String name, @NonNull AnnotationMetadataProvider annotationMetadataProvider, @NonNull AbstractAnnotationMetadataBuilder<?, ?> metadataBuilder) Creates a parameter element for the given arguments.static @NonNull ParameterElementCreates a parameter element for a simple type and name.default ParameterElementwithAnnotationMetadata(AnnotationMetadata annotationMetadata) Copies this element and overrides its annotations.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, getDocumentation, getDocumentation, getModifiers, getName, getNativeType, getSimpleName, isAbstract, isFinal, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, isSynthetic, removeAnnotation, removeAnnotation, removeAnnotationIf, removeStereotype, removeStereotypeMethods inherited from interface io.micronaut.inject.ast.TypedElement
getArrayDimensions, getGenericType, isArray, isPrimitive, isVoid
-
Field Details
-
ZERO_PARAMETER_ELEMENTS
Constant for an empty parameter element array.- Since:
- 4.4.0
-
-
Method Details
-
getType
- Specified by:
getTypein interfaceTypedElement- Returns:
- The type of the parameter
-
getDescription
Description copied from interface:DescribedAllows returning a more simple description if requested.- Specified by:
getDescriptionin interfaceDescribed- Specified by:
getDescriptionin interfaceElement- Parameters:
simple- True if a simple description is required- Returns:
- The simple description
-
getMethodElement
Return method associated with this parameter.- Returns:
- The method element
-
withAnnotationMetadata
Description copied from interface:ElementCopies this element and overrides its annotations.- Specified by:
withAnnotationMetadatain interfaceElement- Parameters:
annotationMetadata- The annotation metadata- Returns:
- A new element
-
of
@NonNull static @NonNull ParameterElement of(@NonNull @NonNull Class<?> type, @NonNull @NonNull String name) Creates a parameter element for a simple type and name.- Parameters:
type- The typename- The name- Returns:
- The parameter element
-
of
@NonNull static @NonNull ParameterElement of(@NonNull @NonNull ClassElement type, @NonNull @NonNull String name) Creates a parameter element for the given arguments.- Parameters:
type- The element typename- The name- Returns:
- The parameter element
- Since:
- 2.4.0
-
of
@NonNull static @NonNull ParameterElement of(@NonNull @NonNull ClassElement type, @NonNull @NonNull String name, @NonNull @NonNull AnnotationMetadataProvider annotationMetadataProvider, @NonNull @NonNull AbstractAnnotationMetadataBuilder<?, ?> metadataBuilder) Creates a parameter element for the given arguments.- Parameters:
type- The element typename- The nameannotationMetadataProvider- The namemetadataBuilder- The name- Returns:
- The parameter element
- Since:
- 4.0.0
-