|
|||||||||
| Home >> All >> openjava >> [ ptree overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
openjava.ptree
Class VariableDeclaration

java.lang.Objectopenjava.ptree.ParseTreeObject
openjava.ptree.NonLeaf
openjava.ptree.VariableDeclaration
- All Implemented Interfaces:
- java.lang.Cloneable, ParseTree, Statement
The VariableDeclaration class presents local variable declaration statement node of parse tree.
| Field Summary |
| Fields inherited from class openjava.ptree.NonLeaf |
|
| Fields inherited from class openjava.ptree.ParseTreeObject |
LN |
| Constructor Summary | |
(package private) |
VariableDeclaration()
|
|
VariableDeclaration(ModifierList modifs,
TypeName typespec,
java.lang.String vname,
VariableInitializer vinit)
Allocates a new object. |
|
VariableDeclaration(ModifierList modifs,
TypeName typespec,
VariableDeclarator vdeclr)
Allocates a new object. |
|
VariableDeclaration(TypeName typespec,
java.lang.String vname,
VariableInitializer vinit)
Allocates a new object. |
|
VariableDeclaration(TypeName typespec,
VariableDeclarator vdeclr)
Allocates a new object. |
| Method Summary | |
void |
accept(openjava.ptree.util.ParseTreeVisitor v)
Accepts a ParseTreeVisitor object as the role of a
Visitor in the Visitor pattern, as the role of an Element in the
Visitor pattern. |
VariableInitializer |
getInitializer()
Gets variable initializer. |
ModifierList |
getModifiers()
Gets the modifer list of this variable declaration. |
TypeName |
getTypeSpecifier()
Gets the type specifier of this variable declaration. |
java.lang.String |
getVariable()
Gets declarator name, declarator name includes variable name but its dimension. |
VariableDeclarator |
getVariableDeclarator()
Gets the variable declarator of this variable declaration. |
void |
setInitializer(VariableInitializer vinit)
Sets variable initializer. |
void |
setModifiers(ModifierList modifs)
Sets the modifer list of this variable declaration. |
void |
setTypeSpecifier(TypeName tspec)
Sets the type specifier of this variable declaration. |
void |
setVariable(java.lang.String name)
Sets declarator name, declarator name includes variable name but its dimension. |
void |
setVariableDeclarator(VariableDeclarator vdeclr)
Sets the variable declarator of this variable declaration. |
| Methods inherited from class openjava.ptree.NonLeaf |
childrenAccept, elementAt, equals, getComment, getContents, getLength, makeRecursiveCopy, replaceChildWith, set, set, set, set, set, set, set, set, set, setComment, setElementAt |
| Methods inherited from class openjava.ptree.ParseTreeObject |
clone, equal, getObjectID, getParent, hashCode, lastObjectID, makeCopy, replace, setParent, toFlattenString, toString |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface openjava.ptree.ParseTree |
childrenAccept, equals, getObjectID, makeCopy, makeRecursiveCopy, replace, toFlattenString, toString |
| Constructor Detail |
VariableDeclaration
public VariableDeclaration(ModifierList modifs, TypeName typespec, VariableDeclarator vdeclr)
- Allocates a new object.
VariableDeclaration
public VariableDeclaration(TypeName typespec, VariableDeclarator vdeclr)
- Allocates a new object.
VariableDeclaration
public VariableDeclaration(ModifierList modifs, TypeName typespec, java.lang.String vname, VariableInitializer vinit)
- Allocates a new object.
VariableDeclaration
public VariableDeclaration(TypeName typespec, java.lang.String vname, VariableInitializer vinit)
- Allocates a new object.
VariableDeclaration
VariableDeclaration()
| Method Detail |
getModifiers
public ModifierList getModifiers()
- Gets the modifer list of this variable declaration.
setModifiers
public void setModifiers(ModifierList modifs)
- Sets the modifer list of this variable declaration.
getTypeSpecifier
public TypeName getTypeSpecifier()
- Gets the type specifier of this variable declaration.
Any modification on obtained objects is never reflected on
this object.
setTypeSpecifier
public void setTypeSpecifier(TypeName tspec)
- Sets the type specifier of this variable declaration.
getVariableDeclarator
public VariableDeclarator getVariableDeclarator()
- Gets the variable declarator of this variable declaration.
setVariableDeclarator
public void setVariableDeclarator(VariableDeclarator vdeclr)
- Sets the variable declarator of this variable declaration.
getVariable
public java.lang.String getVariable()
- Gets declarator name, declarator name includes variable name
but its dimension.
setVariable
public void setVariable(java.lang.String name)
- Sets declarator name, declarator name includes variable name
but its dimension.
getInitializer
public VariableInitializer getInitializer()
- Gets variable initializer.
setInitializer
public void setInitializer(VariableInitializer vinit)
- Sets variable initializer.
accept
public void accept(openjava.ptree.util.ParseTreeVisitor v) throws ParseTreeException
- Description copied from interface:
ParseTree - Accepts a
ParseTreeVisitorobject as the role of a Visitor in the Visitor pattern, as the role of an Element in the Visitor pattern.This invoke an appropriate
visit()method on the accepted visitor.- Specified by:
acceptin interfaceParseTree- Specified by:
acceptin classParseTreeObject
|
|||||||||
| Home >> All >> openjava >> [ ptree overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC