|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--openjava.ptree.ParseTreeObject | +--openjava.ptree.NonLeaf | +--openjava.ptree.FieldDeclaration
The FieldDeclaration class presents for node of parse tree. FieldDeclaration := ModifierList TypeName VariableDeclarator SEMI
Field Summary | |
private Hashtable |
suffixes
|
Fields inherited from class openjava.ptree.NonLeaf |
|
Fields inherited from class openjava.ptree.ParseTreeObject |
debugFlag, debugLevel, LN, out, writerStack |
Fields inherited from interface openjava.ptree.MemberDeclaration |
CONSTRUCTOR, FIELD, METHOD, STATICINIT, STATICINITIALIZER, TYPE |
Constructor Summary | |
(package private) |
FieldDeclaration()
Is needed for recursive copy. |
|
FieldDeclaration(ModifierList e0,
TypeName e1,
String e2,
VariableInitializer e3)
|
|
FieldDeclaration(ModifierList e0,
TypeName e1,
VariableDeclarator e2)
Allocates this object |
Method Summary | |
void |
accept(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 of this field. |
ModifierList |
getModifiers()
Gets modifier list of this field. |
String |
getName()
Deprecated. |
Hashtable |
getSuffixes()
|
TypeName |
getTypeSpecifier()
Gets type specifier of this field variable. |
String |
getVariable()
Gets variable name of this field. |
VariableDeclarator |
getVariableDeclarator()
Deprecated. |
private VariableDeclarator |
getVariableDeclaratorImpl()
|
void |
setInitializer(VariableInitializer vinit)
Gets variable initializer of this field. |
void |
setModifiers(ModifierList modifs)
Sets modifier list of this field. |
void |
setSuffixes(Hashtable suffixes)
|
void |
setTypeSpecifier(TypeName tspec)
Sets type specifier of this field variable. |
void |
setVariable(String name)
Sets variable name of this field. |
void |
setVariableDeclarator(VariableDeclarator vdeclr)
Deprecated. |
void |
writeCode()
Overrides writing code method |
Methods inherited from class openjava.ptree.NonLeaf |
childrenAccept, childrenAreEqual, elementAt, equals, getComment, getContents, getLength, getRowType, makeRecursiveCopy, replaceChildWith, set, set, set, set, set, set, set, set, set, setComment, setElementAt |
Methods inherited from class openjava.ptree.ParseTreeObject |
clone, eq, eq, equal, flushPrintWriter, getDebugFlag, getNest, getObjectID, getParent, getPrintWriter, getTab, hashCode, lastObjectID, makeCopy, popNest, popPrintWriter, pushNest, pushPrintWriter, replace, setDebugFlag, setDebugLevel, setNest, setParent, setPrintStream, setTab, toFlattenString, toString, writeDebug, writeDebugL, writeDebugLln, writeDebugln, writeDebugLR, writeDebugR, writeDebugRln, writeTab |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface openjava.ptree.MemberDeclaration |
eq, equals |
Methods inherited from interface openjava.ptree.ParseTree |
childrenAccept, getObjectID, makeCopy, makeRecursiveCopy, replace, toFlattenString, toString |
Field Detail |
private Hashtable suffixes
Constructor Detail |
public FieldDeclaration(ModifierList e0, TypeName e1, VariableDeclarator e2)
public FieldDeclaration(ModifierList e0, TypeName e1, String e2, VariableInitializer e3)
FieldDeclaration()
Method Detail |
public void writeCode()
writeCode
in interface MemberDeclaration
writeCode
in class NonLeaf
public ModifierList getModifiers()
public void setModifiers(ModifierList modifs)
modifs
- modifiers to setpublic TypeName getTypeSpecifier()
public void setTypeSpecifier(TypeName tspec)
tspec
- type specifier to setpublic VariableDeclarator getVariableDeclarator()
VariableDeclarator
private VariableDeclarator getVariableDeclaratorImpl()
public void setVariableDeclarator(VariableDeclarator vdeclr)
vdeclr
- variable declarator to setpublic String getVariable()
public String getName()
public void setVariable(String name)
name
- identifier of field variablepublic VariableInitializer getInitializer()
public void setInitializer(VariableInitializer vinit)
vinit
- variable initializerpublic void setSuffixes(Hashtable suffixes)
public Hashtable getSuffixes()
public void accept(ParseTreeVisitor v) throws ParseTreeException
ParseTree
ParseTreeVisitor
object 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.
accept
in interface ParseTree
accept
in class ParseTreeObject
v
- a visitor
ParseTreeException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |