All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class openjava.ptree.FieldAccess

java.lang.Object
   |
   +----openjava.ptree.PtreeObject
           |
           +----openjava.ptree.NonLeaf
                   |
                   +----openjava.ptree.FieldAccess

public class FieldAccess
extends NonLeaf
implements Expression
The FieldAccess class represents a field access like :
     f().str
 

In this field access, you can get f() by getExpression() and can get str by getName() .
Warning this class may has bugs around the expression.

See Also:
NonLeaf, Expression, Identifier

Constructor Index

 o FieldAccess(Expression, Identifier)

Method Index

 o getExpression()
Gets the expression accessed.
 o getName()
Gets the field name.
 o setExpression(Expression)
Sets the expression accessed.
 o setName(Identifier)
Sets the field name.
 o writeCode()
Writes the code this parse-tree presents for.

Constructors

 o FieldAccess
 public FieldAccess(Expression expr,
                    Identifier name)

Methods

 o writeCode
 public void writeCode()
Writes the code this parse-tree presents for.

Overrides:
writeCode in class NonLeaf
 o getExpression
 public Expression getExpression()
Gets the expression accessed.

Returns:
the expression accessed.
 o setExpression
 public void setExpression(Expression expr)
Sets the expression accessed.

Parameters:
expr - the expression accessed.
 o getName
 public Identifier getName()
Gets the field name.

Returns:
the field name.
 o setName
 public void setName(Identifier name)
Sets the field name.

Parameters:
name - the field name.

All Packages  Class Hierarchy  This Package  Previous  Next  Index