Module jakarta.cdi.lang.model
Interface ParameterInfo
- All Superinterfaces:
AnnotationTarget,DeclarationInfo
A method parameter or a constructor parameter, declared in some method
or constructor.
- Since:
- 4.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface jakarta.enterprise.lang.model.declarations.DeclarationInfo
DeclarationInfo.Kind -
Method Summary
Modifier and TypeMethodDescriptiondefault ParameterInfoReturns this declaration as a method parameter.Returns the method that declares this parameter.default DeclarationInfo.Kindkind()Returns the kind of this declaration.name()Returns the name of this parameter, if it is known.type()Returns the type of this parameter.Methods inherited from interface jakarta.enterprise.lang.model.AnnotationTarget
annotation, annotations, annotations, hasAnnotation, hasAnnotation, repeatableAnnotationMethods inherited from interface jakarta.enterprise.lang.model.declarations.DeclarationInfo
asClass, asDeclaration, asField, asMethod, asPackage, asRecordComponent, asType, isClass, isDeclaration, isField, isMethod, isPackage, isParameter, isRecordComponent, isType
-
Method Details
-
name
String name()Returns the name of this parameter, if it is known. Method parameter names may not always be known, in which case a synthetic name of the formargN, whereNis zero-based parameter position in the method declaration, is returned.- Returns:
- the name of this parameter, or a synthetic name, never
null
-
type
-
declaringMethod
MethodInfo declaringMethod()Returns the method that declares this parameter.- Returns:
- the method that declares this parameter, never
null
-
kind
Description copied from interface:DeclarationInfoReturns the kind of this declaration.- Specified by:
kindin interfaceDeclarationInfo- Returns:
- the kind of this declaration
-
asParameter
Description copied from interface:DeclarationInfoReturns this declaration as a method parameter.- Specified by:
asParameterin interfaceDeclarationInfo- Returns:
- this parameter, never
null
-