Class JavaParserSymbolDeclaration
- java.lang.Object
-
- com.github.javaparser.symbolsolver.javaparsermodel.declarations.JavaParserSymbolDeclaration
-
- All Implemented Interfaces:
com.github.javaparser.resolution.declarations.ResolvedDeclaration
,com.github.javaparser.resolution.declarations.ResolvedValueDeclaration
public class JavaParserSymbolDeclaration extends Object implements com.github.javaparser.resolution.declarations.ResolvedValueDeclaration
This should not be used to represent fields of parameters. Eventually this should be renamed in JavaParserVariableDeclaration.- Author:
- Federico Tomassetti
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.github.javaparser.resolution.declarations.ResolvedTypeDeclaration
asType()
static JavaParserFieldDeclaration
field(com.github.javaparser.ast.body.VariableDeclarator wrappedNode, com.github.javaparser.symbolsolver.model.resolution.TypeSolver typeSolver)
String
getName()
static int
getParamPos(com.github.javaparser.ast.body.Parameter parameter)
static int
getParamPos(com.github.javaparser.ast.Node node)
com.github.javaparser.resolution.types.ResolvedType
getType()
com.github.javaparser.ast.Node
getWrappedNode()
Returns the JavaParser node associated with this JavaParserSymbolDeclaration.boolean
isField()
boolean
isParameter()
boolean
isType()
static JavaParserSymbolDeclaration
localVar(com.github.javaparser.ast.body.VariableDeclarator variableDeclarator, com.github.javaparser.symbolsolver.model.resolution.TypeSolver typeSolver)
static JavaParserParameterDeclaration
parameter(com.github.javaparser.ast.body.Parameter parameter, com.github.javaparser.symbolsolver.model.resolution.TypeSolver typeSolver)
String
toString()
-
-
-
Method Detail
-
field
public static JavaParserFieldDeclaration field(com.github.javaparser.ast.body.VariableDeclarator wrappedNode, com.github.javaparser.symbolsolver.model.resolution.TypeSolver typeSolver)
-
parameter
public static JavaParserParameterDeclaration parameter(com.github.javaparser.ast.body.Parameter parameter, com.github.javaparser.symbolsolver.model.resolution.TypeSolver typeSolver)
-
localVar
public static JavaParserSymbolDeclaration localVar(com.github.javaparser.ast.body.VariableDeclarator variableDeclarator, com.github.javaparser.symbolsolver.model.resolution.TypeSolver typeSolver)
-
getParamPos
public static int getParamPos(com.github.javaparser.ast.body.Parameter parameter)
-
getParamPos
public static int getParamPos(com.github.javaparser.ast.Node node)
-
getName
public String getName()
- Specified by:
getName
in interfacecom.github.javaparser.resolution.declarations.ResolvedDeclaration
-
isField
public boolean isField()
- Specified by:
isField
in interfacecom.github.javaparser.resolution.declarations.ResolvedDeclaration
-
isParameter
public boolean isParameter()
- Specified by:
isParameter
in interfacecom.github.javaparser.resolution.declarations.ResolvedDeclaration
-
isType
public boolean isType()
- Specified by:
isType
in interfacecom.github.javaparser.resolution.declarations.ResolvedDeclaration
-
getType
public com.github.javaparser.resolution.types.ResolvedType getType()
- Specified by:
getType
in interfacecom.github.javaparser.resolution.declarations.ResolvedValueDeclaration
-
asType
public com.github.javaparser.resolution.declarations.ResolvedTypeDeclaration asType()
- Specified by:
asType
in interfacecom.github.javaparser.resolution.declarations.ResolvedDeclaration
-
getWrappedNode
public com.github.javaparser.ast.Node getWrappedNode()
Returns the JavaParser node associated with this JavaParserSymbolDeclaration.- Returns:
- A visitable JavaParser node wrapped by this object.
-
-