📄 simplenode.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.4.2_05) on Sat Aug 14 08:12:34 GMT-07:00 2004 -->
<TITLE>
SimpleNode (OGNL)
</TITLE>
<META NAME="keywords" CONTENT="ognl.SimpleNode class">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="SimpleNode (OGNL)";
}
</SCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A><A HREF="#skip-navbar_top" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../ognl/SetPropertyAccessor.html" title="class in ognl"><B>PREV CLASS</B></A>
<A HREF="../ognl/Token.html" title="class in ognl"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../index.html" target="_top"><B>FRAMES</B></A>
<A HREF="SimpleNode.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A><!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
ognl</FONT>
<BR>
Class SimpleNode</H2>
<PRE>
java.lang.Object
<IMG SRC="../resources/inherit.gif" ALT="extended by"><B>ognl.SimpleNode</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../ognl/Node.html" title="interface in ognl">Node</A>, java.io.Serializable</DD>
</DL>
<DL>
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../ognl/ExpressionNode.html" title="class in ognl">ExpressionNode</A></DD>
</DL>
<HR>
<DL>
<DT>public abstract class <B>SimpleNode</B><DT>extends java.lang.Object<DT>implements <A HREF="../ognl/Node.html" title="interface in ognl">Node</A>, java.io.Serializable</DL>
<P>
<DL>
<DT><B>Author:</B></DT> <DD>Luke Blanshard (blanshlu@netscape.net), Drew Davidson (drew@ognl.org)</DD><DT><B>See Also:</B><DD><A HREF="../serialized-form.html#ognl.SimpleNode">Serialized Form</A></DL>
<HR>
<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Field Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected <A HREF="../ognl/Node.html" title="interface in ognl">Node</A>[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../ognl/SimpleNode.html#children">children</A></B></CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../ognl/SimpleNode.html#id">id</A></B></CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected <A HREF="../ognl/Node.html" title="interface in ognl">Node</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../ognl/SimpleNode.html#parent">parent</A></B></CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected <A HREF="../ognl/OgnlParser.html" title="class in ognl">OgnlParser</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../ognl/SimpleNode.html#parser">parser</A></B></CODE>
<BR>
</TD>
</TR>
</TABLE>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../ognl/SimpleNode.html#SimpleNode(int)">SimpleNode</A></B>(int i)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../ognl/SimpleNode.html#SimpleNode(ognl.OgnlParser, int)">SimpleNode</A></B>(<A HREF="../ognl/OgnlParser.html" title="class in ognl">OgnlParser</A> p, int i)</CODE>
<BR>
</TD>
</TR>
</TABLE>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../ognl/SimpleNode.html#dump(java.io.PrintWriter, java.lang.String)">dump</A></B>(java.io.PrintWriter writer, java.lang.String prefix)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../ognl/SimpleNode.html#evaluateGetValueBody(ognl.OgnlContext, java.lang.Object)">evaluateGetValueBody</A></B>(<A HREF="../ognl/OgnlContext.html" title="class in ognl">OgnlContext</A> context, java.lang.Object source)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../ognl/SimpleNode.html#evaluateSetValueBody(ognl.OgnlContext, java.lang.Object, java.lang.Object)">evaluateSetValueBody</A></B>(<A HREF="../ognl/OgnlContext.html" title="class in ognl">OgnlContext</A> context, java.lang.Object target, java.lang.Object value)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../ognl/SimpleNode.html#flattenTree()">flattenTree</A></B>()</CODE>
<BR>
This method may be called from subclasses' jjtClose methods.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../ognl/SimpleNode.html#getIndexInParent()">getIndexInParent</A></B>()</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../ognl/Node.html" title="interface in ognl">Node</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../ognl/SimpleNode.html#getNextSibling()">getNextSibling</A></B>()</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../ognl/SimpleNode.html#getValue(ognl.OgnlContext, java.lang.Object)">getValue</A></B>(<A HREF="../ognl/OgnlContext.html" title="class in ognl">OgnlContext</A> context, java.lang.Object source)</CODE>
<BR>
Extracts the value from the given source object that is appropriate for this node within the given context.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected abstract java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../ognl/SimpleNode.html#getValueBody(ognl.OgnlContext, java.lang.Object)">getValueBody</A></B>(<A HREF="../ognl/OgnlContext.html" title="class in ognl">OgnlContext</A> context, java.lang.Object source)</CODE>
<BR>
Subclasses implement this method to do the actual work of extracting the appropriate value from the source object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../ognl/SimpleNode.html#isConstant(ognl.OgnlContext)">isConstant</A></B>(<A HREF="../ognl/OgnlContext.html" title="class in ognl">OgnlContext</A> context)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../ognl/SimpleNode.html#isNodeConstant(ognl.OgnlContext)">isNodeConstant</A></B>(<A HREF="../ognl/OgnlContext.html" title="class in ognl">OgnlContext</A> context)</CODE>
<BR>
Returns true iff this node is constant without respect to the children.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../ognl/SimpleNode.html#isNodeSimpleProperty(ognl.OgnlContext)">isNodeSimpleProperty</A></B>(<A HREF="../ognl/OgnlContext.html" title="class in ognl">OgnlContext</A> context)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../ognl/SimpleNode.html#isSimpleNavigationChain(ognl.OgnlContext)">isSimpleNavigationChain</A></B>(<A HREF="../ognl/OgnlContext.html" title="class in ognl">OgnlContext</A> context)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../ognl/SimpleNode.html#isSimpleProperty(ognl.OgnlContext)">isSimpleProperty</A></B>(<A HREF="../ognl/OgnlContext.html" title="class in ognl">OgnlContext</A> context)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../ognl/SimpleNode.html#jjtAddChild(ognl.Node, int)">jjtAddChild</A></B>(<A HREF="../ognl/Node.html" title="interface in ognl">Node</A> n, int i)</CODE>
<BR>
This method tells the node to add its argument to the node's list of children.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../ognl/SimpleNode.html#jjtClose()">jjtClose</A></B>()</CODE>
<BR>
This method is called after all the child nodes have been added.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../ognl/Node.html" title="interface in ognl">Node</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../ognl/SimpleNode.html#jjtGetChild(int)">jjtGetChild</A></B>(int i)</CODE>
<BR>
This method returns a child node.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../ognl/SimpleNode.html#jjtGetNumChildren()">jjtGetNumChildren</A></B>()</CODE>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -