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
Modifier 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_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 TypeMethodDescriptiongetDescription
(boolean simple) Allows returning a more simple description if requested.default MethodElement
Return method associated with this parameter.getType()
static @NonNull ParameterElement
of
(@NonNull ClassElement type, @NonNull String name) Creates a parameter element for the given arguments.static @NonNull ParameterElement
of
(@NonNull ClassElement type, @NonNull String name, @NonNull AnnotationMetadataProvider annotationMetadataProvider, @NonNull AbstractAnnotationMetadataBuilder<?, ?> metadataBuilder) Creates a parameter element for the given arguments.static @NonNull ParameterElement
Creates a parameter element for a simple type and name.default ParameterElement
withAnnotationMetadata
(AnnotationMetadata annotationMetadata) Copies this element and overrides its annotations.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, getDocumentation, getModifiers, getName, getNativeType, getSimpleName, isAbstract, isFinal, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, isSynthetic, removeAnnotation, removeAnnotation, removeAnnotationIf, removeStereotype, removeStereotype
Methods 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:
getType
in interfaceTypedElement
- Returns:
- The type of the parameter
-
getDescription
Description copied from interface:Described
Allows returning a more simple description if requested.- Specified by:
getDescription
in interfaceDescribed
- Specified by:
getDescription
in 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:Element
Copies this element and overrides its annotations.- Specified by:
withAnnotationMetadata
in 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
-