Package io.jans.casa.misc
Class CustomClassLoader
java.lang.Object
io.jans.casa.misc.CustomClassLoader
- All Implemented Interfaces:
org.zkoss.lang.ContextClassLoaderFactory
A class implementing interface
org.zkoss.lang.ContextClassLoaderFactory. Basically it allows to know
based on (string) name, which classloader a class belongs to.
This is useful for the ZK rendering engine to instantiate view model classes.
- Author:
- jgomer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetContextClassLoader(Class<?> reference) Returns the context ClassLoader for the reference class.getContextClassLoaderForName(String className) Returns the context ClassLoader for a class name.
-
Constructor Details
-
CustomClassLoader
public CustomClassLoader()Constructs an instance of this object.
-
-
Method Details
-
getContextClassLoader
Returns the context ClassLoader for the reference class.- Specified by:
getContextClassLoaderin interfaceorg.zkoss.lang.ContextClassLoaderFactory- Parameters:
reference- the reference class where it is invoked from.
-
getContextClassLoaderForName
Returns the context ClassLoader for a class name.- Specified by:
getContextClassLoaderForNamein interfaceorg.zkoss.lang.ContextClassLoaderFactory- Parameters:
className- the reference class name where it is invoked from.- Returns:
- A java.lang.ClassLoader
-