Package org.apache.openjpa.util
Class MultiLoaderClassResolver
- java.lang.Object
-
- org.apache.openjpa.util.MultiLoaderClassResolver
-
- All Implemented Interfaces:
ClassResolver
public class MultiLoaderClassResolver extends java.lang.Object implements ClassResolver
A simpleClassResolver
that uses multiple class loaders to resolve classes.- Author:
- Steve Kim
-
-
Constructor Summary
Constructors Constructor Description MultiLoaderClassResolver()
MultiLoaderClassResolver(java.lang.ClassLoader[] loaders)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addClassLoader(java.lang.ClassLoader loader)
java.lang.ClassLoader
getClassLoader(java.lang.Class ctx, java.lang.ClassLoader envLoader)
Return a class loader that can be used to load classes and resources.
-
-
-
Method Detail
-
addClassLoader
public boolean addClassLoader(java.lang.ClassLoader loader)
-
getClassLoader
public java.lang.ClassLoader getClassLoader(java.lang.Class ctx, java.lang.ClassLoader envLoader)
Description copied from interface:ClassResolver
Return a class loader that can be used to load classes and resources. This can be a standard class loader, or a customized loader such as aMultiClassLoader
.- Specified by:
getClassLoader
in interfaceClassResolver
- Parameters:
ctx
- the context class; may be null if no context classenvLoader
- the thread's context class loader when the persistence environment (i.e. broker) was obtained; may be null if operating outside the context of persistence environment
-
-