| java.lang.Object org.apache.velocity.util.introspection.IntrospectorBase
All known Subclasses: org.apache.velocity.util.introspection.Introspector,
IntrospectorBase | abstract public class IntrospectorBase implements IntrospectorCacheListener(Code) | | Lookup a a Method object for a particular class given the name of a method
and its parameters.
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 Hashtable 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.
author: Jason van Zyl author: Bob McWhirter author: Attila Szegedi author: Paulo Gaspar author: Henning P. Schmiedehausen version: $Id: IntrospectorBase.java 477003 2006-11-20 01:14:22Z henning $ |
Field Summary | |
final protected Log | log |
log | final protected Log log(Code) | | Class logger
|
IntrospectorBase | protected IntrospectorBase(Log log)(Code) | | C'tor.
|
clearCache | protected void clearCache()(Code) | | Clears the internal cache.
|
createClassMap | protected ClassMap createClassMap(Class c)(Code) | | 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.
Parameters: c - The class for which the class map gets generated. A ClassMap object. |
getIntrospectorCache | protected IntrospectorCache getIntrospectorCache()(Code) | | Return the internal IntrospectorCache object.
The internal IntrospectorCache object. |
lookupClassMap | protected ClassMap lookupClassMap(Class c)(Code) | | Lookup a given Class object in the cache. If it does not exist,
check whether this is due to a class change and purge the caches
eventually.
Parameters: c - The class to look up. A ClassMap object or null if it does not exist in the cache. |
|
|