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


Constructor Index

 o FieldDeclaration(ModifierList, TypeSpecifier, Identifier, VariableInitializer)
 o FieldDeclaration(ModifierList, TypeSpecifier, VariableDeclarator)
Allocates this object

Method Index

 o getInitializer()
Gets variable initializer of this field.
 o getModifiers()
Gets modifier list of this field.
 o getTypeSpecifier()
Gets type specifier of this field variable.
 o getVariable()
Gets variable name of this field.
 o getVariableDeclarator()
Gets variable declarator of this field
 o make(String)
 o setInitializer(VariableInitializer)
Gets variable initializer of this field.
 o setModifiers(ModifierList)
Sets modifier list of this field.
 o setTypeSpecifier(TypeSpecifier)
Sets type specifier of this field variable.
 o setVariable(Identifier)
Sets variable name of this field.
 o setVariableDeclarator(VariableDeclarator)
Sets type specifier of this field variable.
 o writeCode()
Overrides writing code method

Constructors

 o FieldDeclaration
 public FieldDeclaration(ModifierList e0,
                         TypeSpecifier e1,
                         VariableDeclarator e2)
Allocates this object

 o FieldDeclaration
 public FieldDeclaration(ModifierList e0,
                         TypeSpecifier e1,
                         Identifier e2,
                         VariableInitializer e3)

Methods

 o writeCode
 public void writeCode()
Overrides writing code method

Overrides:
writeCode in class NonLeaf
 o getModifiers
 public ModifierList getModifiers()
Gets modifier list of this field.

Returns:
modifier list. if there is no modifiers, this returns an empty list.
 o setModifiers
 public void setModifiers(ModifierList modifs)
Sets modifier list of this field.

Parameters:
modifs - modifiers to set
 o getTypeSpecifier
 public TypeSpecifier getTypeSpecifier()
Gets type specifier of this field variable.

Returns:
modifier list
 o setTypeSpecifier
 public void setTypeSpecifier(TypeSpecifier tspec)
Sets type specifier of this field variable.

Parameters:
tspec - type specifier to set
 o getVariableDeclarator
 public VariableDeclarator getVariableDeclarator()
Gets variable declarator of this field

Returns:
variable declarator
See Also:
VariableDeclarator
 o setVariableDeclarator
 public void setVariableDeclarator(VariableDeclarator vdeclr)
Sets type specifier of this field variable.

Parameters:
vdeclr - variable declarator to set
 o getVariable
 public Identifier getVariable()
Gets variable name of this field.

Returns:
identifier of field variable
 o setVariable
 public void setVariable(Identifier name)
Sets variable name of this field.

Returns:
identifier of field variable
 o getInitializer
 public VariableInitializer getInitializer()
Gets variable initializer of this field.

Returns:
variable initializer
 o setInitializer
 public void setInitializer(VariableInitializer vinit)
Gets variable initializer of this field.

Returns:
variable initializer
 o make
 public static FieldDeclaration make(String str)

All Packages  Class Hierarchy  This Package  Previous  Next  Index