Class ReflectionPatternDeclaration
- java.lang.Object
-
- com.github.javaparser.symbolsolver.reflectionmodel.ReflectionPatternDeclaration
-
- All Implemented Interfaces:
AssociableToAST
,ResolvedDeclaration
,ResolvedTypePatternDeclaration
,ResolvedValueDeclaration
public class ReflectionPatternDeclaration extends java.lang.Object implements ResolvedTypePatternDeclaration
WARNING: Implemented fairly blindly. Unsure if required or even appropriate. Use with extreme caution.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
name
private java.lang.Class<?>
type
private TypeSolver
typeSolver
-
Constructor Summary
Constructors Constructor Description ReflectionPatternDeclaration(java.lang.Class<?> type, TypeSolver typeSolver, java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getName()
Should return the name or return null if the name is not available.ResolvedType
getType()
Type of the declaration.boolean
hasName()
Anonymous classes do not have a name, for example.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
isTypePattern()
Does this declaration represents a pattern declaration?-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, 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, asParameter, asType, isEnumConstant, isMethod, isVariable
-
Methods inherited from interface com.github.javaparser.resolution.declarations.ResolvedTypePatternDeclaration
asTypePattern, describeType
-
-
-
-
Field Detail
-
type
private java.lang.Class<?> type
-
typeSolver
private TypeSolver typeSolver
-
name
private java.lang.String name
-
-
Constructor Detail
-
ReflectionPatternDeclaration
public ReflectionPatternDeclaration(java.lang.Class<?> type, TypeSolver typeSolver, java.lang.String name)
- Parameters:
type
-typeSolver
-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
-
hasName
public boolean hasName()
Description copied from interface:ResolvedDeclaration
Anonymous classes do not have a name, for example.- Specified by:
hasName
in interfaceResolvedDeclaration
- Specified by:
hasName
in interfaceResolvedTypePatternDeclaration
-
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
-
isTypePattern
public boolean isTypePattern()
Description copied from interface:ResolvedDeclaration
Does this declaration represents a pattern declaration?- Specified by:
isTypePattern
in interfaceResolvedDeclaration
- Specified by:
isTypePattern
in interfaceResolvedTypePatternDeclaration
-
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
-
-