|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ibatis.ognl.SimpleNode
public abstract class SimpleNode
Field Summary | |
---|---|
protected Node[] |
children
|
protected int |
id
|
protected Node |
parent
|
protected OgnlParser |
parser
|
Constructor Summary | |
---|---|
SimpleNode(int i)
|
|
SimpleNode(OgnlParser p,
int i)
|
Method Summary | |
---|---|
void |
dump(java.io.PrintWriter writer,
java.lang.String prefix)
|
protected java.lang.Object |
evaluateGetValueBody(OgnlContext context,
java.lang.Object source)
|
protected void |
evaluateSetValueBody(OgnlContext context,
java.lang.Object target,
java.lang.Object value)
|
protected void |
flattenTree()
This method may be called from subclasses' jjtClose methods. |
int |
getIndexInParent()
|
Node |
getNextSibling()
|
java.lang.Object |
getValue(OgnlContext context,
java.lang.Object source)
Extracts the value from the given source object that is appropriate for this node within the given context. |
protected abstract java.lang.Object |
getValueBody(OgnlContext context,
java.lang.Object source)
Subclasses implement this method to do the actual work of extracting the appropriate value from the source object. |
boolean |
isConstant(OgnlContext context)
|
boolean |
isNodeConstant(OgnlContext context)
Returns true iff this node is constant without respect to the children. |
boolean |
isNodeSimpleProperty(OgnlContext context)
|
boolean |
isSimpleNavigationChain(OgnlContext context)
|
boolean |
isSimpleProperty(OgnlContext context)
|
void |
jjtAddChild(Node n,
int i)
This method tells the node to add its argument to the node's list of children. |
void |
jjtClose()
This method is called after all the child nodes have been added. |
Node |
jjtGetChild(int i)
This method returns a child node. |
int |
jjtGetNumChildren()
Return the number of children the node has. |
Node |
jjtGetParent()
|
void |
jjtOpen()
This method is called after the node has been made the current node. |
void |
jjtSetParent(Node n)
This pair of methods are used to inform the node of its parent. |
void |
setValue(OgnlContext context,
java.lang.Object target,
java.lang.Object value)
Sets the given value in the given target as appropriate for this node within the given context. |
protected void |
setValueBody(OgnlContext context,
java.lang.Object target,
java.lang.Object value)
Subclasses implement this method to do the actual work of setting the appropriate value in the target object. |
java.lang.String |
toString()
|
java.lang.String |
toString(java.lang.String prefix)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Node parent
protected Node[] children
protected int id
protected OgnlParser parser
Constructor Detail |
---|
public SimpleNode(int i)
public SimpleNode(OgnlParser p, int i)
Method Detail |
---|
public void jjtOpen()
Node
jjtOpen
in interface Node
public void jjtClose()
Node
jjtClose
in interface Node
public void jjtSetParent(Node n)
Node
jjtSetParent
in interface Node
public Node jjtGetParent()
jjtGetParent
in interface Node
public void jjtAddChild(Node n, int i)
Node
jjtAddChild
in interface Node
public Node jjtGetChild(int i)
Node
jjtGetChild
in interface Node
public int jjtGetNumChildren()
Node
jjtGetNumChildren
in interface Node
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(java.lang.String prefix)
public void dump(java.io.PrintWriter writer, java.lang.String prefix)
public int getIndexInParent()
public Node getNextSibling()
protected java.lang.Object evaluateGetValueBody(OgnlContext context, java.lang.Object source) throws OgnlException
OgnlException
protected void evaluateSetValueBody(OgnlContext context, java.lang.Object target, java.lang.Object value) throws OgnlException
OgnlException
public final java.lang.Object getValue(OgnlContext context, java.lang.Object source) throws OgnlException
Node
getValue
in interface Node
OgnlException
protected abstract java.lang.Object getValueBody(OgnlContext context, java.lang.Object source) throws OgnlException
OgnlException
public final void setValue(OgnlContext context, java.lang.Object target, java.lang.Object value) throws OgnlException
Node
setValue
in interface Node
OgnlException
protected void setValueBody(OgnlContext context, java.lang.Object target, java.lang.Object value) throws OgnlException
InappropriateExpressionException
, meaning that it
cannot be a set expression.
OgnlException
public boolean isNodeConstant(OgnlContext context) throws OgnlException
OgnlException
public boolean isConstant(OgnlContext context) throws OgnlException
OgnlException
public boolean isNodeSimpleProperty(OgnlContext context) throws OgnlException
OgnlException
public boolean isSimpleProperty(OgnlContext context) throws OgnlException
OgnlException
public boolean isSimpleNavigationChain(OgnlContext context) throws OgnlException
OgnlException
protected void flattenTree()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |