blob: 33bef1980035ae5c2627e72768ba97289e484e8c [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Wed Apr 14 08:26:35 EDT 2004 -->
<TITLE>
Velocity 1.4 API: Class ClassMap
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
</HEAD>
<BODY BGCOLOR="white">
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<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="class-use/ClassMap.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&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;PREV CLASS&nbsp;
&nbsp;<A HREF="../../../../../org/apache/velocity/util/introspection/ClassMap.CacheMiss.html"><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="ClassMap.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: &nbsp;<A HREF="#inner_class_summary">INNER</A>&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&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;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.apache.velocity.util.introspection</FONT>
<BR>
Class ClassMap</H2>
<PRE>
java.lang.Object
|
+--<B>org.apache.velocity.util.introspection.ClassMap</B>
</PRE>
<HR>
<DL>
<DT>public class <B>ClassMap</B><DT>extends java.lang.Object</DL>
<P>
A cache of introspection information for a specific class instance.
Keys <CODE>java.lang.Method</CODE> objects by a concatenation of the
method name and the names of classes that make up the parameters.
<P>
<DL>
<DT><B>Version: </B><DD>$Id: ClassMap.java,v 1.20.8.1 2004/03/03 23:23:08 geirm Exp $</DD>
<DT><B>Author: </B><DD><a href="mailto:jvanzyl@apache.org">Jason van Zyl</a>, <a href="mailto:bob@werken.com">Bob McWhirter</a>, <a href="mailto:szegedia@freemail.hu">Attila Szegedi</a>, <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a></DD>
</DL>
<HR>
<P>
<!-- ======== INNER CLASS SUMMARY ======== -->
<A NAME="inner_class_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Inner Class Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static&nbsp;class</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/util/introspection/ClassMap.CacheMiss.html">ClassMap.CacheMiss</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static&nbsp;class</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/util/introspection/ClassMap.MethodInfo.html">ClassMap.MethodInfo</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Used for the iterative discovery process for public methods.</TD>
</TR>
</TABLE>
&nbsp;
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<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>private static&nbsp;<A HREF="../../../../../org/apache/velocity/util/introspection/ClassMap.CacheMiss.html">ClassMap.CacheMiss</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/util/introspection/ClassMap.html#CACHE_MISS">CACHE_MISS</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;java.lang.Class</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/util/introspection/ClassMap.html#clazz">clazz</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Class passed into the constructor used to as
the basis for the Method map.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;java.util.Map</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/util/introspection/ClassMap.html#methodCache">methodCache</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Cache of Methods, or CACHE_MISS, keyed by method
name and actual arguments used to find it.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;<A HREF="../../../../../org/apache/velocity/util/introspection/MethodMap.html">MethodMap</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/util/introspection/ClassMap.html#methodMap">methodMap</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static&nbsp;java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/util/introspection/ClassMap.html#OBJECT">OBJECT</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private </CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/util/introspection/ClassMap.html#ClassMap()">ClassMap</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/util/introspection/ClassMap.html#ClassMap(java.lang.Class)">ClassMap</A></B>(java.lang.Class&nbsp;clazz)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Standard constructor</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<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>&nbsp;java.lang.reflect.Method</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/util/introspection/ClassMap.html#findMethod(java.lang.String, java.lang.Object[])">findMethod</A></B>(java.lang.String&nbsp;name,
java.lang.Object[]&nbsp;params)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Find a Method using the methodKey
provided.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static&nbsp;java.lang.reflect.Method[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/util/introspection/ClassMap.html#getAccessibleMethods(java.lang.Class)">getAccessibleMethods</A></B>(java.lang.Class&nbsp;clazz)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retrieves public methods for a class.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/util/introspection/ClassMap.html#getAccessibleMethods(java.lang.Class, org.apache.velocity.util.introspection.ClassMap.MethodInfo[], int)">getAccessibleMethods</A></B>(java.lang.Class&nbsp;clazz,
<A HREF="../../../../../org/apache/velocity/util/introspection/ClassMap.MethodInfo.html">ClassMap.MethodInfo</A>[]&nbsp;methodInfos,
int&nbsp;upcastCount)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Recursively finds a match for each method, starting with the class, and then
searching the superclass and interfaces.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) &nbsp;java.lang.Class</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/util/introspection/ClassMap.html#getCachedClass()">getCachedClass</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static&nbsp;java.lang.reflect.Method</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/util/introspection/ClassMap.html#getPublicMethod(java.lang.Class, java.lang.String, java.lang.Class[])">getPublicMethod</A></B>(java.lang.Class&nbsp;clazz,
java.lang.String&nbsp;name,
java.lang.Class[]&nbsp;paramTypes)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Looks up the method with specified name and signature in the first public
superclass or implemented interface of the class.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.lang.reflect.Method</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/util/introspection/ClassMap.html#getPublicMethod(java.lang.reflect.Method)">getPublicMethod</A></B>(java.lang.reflect.Method&nbsp;method)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;For a given method, retrieves its publicly accessible counterpart.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/util/introspection/ClassMap.html#makeMethodKey(java.lang.reflect.Method)">makeMethodKey</A></B>(java.lang.reflect.Method&nbsp;method)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Make a methodKey for the given method using
the concatenation of the name and the
types of the method parameters.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/util/introspection/ClassMap.html#makeMethodKey(java.lang.String, java.lang.Object[])">makeMethodKey</A></B>(java.lang.String&nbsp;method,
java.lang.Object[]&nbsp;params)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/util/introspection/ClassMap.html#populateMethodCache()">populateMethodCache</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Populate the Map of direct hits.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><clinit>, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Field Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="CACHE_MISS"><!-- --></A><H3>
CACHE_MISS</H3>
<PRE>
private static final <A HREF="../../../../../org/apache/velocity/util/introspection/ClassMap.CacheMiss.html">ClassMap.CacheMiss</A> <B>CACHE_MISS</B></PRE>
<DL>
</DL>
<HR>
<A NAME="OBJECT"><!-- --></A><H3>
OBJECT</H3>
<PRE>
private static final java.lang.Object <B>OBJECT</B></PRE>
<DL>
</DL>
<HR>
<A NAME="clazz"><!-- --></A><H3>
clazz</H3>
<PRE>
private java.lang.Class <B>clazz</B></PRE>
<DL>
<DD>Class passed into the constructor used to as
the basis for the Method map.</DL>
<HR>
<A NAME="methodCache"><!-- --></A><H3>
methodCache</H3>
<PRE>
private java.util.Map <B>methodCache</B></PRE>
<DL>
<DD>Cache of Methods, or CACHE_MISS, keyed by method
name and actual arguments used to find it.</DL>
<HR>
<A NAME="methodMap"><!-- --></A><H3>
methodMap</H3>
<PRE>
private <A HREF="../../../../../org/apache/velocity/util/introspection/MethodMap.html">MethodMap</A> <B>methodMap</B></PRE>
<DL>
</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="ClassMap(java.lang.Class)"><!-- --></A><H3>
ClassMap</H3>
<PRE>
public <B>ClassMap</B>(java.lang.Class&nbsp;clazz)</PRE>
<DL>
<DD>Standard constructor</DL>
<HR>
<A NAME="ClassMap()"><!-- --></A><H3>
ClassMap</H3>
<PRE>
private <B>ClassMap</B>()</PRE>
<DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="getCachedClass()"><!-- --></A><H3>
getCachedClass</H3>
<PRE>
java.lang.Class <B>getCachedClass</B>()</PRE>
<DL>
<DD><DL>
<DT><B>Returns:</B><DD>the class object whose methods are cached by this map.</DL>
</DD>
</DL>
<HR>
<A NAME="findMethod(java.lang.String, java.lang.Object[])"><!-- --></A><H3>
findMethod</H3>
<PRE>
public java.lang.reflect.Method <B>findMethod</B>(java.lang.String&nbsp;name,
java.lang.Object[]&nbsp;params)
throws <A HREF="../../../../../org/apache/velocity/util/introspection/MethodMap.AmbiguousException.html">MethodMap.AmbiguousException</A></PRE>
<DL>
<DD>Find a Method using the methodKey
provided.
Look in the methodMap for an entry. If found,
it'll either be a CACHE_MISS, in which case we
simply give up, or it'll be a Method, in which
case, we return it.
If nothing is found, then we must actually go
and introspect the method from the MethodMap.</DL>
<HR>
<A NAME="populateMethodCache()"><!-- --></A><H3>
populateMethodCache</H3>
<PRE>
private void <B>populateMethodCache</B>()</PRE>
<DL>
<DD>Populate the Map of direct hits. These
are taken from all the public methods
that our class provides.</DL>
<HR>
<A NAME="makeMethodKey(java.lang.reflect.Method)"><!-- --></A><H3>
makeMethodKey</H3>
<PRE>
private java.lang.String <B>makeMethodKey</B>(java.lang.reflect.Method&nbsp;method)</PRE>
<DL>
<DD>Make a methodKey for the given method using
the concatenation of the name and the
types of the method parameters.</DL>
<HR>
<A NAME="makeMethodKey(java.lang.String, java.lang.Object[])"><!-- --></A><H3>
makeMethodKey</H3>
<PRE>
private static java.lang.String <B>makeMethodKey</B>(java.lang.String&nbsp;method,
java.lang.Object[]&nbsp;params)</PRE>
<DL>
</DL>
<HR>
<A NAME="getAccessibleMethods(java.lang.Class)"><!-- --></A><H3>
getAccessibleMethods</H3>
<PRE>
private static java.lang.reflect.Method[] <B>getAccessibleMethods</B>(java.lang.Class&nbsp;clazz)</PRE>
<DL>
<DD>Retrieves public methods for a class. In case the class is not
public, retrieves methods with same signature as its public methods
from public superclasses and interfaces (if they exist). Basically
upcasts every method to the nearest acccessible method.</DL>
<HR>
<A NAME="getAccessibleMethods(java.lang.Class, org.apache.velocity.util.introspection.ClassMap.MethodInfo[], int)"><!-- --></A><H3>
getAccessibleMethods</H3>
<PRE>
private static int <B>getAccessibleMethods</B>(java.lang.Class&nbsp;clazz,
<A HREF="../../../../../org/apache/velocity/util/introspection/ClassMap.MethodInfo.html">ClassMap.MethodInfo</A>[]&nbsp;methodInfos,
int&nbsp;upcastCount)</PRE>
<DL>
<DD>Recursively finds a match for each method, starting with the class, and then
searching the superclass and interfaces.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>clazz</CODE> - Class to check<DD><CODE>methodInfos</CODE> - array of methods we are searching to match<DD><CODE>upcastCount</CODE> - current number of methods we have matched<DT><B>Returns:</B><DD>count of matched methods</DL>
</DD>
</DL>
<HR>
<A NAME="getPublicMethod(java.lang.reflect.Method)"><!-- --></A><H3>
getPublicMethod</H3>
<PRE>
public static java.lang.reflect.Method <B>getPublicMethod</B>(java.lang.reflect.Method&nbsp;method)</PRE>
<DL>
<DD>For a given method, retrieves its publicly accessible counterpart.
This method will look for a method with same name
and signature declared in a public superclass or implemented interface of this
method's declaring class. This counterpart method is publicly callable.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>method</CODE> - a method whose publicly callable counterpart is requested.<DT><B>Returns:</B><DD>the publicly callable counterpart method. Note that if the parameter
method is itself declared by a public class, this method is an identity
function.</DL>
</DD>
</DL>
<HR>
<A NAME="getPublicMethod(java.lang.Class, java.lang.String, java.lang.Class[])"><!-- --></A><H3>
getPublicMethod</H3>
<PRE>
private static java.lang.reflect.Method <B>getPublicMethod</B>(java.lang.Class&nbsp;clazz,
java.lang.String&nbsp;name,
java.lang.Class[]&nbsp;paramTypes)</PRE>
<DL>
<DD>Looks up the method with specified name and signature in the first public
superclass or implemented interface of the class.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>class</CODE> - the class whose method is sought<DD><CODE>name</CODE> - the name of the method<DD><CODE>paramTypes</CODE> - the classes of method parameters</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<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="class-use/ClassMap.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&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;PREV CLASS&nbsp;
&nbsp;<A HREF="../../../../../org/apache/velocity/util/introspection/ClassMap.CacheMiss.html"><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="ClassMap.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: &nbsp;<A HREF="#inner_class_summary">INNER</A>&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&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;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
Copyright © 2002 Apache Software Foundation. All Rights Reserved.
</BODY>
</HTML>