⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 objectindexedpropertydescriptor.html

📁 ONGL学习的好书,介绍ONGL的相关知识
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!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:33 GMT-07:00 2004 -->
<TITLE>
ObjectIndexedPropertyDescriptor (OGNL)
</TITLE>

<META NAME="keywords" CONTENT="ognl.ObjectIndexedPropertyDescriptor class">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    parent.document.title="ObjectIndexedPropertyDescriptor (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>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../ognl/ObjectElementsAccessor.html" title="class in ognl"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../ognl/ObjectMethodAccessor.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>  &nbsp;
&nbsp;<A HREF="ObjectIndexedPropertyDescriptor.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<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:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<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 ObjectIndexedPropertyDescriptor</H2>
<PRE>
java.lang.Object
  <IMG SRC="../resources/inherit.gif" ALT="extended by">java.beans.FeatureDescriptor
      <IMG SRC="../resources/inherit.gif" ALT="extended by">java.beans.PropertyDescriptor
          <IMG SRC="../resources/inherit.gif" ALT="extended by"><B>ognl.ObjectIndexedPropertyDescriptor</B>
</PRE>
<HR>
<DL>
<DT>public class <B>ObjectIndexedPropertyDescriptor</B><DT>extends java.beans.PropertyDescriptor</DL>

<P>
<p>PropertyDescriptor subclass that describes an indexed set of read/write methods to get a property. Unlike IndexedPropertyDescriptor this allows the "key" to be an arbitrary object rather than just an int.  Consequently it does not have a "readMethod" or "writeMethod" because it only expects a pattern like:</p><pre>    public void set<i>Property</i>(<i>KeyType</i>, <i>ValueType</i>);    public <i>ValueType</i> get<i>Property</i>(<i>KeyType</i>);</pre> <p>and does not require the methods that access it as an array.  OGNL can get away with this without losing functionality because if the object does expose the properties they are most probably in a Map and that case is handled by the normal OGNL property accessors.</p><p>For example, if an object were to have methods that accessed and "attributes" property it would be natural to index them by String rather than by integer and expose the attributes as a map with a different property name:<pre>    public void setAttribute(String name, Object value);    public Object getAttribute(String name);    public Map getAttributes();</pre><p>Note that the index get/set is called get/set <code>Attribute</code> whereas the collection getter is called <code>Attributes</code>.  This case is handled unambiguously by the OGNL property accessors because the set/get<code>Attribute</code> methods are detected by this object and the "attributes" case is handled by the <code>MapPropertyAccessor</code>. Therefore OGNL expressions calling this code would be handled in the following way:</p><table>  <tr><th>OGNL Expression</th>      <th>Handling</th>  </tr>  <tr>      <td><code>attribute["name"]</code></td>      <td>Handled by an index getter, like <code>getAttribute(String)</code>.</td>  </tr>  <tr>      <td><code>attribute["name"] = value</code></td>      <td>Handled by an index setter, like <code>setAttribute(String, Object)</code>.</td>  </tr>  <tr>      <td><code>attributes["name"]</code></td>      <td>Handled by <code>MapPropertyAccessor</code> via a <code>Map.get()</code>.  This          will <b>not</b> go through the index get accessor.      </td>  </tr>  <tr>      <td><code>attributes["name"] = value</code></td>      <td>Handled by <code>MapPropertyAccessor</code> via a <code>Map.put()</code>.  This          will <b>not</b> go through the index set accessor.      </td>  </tr> </table>
<P>

<P>
<DL>
<DT><B>Author:</B></DT>  <DD>Luke Blanshard (blanshlu@netscape.net), Drew Davidson (drew@ognl.org)</DD></DL>
<HR>

<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->


<!-- =========== FIELD SUMMARY =========== -->


<!-- ======== 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/ObjectIndexedPropertyDescriptor.html#ObjectIndexedPropertyDescriptor(java.lang.String, java.lang.Class, java.lang.reflect.Method, java.lang.reflect.Method)">ObjectIndexedPropertyDescriptor</A></B>(java.lang.String&nbsp;propertyName,                                java.lang.Class&nbsp;propertyType,                                java.lang.reflect.Method&nbsp;indexedReadMethod,                                java.lang.reflect.Method&nbsp;indexedWriteMethod)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -