Class JavaParserVariableDeclaration
java.lang.Object
com.github.javaparser.symbolsolver.javaparsermodel.declarations.JavaParserVariableDeclaration
- All Implemented Interfaces:
com.github.javaparser.resolution.declarations.AssociableToAST, com.github.javaparser.resolution.declarations.ResolvedDeclaration, com.github.javaparser.resolution.declarations.ResolvedValueDeclaration
public class JavaParserVariableDeclaration
extends Object
implements com.github.javaparser.resolution.declarations.ResolvedValueDeclaration
- Author:
- Federico Tomassetti
-
Constructor Summary
ConstructorsConstructorDescriptionJavaParserVariableDeclaration(com.github.javaparser.ast.body.VariableDeclarator variableDeclarator, com.github.javaparser.resolution.TypeSolver typeSolver) -
Method Summary
Modifier and TypeMethodDescriptiongetName()com.github.javaparser.resolution.types.ResolvedTypegetType()com.github.javaparser.ast.body.VariableDeclaratorcom.github.javaparser.ast.expr.VariableDeclarationExprReturns the JavaParser node associated with this JavaParserFieldDeclaration.booleanOptional<com.github.javaparser.ast.Node> toAst()toString()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.github.javaparser.resolution.declarations.AssociableToAST
toAstMethods inherited from interface com.github.javaparser.resolution.declarations.ResolvedDeclaration
asEnumConstant, asField, asMethod, asParameter, asType, asTypePattern, hasName, isArrayLength, isEnumConstant, isField, isMethod, isParameter, isType, isTypePattern
-
Constructor Details
-
JavaParserVariableDeclaration
public JavaParserVariableDeclaration(com.github.javaparser.ast.body.VariableDeclarator variableDeclarator, com.github.javaparser.resolution.TypeSolver typeSolver)
-
-
Method Details
-
getType
public com.github.javaparser.resolution.types.ResolvedType getType()- Specified by:
getTypein interfacecom.github.javaparser.resolution.declarations.ResolvedValueDeclaration
-
getName
- Specified by:
getNamein interfacecom.github.javaparser.resolution.declarations.ResolvedDeclaration
-
isVariable
public boolean isVariable()- Specified by:
isVariablein interfacecom.github.javaparser.resolution.declarations.ResolvedDeclaration
-
getWrappedNode
public com.github.javaparser.ast.expr.VariableDeclarationExpr getWrappedNode()Returns the JavaParser node associated with this JavaParserFieldDeclaration.- Returns:
- A visitable JavaParser node wrapped by this object.
-
getVariableDeclarator
public com.github.javaparser.ast.body.VariableDeclarator getVariableDeclarator() -
toString
-
toAst
- Specified by:
toAstin interfacecom.github.javaparser.resolution.declarations.AssociableToAST
-