getResource(String) results.
Specifically this ClassLoader caches not found classes and resources,
which can greatly increase performance for applications that search
for resources.
| Modifier and Type | Field and Description |
|---|---|
| private final ConcurrentHashMap | |
| private final Set | |
| private static final Logger |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public URL | getResource(String
The resource name name)Overrides org. |
| public Class | loadClass(String
The binary name of the class name)Overrides java. |
| public String | toString()
Overrides org. |
| _cache | back to summary |
|---|---|
| private final ConcurrentHashMap<String, URL> _cache | |
| _notFound | back to summary |
|---|---|
| private final Set<String> _notFound | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| CachingWebAppClassLoader | back to summary |
|---|---|
| public CachingWebAppClassLoader(ClassLoader parent, WebAppClassLoader. | |
| CachingWebAppClassLoader | back to summary |
|---|---|
| public CachingWebAppClassLoader(WebAppClassLoader. | |
| clearCache | back to summary |
|---|---|
public void clearCache()
| |
| getResource | back to summary |
|---|---|
| public URL getResource(String name) Overrides org. Doc from org. Get a resource from the classloader NOTE: this method provides a convenience of hacking off a leading / should one be present. This is non-standard and it is recommended to not rely on this behavior
| |
| loadClass | back to summary |
|---|---|
| public Class Overrides java. Doc from java. Loads the class with the specified binary name.
This method searches for classes in the same manner as the
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides org. Doc from java. Returns a string representation of the object. | |