Package mondrian.util
Class ClassResolver.AbstractClassResolver
java.lang.Object
mondrian.util.ClassResolver.AbstractClassResolver
- All Implemented Interfaces:
ClassResolver
- Direct Known Subclasses:
ClassResolver.ThreadContextClassResolver
- Enclosing interface:
- ClassResolver
public abstract static class ClassResolver.AbstractClassResolver
extends Object
implements ClassResolver
Partial implementation of
ClassResolver
. Derived class just
needs to implement getClassLoader()
.-
Nested Class Summary
Nested classes/interfaces inherited from interface mondrian.util.ClassResolver
ClassResolver.AbstractClassResolver, ClassResolver.ThreadContextClassResolver
-
Field Summary
Fields inherited from interface mondrian.util.ClassResolver
INSTANCE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T> Class<T>
Equivalent ofClass.forName(String, boolean, ClassLoader)
.protected abstract ClassLoader
Returns the class loader to use for the current operation.protected ClassLoader
Returns the class loader to use for the current operation, never null.getResources
(String name) Equivalent ofClassLoader.getResources(String)
.<T> T
instantiateSafe
(String className, Object... args) Instantiates a class and constructs an instance using the given arguments.
-
Constructor Details
-
AbstractClassResolver
public AbstractClassResolver()
-
-
Method Details
-
instantiateSafe
Description copied from interface:ClassResolver
Instantiates a class and constructs an instance using the given arguments.- Specified by:
instantiateSafe
in interfaceClassResolver
- Type Parameters:
T
- Desired type- Parameters:
className
- Class nameargs
- Arguments
-
forName
Description copied from interface:ClassResolver
Equivalent ofClass.forName(String, boolean, ClassLoader)
.- Specified by:
forName
in interfaceClassResolver
- Throws:
ClassNotFoundException
-
getClassLoader
Returns the class loader to use for the current operation. May be null. -
getClassLoaderNotNull
Returns the class loader to use for the current operation, never null. -
getResources
Description copied from interface:ClassResolver
Equivalent ofClassLoader.getResources(String)
.- Specified by:
getResources
in interfaceClassResolver
- Throws:
IOException
-