All Packages Class Hierarchy This Package Previous Next Index
Class openjava.ptree.FieldDeclaration
java.lang.Object
|
+----openjava.ptree.PtreeObject
|
+----openjava.ptree.NonLeaf
|
+----openjava.ptree.FieldDeclaration
- public class FieldDeclaration
- extends NonLeaf
- implements MemberDeclaration
The FieldDeclaration class presents for node of parse tree.
FieldDeclaration
:= ModifierList TypeSpecifier VariableDeclarator SEMI
-
FieldDeclaration(ModifierList, TypeSpecifier, Identifier, VariableInitializer)
-
-
FieldDeclaration(ModifierList, TypeSpecifier, VariableDeclarator)
- Allocates this object
-
getInitializer()
- Gets variable initializer of this field.
-
getModifiers()
- Gets modifier list of this field.
-
getTypeSpecifier()
- Gets type specifier of this field variable.
-
getVariable()
- Gets variable name of this field.
-
getVariableDeclarator()
- Gets variable declarator of this field
-
make(String)
-
-
setInitializer(VariableInitializer)
- Gets variable initializer of this field.
-
setModifiers(ModifierList)
- Sets modifier list of this field.
-
setTypeSpecifier(TypeSpecifier)
- Sets type specifier of this field variable.
-
setVariable(Identifier)
- Sets variable name of this field.
-
setVariableDeclarator(VariableDeclarator)
- Sets type specifier of this field variable.
-
writeCode()
- Overrides writing code method
FieldDeclaration
public FieldDeclaration(ModifierList e0,
TypeSpecifier e1,
VariableDeclarator e2)
- Allocates this object
FieldDeclaration
public FieldDeclaration(ModifierList e0,
TypeSpecifier e1,
Identifier e2,
VariableInitializer e3)
writeCode
public void writeCode()
- Overrides writing code method
- Overrides:
- writeCode in class NonLeaf
getModifiers
public ModifierList getModifiers()
- Gets modifier list of this field.
- Returns:
- modifier list. if there is no modifiers, this returns
an empty list.
setModifiers
public void setModifiers(ModifierList modifs)
- Sets modifier list of this field.
- Parameters:
- modifs - modifiers to set
getTypeSpecifier
public TypeSpecifier getTypeSpecifier()
- Gets type specifier of this field variable.
- Returns:
- modifier list
setTypeSpecifier
public void setTypeSpecifier(TypeSpecifier tspec)
- Sets type specifier of this field variable.
- Parameters:
- tspec - type specifier to set
getVariableDeclarator
public VariableDeclarator getVariableDeclarator()
- Gets variable declarator of this field
- Returns:
- variable declarator
- See Also:
- VariableDeclarator
setVariableDeclarator
public void setVariableDeclarator(VariableDeclarator vdeclr)
- Sets type specifier of this field variable.
- Parameters:
- vdeclr - variable declarator to set
getVariable
public Identifier getVariable()
- Gets variable name of this field.
- Returns:
- identifier of field variable
setVariable
public void setVariable(Identifier name)
- Sets variable name of this field.
- Returns:
- identifier of field variable
getInitializer
public VariableInitializer getInitializer()
- Gets variable initializer of this field.
- Returns:
- variable initializer
setInitializer
public void setInitializer(VariableInitializer vinit)
- Gets variable initializer of this field.
- Returns:
- variable initializer
make
public static FieldDeclaration make(String str)
All Packages Class Hierarchy This Package Previous Next Index