All Packages Class Hierarchy This Package Previous Next Index
Class openjava.ptree.VariableDeclaration
java.lang.Object
|
+----openjava.ptree.PtreeObject
|
+----openjava.ptree.NonLeaf
|
+----openjava.ptree.VariableDeclaration
- public class VariableDeclaration
- extends NonLeaf
- implements Statement
The VariableDeclaration class presents
local variable declaration statement node of parse tree.
- See Also:
- Ptree, NonLeaf, Statement, ModifierList, TypeSpecifier, VariableDeclarator, TypeSpecifier, VariableInitializer
-
VariableDeclaration(ModifierList, TypeSpecifier, Identifier, VariableInitializer)
- Allocates a new object.
-
VariableDeclaration(ModifierList, TypeSpecifier, VariableDeclarator)
- Allocates a new object.
-
VariableDeclaration(TypeSpecifier, Identifier, VariableInitializer)
- Allocates a new object.
-
VariableDeclaration(TypeSpecifier, VariableDeclarator)
- Allocates a new object.
-
getInitializer()
- Gets variable initializer.
-
getModifiers()
- Gets the modifer list of this variable declaration.
-
getTypeSpecifier()
- Gets the type specifier of this variable declaration.
-
getVariable()
- Gets declarator name, declarator name includes variable name
but its dimension.
-
getVariableDeclarator()
- Gets the variable declarator of this variable declaration.
-
setInitializer(VariableInitializer)
- Sets variable initializer.
-
setModifiers(ModifierList)
- Sets the modifer list of this variable declaration.
-
setTypeSpecifier(TypeSpecifier)
- Sets the type specifier of this variable declaration.
-
setVariable(Identifier)
- Sets declarator name, declarator name includes variable name
but its dimension.
-
setVariableDeclarator(VariableDeclarator)
- Sets the variable declarator of this variable declaration.
-
writeCode()
- Writes the code this parse-tree presents for.
VariableDeclaration
public VariableDeclaration(ModifierList modifs,
TypeSpecifier typespec,
VariableDeclarator vdeclr)
- Allocates a new object.
- Parameters:
- modifs - the modifier list of this variable declaration.
- typespec - the type specifier.
- vdeclr - the variable declarator.
VariableDeclaration
public VariableDeclaration(TypeSpecifier typespec,
VariableDeclarator vdeclr)
- Allocates a new object.
- Parameters:
- typespec - the type specifier.
- vdeclr - the variable declarator.
VariableDeclaration
public VariableDeclaration(ModifierList modifs,
TypeSpecifier typespec,
Identifier vname,
VariableInitializer vinit)
- Allocates a new object.
- Parameters:
- modifs - the modifier list of this variable declaration.
- typespec - the type specifier.
- vname - the variable name.
- vinit - the variable initializer.
VariableDeclaration
public VariableDeclaration(TypeSpecifier typespec,
Identifier vname,
VariableInitializer vinit)
- Allocates a new object.
- Parameters:
- modifs - the modifier list of this variable declaration.
- typespec - the type specifier.
- vname - the variable name.
- vinit - the variable initializer.
writeCode
public void writeCode()
- Writes the code this parse-tree presents for.
- Overrides:
- writeCode in class NonLeaf
getModifiers
public ModifierList getModifiers()
- Gets the modifer list of this variable declaration.
- Returns:
- the modifier list.
setModifiers
public void setModifiers(ModifierList modifs)
- Sets the modifer list of this variable declaration.
- Parameters:
- modifs - the modifier list to set.
getTypeSpecifier
public TypeSpecifier getTypeSpecifier()
- Gets the type specifier of this variable declaration.
- Returns:
- the type specifier.
setTypeSpecifier
public void setTypeSpecifier(TypeSpecifier tspec)
- Sets the type specifier of this variable declaration.
- Parameters:
- tspec - the type specifier to set.
getVariableDeclarator
public VariableDeclarator getVariableDeclarator()
- Gets the variable declarator of this variable declaration.
- Returns:
- the variable declarator.
setVariableDeclarator
public void setVariableDeclarator(VariableDeclarator vdeclr)
- Sets the variable declarator of this variable declaration.
- Parameters:
- vdeclr - the variable declarator to set.
getVariable
public Identifier getVariable()
- Gets declarator name, declarator name includes variable name
but its dimension.
- Returns:
- declarator name
setVariable
public void setVariable(Identifier name)
- Sets declarator name, declarator name includes variable name
but its dimension.
- Parameters:
- name - declarator name to set.
- See Also:
- TypeSpecifier
getInitializer
public VariableInitializer getInitializer()
- Gets variable initializer.
- Returns:
- variable initializer.
setInitializer
public void setInitializer(VariableInitializer vinit)
- Sets variable initializer.
- Parameters:
- vinit - the variable initializer to set.
All Packages Class Hierarchy This Package Previous Next Index