com.iplanet.jato.util
Class MethodRegistry
java.lang.Object
|
+--com.iplanet.jato.util.MethodRegistry
- public class MethodRegistry
- extends java.lang.Object
Utility for organizing one or more MethodSpec
instances and storing
the results of matching these specification against a set of classes. Please note
that the implementation of the matching results requires a synchronized block
around the storage mechanism. Although this class is thread safe, you will incur
a performance penalty due to the critical section; in other words, you must
evaluate the tradeoff between caching these matching results with the sync cost
reevaluating the match.
- Version:
- JATO/1.2.2 $Id: MethodRegistry.java,v 1.8 2002/03/16 03:26:38 todd Exp $
Method Summary |
java.lang.reflect.Method |
getMethod(java.lang.Class clazz,
java.lang.String name)
|
java.util.Map |
getMethodMap(java.lang.Class clazz)
|
MethodSpec[] |
getMethodSpecs()
|
void |
registerMethods(java.lang.Class clazz)
Pass the supplied class across all method specifications in this registry
and store the results for later lookup. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MethodRegistry
public MethodRegistry(MethodSpec spec)
- Create registry based on single method specification.
MethodRegistry
public MethodRegistry(MethodSpec[] specs)
- Create registry based on list of method specifications.
getMethodSpecs
public MethodSpec[] getMethodSpecs()
registerMethods
public void registerMethods(java.lang.Class clazz)
- Pass the supplied class across all method specifications in this registry
and store the results for later lookup.
- Parameters:
clazz
- class type must not be null
getMethodMap
public java.util.Map getMethodMap(java.lang.Class clazz)
- Returns:
- map containing results supplied class results from matching against contained method specifications
getMethod
public java.lang.reflect.Method getMethod(java.lang.Class clazz,
java.lang.String name)
- Returns:
- method descriptor for supplied clas type or null when method name is not a match against the contained method specifications