| <!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 IntrospectorBase |
| </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> </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="class-use/IntrospectorBase.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </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="../../../../../org/apache/velocity/util/introspection/Introspector.html"><B>PREV CLASS</B></A> |
| <A HREF="../../../../../org/apache/velocity/util/introspection/MethodMap.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> |
| <A HREF="IntrospectorBase.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD> |
| </TR> |
| <TR> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| SUMMARY: INNER | <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> |
| <!-- =========== END OF NAVBAR =========== --> |
| |
| <HR> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <H2> |
| <FONT SIZE="-1"> |
| org.apache.velocity.util.introspection</FONT> |
| <BR> |
| Class IntrospectorBase</H2> |
| <PRE> |
| java.lang.Object |
| | |
| +--<B>org.apache.velocity.util.introspection.IntrospectorBase</B> |
| </PRE> |
| <DL> |
| <DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../../org/apache/velocity/util/introspection/Introspector.html">Introspector</A></DD> |
| </DL> |
| <HR> |
| <DL> |
| <DT>public class <B>IntrospectorBase</B><DT>extends java.lang.Object</DL> |
| |
| <P> |
| This basic function of this class is to return a Method |
| object for a particular class given the name of a method |
| and the parameters to the method in the form of an Object[] |
| |
| The first time the Introspector sees a |
| class it creates a class method map for the |
| class in question. Basically the class method map |
| is a Hastable where Method objects are keyed by a |
| concatenation of the method name and the names of |
| classes that make up the parameters. |
| |
| For example, a method with the following signature: |
| |
| public void method(String a, StringBuffer b) |
| |
| would be mapped by the key: |
| |
| "method" + "java.lang.String" + "java.lang.StringBuffer" |
| |
| This mapping is performed for all the methods in a class |
| and stored for |
| <P> |
| <DL> |
| <DT><B>Version: </B><DD>$Id: IntrospectorBase.java,v 1.2.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:paulo.gaspar@krankikom.de">Paulo Gaspar</a></DD> |
| </DL> |
| <HR> |
| |
| <P> |
| <!-- ======== INNER CLASS SUMMARY ======== --> |
| |
| |
| <!-- =========== 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>protected java.util.Set</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/velocity/util/introspection/IntrospectorBase.html#cachedClassNames">cachedClassNames</A></B></CODE> |
| |
| <BR> |
| Holds the qualified class names for the classes |
| we hold in the classMethodMaps hash</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected java.util.Map</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/velocity/util/introspection/IntrospectorBase.html#classMethodMaps">classMethodMaps</A></B></CODE> |
| |
| <BR> |
| Holds the method maps for the classes we know about, keyed by |
| Class object.</TD> |
| </TR> |
| </TABLE> |
| |
| <!-- ======== 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/IntrospectorBase.html#IntrospectorBase()">IntrospectorBase</A></B>()</CODE> |
| |
| <BR> |
| </TD> |
| </TR> |
| </TABLE> |
| |
| <!-- ========== 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>protected void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/velocity/util/introspection/IntrospectorBase.html#clearCache()">clearCache</A></B>()</CODE> |
| |
| <BR> |
| Clears the classmap and classname |
| caches</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected <A HREF="../../../../../org/apache/velocity/util/introspection/ClassMap.html">ClassMap</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/velocity/util/introspection/IntrospectorBase.html#createClassMap(java.lang.Class)">createClassMap</A></B>(java.lang.Class c)</CODE> |
| |
| <BR> |
| Creates a class map for specific class and registers it in the |
| cache.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> java.lang.reflect.Method</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/velocity/util/introspection/IntrospectorBase.html#getMethod(java.lang.Class, java.lang.String, java.lang.Object[])">getMethod</A></B>(java.lang.Class c, |
| java.lang.String name, |
| java.lang.Object[] params)</CODE> |
| |
| <BR> |
| Gets the method defined by <code>name</code> and |
| <code>params</code> for the Class <code>c</code>.</TD> |
| </TR> |
| </TABLE> |
| <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> |
| |
| <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="classMethodMaps"><!-- --></A><H3> |
| classMethodMaps</H3> |
| <PRE> |
| protected java.util.Map <B>classMethodMaps</B></PRE> |
| <DL> |
| <DD>Holds the method maps for the classes we know about, keyed by |
| Class object.</DL> |
| <HR> |
| |
| <A NAME="cachedClassNames"><!-- --></A><H3> |
| cachedClassNames</H3> |
| <PRE> |
| protected java.util.Set <B>cachedClassNames</B></PRE> |
| <DL> |
| <DD>Holds the qualified class names for the classes |
| we hold in the classMethodMaps hash</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="IntrospectorBase()"><!-- --></A><H3> |
| IntrospectorBase</H3> |
| <PRE> |
| public <B>IntrospectorBase</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="getMethod(java.lang.Class, java.lang.String, java.lang.Object[])"><!-- --></A><H3> |
| getMethod</H3> |
| <PRE> |
| public java.lang.reflect.Method <B>getMethod</B>(java.lang.Class c, |
| java.lang.String name, |
| java.lang.Object[] params) |
| throws java.lang.Exception</PRE> |
| <DL> |
| <DD>Gets the method defined by <code>name</code> and |
| <code>params</code> for the Class <code>c</code>.<DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>c</CODE> - Class in which the method search is taking place<DD><CODE>name</CODE> - Name of the method being searched for<DD><CODE>params</CODE> - An array of Objects (not Classes) that describe the |
| the parameters<DT><B>Returns:</B><DD>The desired Method object.</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="createClassMap(java.lang.Class)"><!-- --></A><H3> |
| createClassMap</H3> |
| <PRE> |
| protected <A HREF="../../../../../org/apache/velocity/util/introspection/ClassMap.html">ClassMap</A> <B>createClassMap</B>(java.lang.Class c)</PRE> |
| <DL> |
| <DD>Creates a class map for specific class and registers it in the |
| cache. Also adds the qualified name to the name->class map |
| for later Classloader change detection.</DL> |
| <HR> |
| |
| <A NAME="clearCache()"><!-- --></A><H3> |
| clearCache</H3> |
| <PRE> |
| protected void <B>clearCache</B>()</PRE> |
| <DL> |
| <DD>Clears the classmap and classname |
| caches</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> </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="class-use/IntrospectorBase.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </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="../../../../../org/apache/velocity/util/introspection/Introspector.html"><B>PREV CLASS</B></A> |
| <A HREF="../../../../../org/apache/velocity/util/introspection/MethodMap.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> |
| <A HREF="IntrospectorBase.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD> |
| </TR> |
| <TR> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| SUMMARY: INNER | <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> |
| <!-- =========== END OF NAVBAR =========== --> |
| |
| <HR> |
| Copyright © 2002 Apache Software Foundation. All Rights Reserved. |
| </BODY> |
| </HTML> |