|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectognl.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. |
ExpressionAccessor |
getAccessor()
Gets the compiled bytecode enhanced expression accessor for getting/setting values. |
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. |
protected boolean |
lastChild(OgnlContext context)
|
void |
setAccessor(ExpressionAccessor accessor)
Sets a new compiled accessor for this node expression. |
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 |
toGetSourceString(OgnlContext context,
java.lang.Object target)
Expected to return a java source representation of itself such that it could be turned into a literal java expression to be compiled and executed for ExpressionAccessor.get(OgnlContext, Object) calls. |
java.lang.String |
toSetSourceString(OgnlContext context,
java.lang.Object target)
Expected to return a java source representation of itself such that it could be turned into a literal java expression to be compiled and executed for ExpressionAccessor.get(OgnlContext, Object) calls. |
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 Nodepublic void jjtClose()
Node
jjtClose in interface Nodepublic void jjtSetParent(Node n)
Node
jjtSetParent in interface Nodepublic Node jjtGetParent()
jjtGetParent in interface Node
public void jjtAddChild(Node n,
int i)
Node
jjtAddChild in interface Nodepublic Node jjtGetChild(int i)
Node
jjtGetChild in interface Nodepublic int jjtGetNumChildren()
Node
jjtGetNumChildren in interface Nodepublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toString(java.lang.String prefix)
public java.lang.String toGetSourceString(OgnlContext context,
java.lang.Object target)
JavaSourceExpressionAccessor.get(OgnlContext, Object) calls.
toGetSourceString in interface JavaSource
public java.lang.String toSetSourceString(OgnlContext context,
java.lang.Object target)
JavaSourceExpressionAccessor.get(OgnlContext, Object) calls.
toSetSourceString in interface JavaSource
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 NodeOgnlException
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 NodeOgnlException
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
OgnlExceptionprotected boolean lastChild(OgnlContext context)
protected void flattenTree()
public ExpressionAccessor getAccessor()
Node
getAccessor in interface Nodepublic void setAccessor(ExpressionAccessor accessor)
Node
setAccessor in interface Nodeaccessor - The compiled representation of this node.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||