public final class FieldAccessExpr extends IdentifierExpr implements FieldAccessExpression
| Constructor and Description |
|---|
FieldAccessExpr()
The noarg constructor is needed for ANTLR support and deserialization.
|
FieldAccessExpr(antlr.Token token)
The noarg constructor is needed for ANTLR support.
|
| Modifier and Type | Method and Description |
|---|---|
void |
arrive(NodeVisitor visitor)
Delegates to the argument
visitor. |
java.lang.Object |
getFieldValue(javax.jdo.PersistenceManager pm,
java.lang.Object object)
Returns the value of the field corresponding with this
field access expression for the argument
object. |
java.lang.String |
getName()
Returns the name of the accessed field.
|
Expression |
getTarget()
Returns the target expression of this field access.
|
java.lang.Object |
leave(NodeVisitor visitor,
java.lang.Object[] results)
Delegates to the argument
visitor. |
void |
setName(java.lang.String fieldName)
Sets the name of the accessed field.
|
getTypeNameclone, getChildren, getJavaClass, getObject, getParent, getTokenType, setObject, setParent, toString, walkNextChildgetColumn, getLine, getTypeInfo, initialize, initialize, initialize, setColumn, setLine, setTypeInfo, treeToStringaddChild, decode, encode, equals, equalsList, equalsListPartial, equalsTree, equalsTreePartial, findAll, findAllPartial, getFirstChild, getNextSibling, getNumberOfChildren, getTokenNames, removeChildren, setFirstChild, setNextSibling, setVerboseStringConversion, toStringList, toStringTree, xmlSerialize, xmlSerializeNode, xmlSerializeRootClose, xmlSerializeRootOpenequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetTypeNamegetChildren, getJavaClass, getObject, getParent, getTokenType, setObject, setParent, walkNextChildpublic FieldAccessExpr()
setChildren optionally.public FieldAccessExpr(antlr.Token token)
setChildren optionally.public java.lang.String getName()
getName in interface IdentifierExpressiongetName in class IdentifierExprpublic void setName(java.lang.String fieldName)
fieldName - the field namepublic Expression getTarget()
ThisExpression or an instance of an arbitrary other
Expression, e.g. FieldAccessExpression.getTarget in interface FieldAccessExpressionpublic java.lang.Object getFieldValue(javax.jdo.PersistenceManager pm,
java.lang.Object object)
object.
Note: If the field value is obtained via reflection and
the reflection call throws an IllegalAccessException,
then undefined is returned.getFieldValue in interface FieldAccessExpressionpm - the persistence manager of the queryobject - the instance for which to return the field valueobjectJDOQueryException - if the access to the desired field is deniedpublic void arrive(NodeVisitor visitor)
visitor.arrive in interface Nodearrive in class IdentifierExprvisitor - the node visitorpublic java.lang.Object leave(NodeVisitor visitor, java.lang.Object[] results)
visitor.leave in interface Nodeleave in class IdentifierExprvisitor - the node visitorresults - the result arrayCopyright © 2005-2012 Apache Software Foundation. All Rights Reserved.