Class ReflectionParameterDeclaration
java.lang.Object
com.github.javaparser.symbolsolver.reflectionmodel.ReflectionParameterDeclaration
- All Implemented Interfaces:
AssociableToAST, ResolvedDeclaration, ResolvedParameterDeclaration, ResolvedValueDeclaration
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Typeprivate Stringprivate Class<?> private TypeSolverprivate boolean -
Constructor Summary
ConstructorsConstructorDescriptionReflectionParameterDeclaration(Class<?> type, Type genericType, TypeSolver typeSolver, boolean variadic, String name) -
Method Summary
Modifier and TypeMethodDescriptionbooleangetName()Should return the name or return null if the name is not available.getType()Type of the declaration.inthashCode()booleanhasName()Necessary because parameters obtained through reflection could not have a name.booleanisField()Does this declaration represents a class field?booleanDoes this declaration represents a method parameter?booleanisType()Does this declaration represents a type?booleanIs this parameter declared as variadic?toString()Methods inherited from interface AssociableToAST
toAst, toAstMethods inherited from interface ResolvedDeclaration
asEnumConstant, asField, asMethod, asType, asTypePattern, isEnumConstant, isMethod, isTypePattern, isVariableMethods inherited from interface ResolvedParameterDeclaration
asParameter, describeType
-
Field Details
-
type
-
genericType
-
typeSolver
-
variadic
private boolean variadic -
name
-
-
Constructor Details
-
ReflectionParameterDeclaration
public ReflectionParameterDeclaration(Class<?> type, Type genericType, TypeSolver typeSolver, boolean variadic, String name) - Parameters:
type-genericType-typeSolver-variadic-name- can potentially be null
-
-
Method Details
-
getName
Description copied from interface:ResolvedDeclarationShould return the name or return null if the name is not available.- Specified by:
getNamein interfaceResolvedDeclaration- Returns:
- the name, which can be potentially null
-
hasName
public boolean hasName()Description copied from interface:ResolvedParameterDeclarationNecessary because parameters obtained through reflection could not have a name.- Specified by:
hasNamein interfaceResolvedDeclaration- Specified by:
hasNamein interfaceResolvedParameterDeclaration
-
toString
-
isField
public boolean isField()Description copied from interface:ResolvedDeclarationDoes this declaration represents a class field?- Specified by:
isFieldin interfaceResolvedDeclaration
-
isParameter
public boolean isParameter()Description copied from interface:ResolvedDeclarationDoes this declaration represents a method parameter?- Specified by:
isParameterin interfaceResolvedDeclaration- Specified by:
isParameterin interfaceResolvedParameterDeclaration
-
isVariadic
public boolean isVariadic()Description copied from interface:ResolvedParameterDeclarationIs this parameter declared as variadic?- Specified by:
isVariadicin interfaceResolvedParameterDeclaration
-
isType
public boolean isType()Description copied from interface:ResolvedDeclarationDoes this declaration represents a type?- Specified by:
isTypein interfaceResolvedDeclaration
-
getType
Description copied from interface:ResolvedValueDeclarationType of the declaration.- Specified by:
getTypein interfaceResolvedValueDeclaration
-
equals
-
hashCode
-