Package jminusminus
Class JVariableDeclarator
java.lang.Object
jminusminus.JAST
jminusminus.JVariableDeclarator
The AST node for a variable declarator, which declares a name, its type and (possibly)
 provides an initialization.
- 
Field SummaryFields inherited from class jminusminus.JASTcompilationUnit, line
- 
Constructor SummaryConstructorsConstructorDescriptionJVariableDeclarator(int line, String name, Type type, JExpression initializer) Constructs an AST node for a variable declarator.
- 
Method SummaryModifier and TypeMethodDescriptionPerforms semantic analysis on this AST and returns the (possibly modified) AST.voidPerforms code generation for this AST.Returns the variable initializer.name()Returns the variable name.voidsetInitializer(JExpression initializer) Sets the variable initializer.voidSets the variable type.voidtoJSON(JSONElement json) Stores information about this AST in JSON format.type()Returns the variable type.Methods inherited from class jminusminus.JASTline, partialCodegen, unescape
- 
Constructor Details- 
JVariableDeclaratorConstructs an AST node for a variable declarator.- Parameters:
- line- line in which the variable occurs in the source file.
- name- variable name.
- type- variable type.
- initializer- initializer.
 
 
- 
- 
Method Details- 
nameReturns the variable name.- Returns:
- the variable name.
 
- 
typeReturns the variable type.- Returns:
- the variable type.
 
- 
setTypeSets the variable type.- Parameters:
- type- the type
 
- 
initializerReturns the variable initializer.- Returns:
- the variable initializer.
 
- 
setInitializerSets the variable initializer.- Parameters:
- initializer- the initializer.
 
- 
analyzePerforms semantic analysis on this AST and returns the (possibly modified) AST.
- 
codegenPerforms code generation for this AST.
- 
toJSONStores information about this AST in JSON format.
 
-