Class ReflectionPatternDeclaration
- java.lang.Object
-
- com.github.javaparser.symbolsolver.reflectionmodel.ReflectionPatternDeclaration
-
- All Implemented Interfaces:
AssociableToAST,ResolvedDeclaration,ResolvedPatternDeclaration,ResolvedValueDeclaration
public class ReflectionPatternDeclaration extends Object implements ResolvedPatternDeclaration
WARNING: Implemented fairly blindly. Unsure if required or even appropriate. Use with extreme caution.- Author:
- Roger Howell
-
-
Constructor Summary
Constructors Constructor Description ReflectionPatternDeclaration(Class<?> type, TypeSolver typeSolver, String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetName()Should return the name or return null if the name is not available.ResolvedTypegetType()Type of the declaration.booleanhasName()Anonymous classes do not have a name, for example.booleanisField()Does this declaration represents a class field?booleanisParameter()Does this declaration represents a method parameter?booleanisPattern()Does this declaration represents a pattern declaration?booleanisType()Does this declaration represents a type?-
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.ResolvedPatternDeclaration
asPattern, describeType
-
-
-
-
Constructor Detail
-
ReflectionPatternDeclaration
public ReflectionPatternDeclaration(Class<?> type, TypeSolver typeSolver, String name)
- Parameters:
type-typeSolver-name- can potentially be null
-
-
Method Detail
-
getName
public String getName()
Description copied from interface:ResolvedDeclarationShould return the name or return null if the name is not available.- Specified by:
getNamein interfaceResolvedDeclaration
-
hasName
public boolean hasName()
Description copied from interface:ResolvedDeclarationAnonymous classes do not have a name, for example.- Specified by:
hasNamein interfaceResolvedDeclaration- Specified by:
hasNamein interfaceResolvedPatternDeclaration
-
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
-
isPattern
public boolean isPattern()
Description copied from interface:ResolvedDeclarationDoes this declaration represents a pattern declaration?- Specified by:
isPatternin interfaceResolvedDeclaration- Specified by:
isPatternin interfaceResolvedPatternDeclaration
-
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
-
-