blob: 8ce17e722053de927c361c24b820d2c6dc96ba07 [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 MethodMap
</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/MethodMap.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;<A HREF="../../../../../org/apache/velocity/util/introspection/IntrospectorBase.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../org/apache/velocity/util/introspection/UberspectImpl.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="MethodMap.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 MethodMap</H2>
<PRE>
java.lang.Object
|
+--<B>org.apache.velocity.util.introspection.MethodMap</B>
</PRE>
<HR>
<DL>
<DT>public class <B>MethodMap</B><DT>extends java.lang.Object</DL>
<P>
<DL>
<DT><B>Version: </B><DD>$Id: MethodMap.java,v 1.15.4.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:Christoph.Reck@dlr.de">Christoph Reck</a>, <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>, <a href="mailto:szegedia@freemail.hu">Attila Szegedi</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>static&nbsp;class</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/util/introspection/MethodMap.AmbiguousException.html">MethodMap.AmbiguousException</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;simple distinguishable exception, used when
we run across ambiguous overloading</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;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/util/introspection/MethodMap.html#INCOMPARABLE">INCOMPARABLE</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;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/util/introspection/MethodMap.html#LESS_SPECIFIC">LESS_SPECIFIC</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>(package private) &nbsp;java.util.Map</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/util/introspection/MethodMap.html#methodByNameMap">methodByNameMap</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Keep track of all methods with the same name.</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/MethodMap.html#MORE_SPECIFIC">MORE_SPECIFIC</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><CODE><B><A HREF="../../../../../org/apache/velocity/util/introspection/MethodMap.html#MethodMap()">MethodMap</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</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;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/util/introspection/MethodMap.html#add(java.lang.reflect.Method)">add</A></B>(java.lang.reflect.Method&nbsp;method)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Add a method to a list of methods by name.</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/MethodMap.html#find(java.lang.String, java.lang.Object[])">find</A></B>(java.lang.String&nbsp;methodName,
java.lang.Object[]&nbsp;args)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Find a method.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.List</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/util/introspection/MethodMap.html#get(java.lang.String)">get</A></B>(java.lang.String&nbsp;key)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return a list of methods with the same name.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static&nbsp;java.util.LinkedList</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/util/introspection/MethodMap.html#getApplicables(java.util.List, java.lang.Class[])">getApplicables</A></B>(java.util.List&nbsp;methods,
java.lang.Class[]&nbsp;classes)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns all methods that are applicable to actual argument types.</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/MethodMap.html#getMostSpecific(java.util.List, java.lang.Class[])">getMostSpecific</A></B>(java.util.List&nbsp;methods,
java.lang.Class[]&nbsp;classes)</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;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/util/introspection/MethodMap.html#isApplicable(java.lang.reflect.Method, java.lang.Class[])">isApplicable</A></B>(java.lang.reflect.Method&nbsp;method,
java.lang.Class[]&nbsp;classes)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if the supplied method is applicable to actual
argument types.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/util/introspection/MethodMap.html#isMethodInvocationConvertible(java.lang.Class, java.lang.Class)">isMethodInvocationConvertible</A></B>(java.lang.Class&nbsp;formal,
java.lang.Class&nbsp;actual)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determines whether a type represented by a class object is
convertible to another type represented by a class object using a
method invocation conversion, treating object types of primitive
types as if they were primitive types (that is, a Boolean actual
parameter type matches boolean primitive formal type).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/util/introspection/MethodMap.html#isStrictMethodInvocationConvertible(java.lang.Class, java.lang.Class)">isStrictMethodInvocationConvertible</A></B>(java.lang.Class&nbsp;formal,
java.lang.Class&nbsp;actual)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determines whether a type represented by a class object is
convertible to another type represented by a class object using a
method invocation conversion, without matching object and primitive
types.</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/MethodMap.html#moreSpecific(java.lang.Class[], java.lang.Class[])">moreSpecific</A></B>(java.lang.Class[]&nbsp;c1,
java.lang.Class[]&nbsp;c2)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determines which method signature (represented by a class array) is more
specific.</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="MORE_SPECIFIC"><!-- --></A><H3>
MORE_SPECIFIC</H3>
<PRE>
private static final int <B>MORE_SPECIFIC</B></PRE>
<DL>
</DL>
<HR>
<A NAME="LESS_SPECIFIC"><!-- --></A><H3>
LESS_SPECIFIC</H3>
<PRE>
private static final int <B>LESS_SPECIFIC</B></PRE>
<DL>
</DL>
<HR>
<A NAME="INCOMPARABLE"><!-- --></A><H3>
INCOMPARABLE</H3>
<PRE>
private static final int <B>INCOMPARABLE</B></PRE>
<DL>
</DL>
<HR>
<A NAME="methodByNameMap"><!-- --></A><H3>
methodByNameMap</H3>
<PRE>
java.util.Map <B>methodByNameMap</B></PRE>
<DL>
<DD>Keep track of all methods with the same name.</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="MethodMap()"><!-- --></A><H3>
MethodMap</H3>
<PRE>
public <B>MethodMap</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="add(java.lang.reflect.Method)"><!-- --></A><H3>
add</H3>
<PRE>
public void <B>add</B>(java.lang.reflect.Method&nbsp;method)</PRE>
<DL>
<DD>Add a method to a list of methods by name.
For a particular class we are keeping track
of all the methods with the same name.</DL>
<HR>
<A NAME="get(java.lang.String)"><!-- --></A><H3>
get</H3>
<PRE>
public java.util.List <B>get</B>(java.lang.String&nbsp;key)</PRE>
<DL>
<DD>Return a list of methods with the same name.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>String</CODE> - key<DT><B>Returns:</B><DD>List list of methods</DL>
</DD>
</DL>
<HR>
<A NAME="find(java.lang.String, java.lang.Object[])"><!-- --></A><H3>
find</H3>
<PRE>
public java.lang.reflect.Method <B>find</B>(java.lang.String&nbsp;methodName,
java.lang.Object[]&nbsp;args)
throws <A HREF="../../../../../org/apache/velocity/util/introspection/MethodMap.AmbiguousException.html">MethodMap.AmbiguousException</A></PRE>
<DL>
<DD><p>
Find a method. Attempts to find the
most specific applicable method using the
algorithm described in the JLS section
15.12.2 (with the exception that it can't
distinguish a primitive type argument from
an object type argument, since in reflection
primitive type arguments are represented by
their object counterparts, so for an argument of
type (say) java.lang.Integer, it will not be able
to decide between a method that takes int and a
method that takes java.lang.Integer as a parameter.
</p>
<p>
This turns out to be a relatively rare case
where this is needed - however, functionality
like this is needed.
</p><DD><DL>
<DT><B>Parameters:</B><DD><CODE>methodName</CODE> - name of method<DD><CODE>args</CODE> - the actual arguments with which the method is called<DT><B>Returns:</B><DD>the most specific applicable method, or null if no
method is applicable.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../../org/apache/velocity/util/introspection/MethodMap.AmbiguousException.html">MethodMap.AmbiguousException</A></CODE> - if there is more than one maximally
specific applicable method</DL>
</DD>
</DL>
<HR>
<A NAME="getMostSpecific(java.util.List, java.lang.Class[])"><!-- --></A><H3>
getMostSpecific</H3>
<PRE>
private static java.lang.reflect.Method <B>getMostSpecific</B>(java.util.List&nbsp;methods,
java.lang.Class[]&nbsp;classes)
throws <A HREF="../../../../../org/apache/velocity/util/introspection/MethodMap.AmbiguousException.html">MethodMap.AmbiguousException</A></PRE>
<DL>
</DL>
<HR>
<A NAME="moreSpecific(java.lang.Class[], java.lang.Class[])"><!-- --></A><H3>
moreSpecific</H3>
<PRE>
private static int <B>moreSpecific</B>(java.lang.Class[]&nbsp;c1,
java.lang.Class[]&nbsp;c2)</PRE>
<DL>
<DD>Determines which method signature (represented by a class array) is more
specific. This defines a partial ordering on the method signatures.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>c1</CODE> - first signature to compare<DD><CODE>c2</CODE> - second signature to compare<DT><B>Returns:</B><DD>MORE_SPECIFIC if c1 is more specific than c2, LESS_SPECIFIC if
c1 is less specific than c2, INCOMPARABLE if they are incomparable.</DL>
</DD>
</DL>
<HR>
<A NAME="getApplicables(java.util.List, java.lang.Class[])"><!-- --></A><H3>
getApplicables</H3>
<PRE>
private static java.util.LinkedList <B>getApplicables</B>(java.util.List&nbsp;methods,
java.lang.Class[]&nbsp;classes)</PRE>
<DL>
<DD>Returns all methods that are applicable to actual argument types.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>methods</CODE> - list of all candidate methods<DD><CODE>classes</CODE> - the actual types of the arguments<DT><B>Returns:</B><DD>a list that contains only applicable methods (number of
formal and actual arguments matches, and argument types are assignable
to formal types through a method invocation conversion).</DL>
</DD>
</DL>
<HR>
<A NAME="isApplicable(java.lang.reflect.Method, java.lang.Class[])"><!-- --></A><H3>
isApplicable</H3>
<PRE>
private static boolean <B>isApplicable</B>(java.lang.reflect.Method&nbsp;method,
java.lang.Class[]&nbsp;classes)</PRE>
<DL>
<DD>Returns true if the supplied method is applicable to actual
argument types.</DL>
<HR>
<A NAME="isMethodInvocationConvertible(java.lang.Class, java.lang.Class)"><!-- --></A><H3>
isMethodInvocationConvertible</H3>
<PRE>
private static boolean <B>isMethodInvocationConvertible</B>(java.lang.Class&nbsp;formal,
java.lang.Class&nbsp;actual)</PRE>
<DL>
<DD>Determines whether a type represented by a class object is
convertible to another type represented by a class object using a
method invocation conversion, treating object types of primitive
types as if they were primitive types (that is, a Boolean actual
parameter type matches boolean primitive formal type). This behavior
is because this method is used to determine applicable methods for
an actual parameter list, and primitive types are represented by
their object duals in reflective method calls.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>formal</CODE> - the formal parameter type to which the actual
parameter type should be convertible<DD><CODE>actual</CODE> - the actual parameter type.<DT><B>Returns:</B><DD>true if either formal type is assignable from actual type,
or formal is a primitive type and actual is its corresponding object
type or an object type of a primitive type that can be converted to
the formal type.</DL>
</DD>
</DL>
<HR>
<A NAME="isStrictMethodInvocationConvertible(java.lang.Class, java.lang.Class)"><!-- --></A><H3>
isStrictMethodInvocationConvertible</H3>
<PRE>
private static boolean <B>isStrictMethodInvocationConvertible</B>(java.lang.Class&nbsp;formal,
java.lang.Class&nbsp;actual)</PRE>
<DL>
<DD>Determines whether a type represented by a class object is
convertible to another type represented by a class object using a
method invocation conversion, without matching object and primitive
types. This method is used to determine the more specific type when
comparing signatures of methods.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>formal</CODE> - the formal parameter type to which the actual
parameter type should be convertible<DD><CODE>actual</CODE> - the actual parameter type.<DT><B>Returns:</B><DD>true if either formal type is assignable from actual type,
or formal and actual are both primitive types and actual can be
subject to widening conversion to formal.</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/MethodMap.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;<A HREF="../../../../../org/apache/velocity/util/introspection/IntrospectorBase.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../org/apache/velocity/util/introspection/UberspectImpl.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="MethodMap.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>