Class ReflectionParameterDeclaration
- java.lang.Object
-
- com.github.javaparser.symbolsolver.reflectionmodel.ReflectionParameterDeclaration
-
- All Implemented Interfaces:
AssociableToAST,ResolvedDeclaration,ResolvedParameterDeclaration,ResolvedValueDeclaration
public class ReflectionParameterDeclaration extends java.lang.Object implements ResolvedParameterDeclaration
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.reflect.TypegenericTypeprivate java.lang.Stringnameprivate java.lang.Class<?>typeprivate TypeSolvertypeSolverprivate booleanvariadic
-
Constructor Summary
Constructors Constructor Description ReflectionParameterDeclaration(java.lang.Class<?> type, java.lang.reflect.Type genericType, TypeSolver typeSolver, boolean variadic, java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)java.lang.StringgetName()Should return the name or return null if the name is not available.ResolvedTypegetType()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?booleanisParameter()Does this declaration represents a method parameter?booleanisType()Does this declaration represents a type?booleanisVariadic()Is this parameter declared as variadic?java.lang.StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.github.javaparser.resolution.declarations.AssociableToAST
toAst, toAst
-
Methods inherited from interface com.github.javaparser.resolution.declarations.ResolvedDeclaration
asEnumConstant, asField, asMethod, asType, asTypePattern, isEnumConstant, isMethod, isTypePattern, isVariable
-
Methods inherited from interface com.github.javaparser.resolution.declarations.ResolvedParameterDeclaration
asParameter, describeType
-
-
-
-
Field Detail
-
type
private java.lang.Class<?> type
-
genericType
private java.lang.reflect.Type genericType
-
typeSolver
private TypeSolver typeSolver
-
variadic
private boolean variadic
-
name
private java.lang.String name
-
-
Constructor Detail
-
ReflectionParameterDeclaration
public ReflectionParameterDeclaration(java.lang.Class<?> type, java.lang.reflect.Type genericType, TypeSolver typeSolver, boolean variadic, java.lang.String name)- Parameters:
type-genericType-typeSolver-variadic-name- can potentially be null
-
-
Method Detail
-
getName
public java.lang.String 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
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
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
public ResolvedType getType()
Description copied from interface:ResolvedValueDeclarationType of the declaration.- Specified by:
getTypein interfaceResolvedValueDeclaration
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-