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.Type
genericType
private java.lang.String
name
private java.lang.Class<?>
type
private TypeSolver
typeSolver
private boolean
variadic
-
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 boolean
equals(java.lang.Object o)
java.lang.String
getName()
Should return the name or return null if the name is not available.ResolvedType
getType()
Type of the declaration.int
hashCode()
boolean
hasName()
Necessary because parameters obtained through reflection could not have a name.boolean
isField()
Does this declaration represents a class field?boolean
isParameter()
Does this declaration represents a method parameter?boolean
isType()
Does this declaration represents a type?boolean
isVariadic()
Is this parameter declared as variadic?java.lang.String
toString()
-
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:ResolvedDeclaration
Should return the name or return null if the name is not available.- Specified by:
getName
in interfaceResolvedDeclaration
- Returns:
- the name, which can be potentially null
-
hasName
public boolean hasName()
Description copied from interface:ResolvedParameterDeclaration
Necessary because parameters obtained through reflection could not have a name.- Specified by:
hasName
in interfaceResolvedDeclaration
- Specified by:
hasName
in interfaceResolvedParameterDeclaration
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
isField
public boolean isField()
Description copied from interface:ResolvedDeclaration
Does this declaration represents a class field?- Specified by:
isField
in interfaceResolvedDeclaration
-
isParameter
public boolean isParameter()
Description copied from interface:ResolvedDeclaration
Does this declaration represents a method parameter?- Specified by:
isParameter
in interfaceResolvedDeclaration
- Specified by:
isParameter
in interfaceResolvedParameterDeclaration
-
isVariadic
public boolean isVariadic()
Description copied from interface:ResolvedParameterDeclaration
Is this parameter declared as variadic?- Specified by:
isVariadic
in interfaceResolvedParameterDeclaration
-
isType
public boolean isType()
Description copied from interface:ResolvedDeclaration
Does this declaration represents a type?- Specified by:
isType
in interfaceResolvedDeclaration
-
getType
public ResolvedType getType()
Description copied from interface:ResolvedValueDeclaration
Type of the declaration.- Specified by:
getType
in interfaceResolvedValueDeclaration
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-