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
-
FieldAccess(Expression, Identifier)
-
-
getExpression()
- Gets the expression accessed.
-
getName()
- Gets the field name.
-
setExpression(Expression)
- Sets the expression accessed.
-
setName(Identifier)
- Sets the field name.
-
writeCode()
- Writes the code this parse-tree presents for.
FieldAccess
public FieldAccess(Expression expr,
Identifier name)
writeCode
public void writeCode()
- Writes the code this parse-tree presents for.
- Overrides:
- writeCode in class NonLeaf
getExpression
public Expression getExpression()
- Gets the expression accessed.
- Returns:
- the expression accessed.
setExpression
public void setExpression(Expression expr)
- Sets the expression accessed.
- Parameters:
- expr - the expression accessed.
getName
public Identifier getName()
- Gets the field name.
- Returns:
- the field name.
setName
public void setName(Identifier name)
- Sets the field name.
- Parameters:
- name - the field name.
All Packages Class Hierarchy This Package Previous Next Index