org.apache.velocity.util.introspection
Class ClassMap

java.lang.Object
  extended by org.apache.velocity.util.introspection.ClassMap

public class ClassMap
extends Object

A cache of introspection information for a specific class instance. Keys Method objects by a concatenation of the method name and the names of classes that make up the parameters.

Version:
$Id: ClassMap.java 1040976 2010-12-01 12:15:39Z apetrelli $
Author:
Jason van Zyl, Bob McWhirter, Attila Szegedi, Geir Magnusson Jr., Henning P. Schmiedehausen, Nathan Bubna

Constructor Summary
ClassMap(Class clazz, Log log)
          Standard constructor
 
Method Summary
 Method findMethod(String name, Object[] params)
          Find a Method using the method name and parameter objects.
 Class getCachedClass()
          Returns the class object whose methods are cached by this map.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassMap

public ClassMap(Class clazz,
                Log log)
Standard constructor

Parameters:
clazz - The class for which this ClassMap gets constructed.
Method Detail

getCachedClass

public Class getCachedClass()
Returns the class object whose methods are cached by this map.

Returns:
The class object whose methods are cached by this map.

findMethod

public Method findMethod(String name,
                         Object[] params)
                  throws MethodMap.AmbiguousException
Find a Method using the method name and parameter objects.

Parameters:
name - The method name to look up.
params - An array of parameters for the method.
Returns:
A Method object representing the method to invoke or null.
Throws:
MethodMap.AmbiguousException - When more than one method is a match for the parameters.


Copyright © 2000-2012 The Apache Software Foundation. All Rights Reserved.