?? methodaccessors.html
字號:
<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 3. Method Accessors</title><link href="../docbook.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.65.0" name="generator"><link rel="home" href="index.html" title="OGNL Developer Guide"><link rel="up" href="index.html" title="OGNL Developer Guide"><link rel="previous" href="propertyAccessors.html" title="Chapter 2. Property Accessors"><link rel="next" href="elementsAccessors.html" title="Chapter 4. Elements Accessors"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">Chapter 3. Method Accessors</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="propertyAccessors.html"><img src="../images/navigation/prev.gif" alt="Prev"></a> </td><th align="center" width="60%"> </th><td align="right" width="20%"> <a accesskey="n" href="elementsAccessors.html"><img src="../images/navigation/next.gif" alt="Next"></a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="methodAccessors"></a>Chapter 3. Method Accessors</h2></div></div><div></div></div><p>Method calls are another area where OGNL needs to do lookups for methods based on dynamic information. The MethodAccessor interface provides a hook into how OGNL calls a method. When a static or instance method is requested the
implementor of this interface is called to actually execute the method.</p><pre class="programlisting">public interface MethodAccessor
{
Object callStaticMethod( Map context, Class targetClass, String methodName, List args ) throws MethodFailedException;
Object callMethod( Map context, Object target, String methodName, List args ) throws MethodFailedException;
}</pre><p>You can set a method accessor on a class-by-class basis using <tt class="methodname">OgnlRuntime.setMethodAccessor()</tt>. The is a default method accessor for <tt class="classname">Object</tt> (which simply finds an appropriate method based
on method name and argument types and uses reflection to call the method).</p></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="propertyAccessors.html"><img src="../images/navigation/prev.gif" alt="Prev"></a> </td><td align="center" width="20%"><a accesskey="u" href="index.html"><img src="../images/navigation/up.gif" alt="Up"></a></td><td align="right" width="40%"> <a accesskey="n" href="elementsAccessors.html"><img src="../images/navigation/next.gif" alt="Next"></a></td></tr><tr><td valign="top" align="left" width="40%">Chapter 2. Property Accessors </td><td align="center" width="20%"><a accesskey="h" href="index.html"><img src="../images/navigation/home.gif" alt="Home"></a></td><td valign="top" align="right" width="40%"> Chapter 4. Elements Accessors</td></tr></table></div></body></html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -