Package org.apache.axis.utils.cache
Class ClassCache
java.lang.Object
org.apache.axis.utils.cache.ClassCache
A cache class for JavaClass objects, which enables us to quickly reference
methods.
- Author:
- Doug Davis (dug@us.ibm.com), Glen Daniels (gdaniels@apache.org)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
deregisterClass
(String name) Remove an entry from the cache.boolean
isClassRegistered
(String name) Query a given class' cache status.lookup
(String className, ClassLoader cl) Find the cached JavaClass entry for this class, creating one if necessary.void
registerClass
(String name, Class cls) Register a class in the cache.
-
Constructor Details
-
ClassCache
public ClassCache()
-
-
Method Details
-
registerClass
Register a class in the cache. Creates a new JavaClass object around the given class, and inserts it into the Hashtable, replacing any previous entry.- Parameters:
name
- the name of the class.cls
- a Java Class.
-
deregisterClass
Remove an entry from the cache.- Parameters:
name
- the name of the class to remove.
-
isClassRegistered
Query a given class' cache status.- Parameters:
name
- a class name- Returns:
- true if the class is in the cache, false otherwise
-
lookup
Find the cached JavaClass entry for this class, creating one if necessary.- Parameters:
className
- name of the class desiredcl
- ClassLoader to use if we need to load the class- Returns:
- JavaClass entry
- Throws:
ClassNotFoundException
-