| java.lang.Object org.apache.commons.jelly.TagSupport org.apache.commons.jelly.tags.core.BaseClassLoaderTag
All known Subclasses: org.apache.commons.jelly.tags.core.NewTag, org.apache.commons.jelly.tags.core.ArgTag,
BaseClassLoaderTag | abstract public class BaseClassLoaderTag extends TagSupport (Code) | | Abstract base tag providing
ClassLoader support.
author: James Strachan author: Rodney Waldhoff version: $Revision: 155420 $ |
Field Summary | |
protected ClassLoader | classLoader The class loader to use for instantiating application objects. | protected boolean | useContextClassLoader Do we want to use the Context ClassLoader when loading classes
for instantiating new objects? Default is false . |
Method Summary | |
public ClassLoader | getClassLoader() Return the class loader to be used for instantiating application objects
when required. | public boolean | getUseContextClassLoader() Return the boolean as to whether the context classloader should be used. | public void | setClassLoader(ClassLoader classLoader) Set the class loader to be used for instantiating application objects
when required. | public void | setUseContextClassLoader(boolean use) Determine whether to use the Context ClassLoader (the one found by
calling Thread.currentThread().getContextClassLoader() )
to resolve/load classes. |
classLoader | protected ClassLoader classLoader(Code) | | The class loader to use for instantiating application objects.
If not specified, the context class loader, or the class loader
used to load XMLParser itself, is used, based on the value of the
useContextClassLoader variable.
|
useContextClassLoader | protected boolean useContextClassLoader(Code) | | Do we want to use the Context ClassLoader when loading classes
for instantiating new objects? Default is false .
|
getClassLoader | public ClassLoader getClassLoader()(Code) | | Return the class loader to be used for instantiating application objects
when required. This is determined based upon the following rules:
- The class loader set by
setClassLoader() , if any
- The thread context class loader, if it exists and the
useContextClassLoader property is set to true
- The class loader used to load the XMLParser class itself.
|
getUseContextClassLoader | public boolean getUseContextClassLoader()(Code) | | Return the boolean as to whether the context classloader should be used.
|
setClassLoader | public void setClassLoader(ClassLoader classLoader)(Code) | | Set the class loader to be used for instantiating application objects
when required.
Parameters: classLoader - The new class loader to use, or null to revert to the standard rules |
setUseContextClassLoader | public void setUseContextClassLoader(boolean use)(Code) | | Determine whether to use the Context ClassLoader (the one found by
calling Thread.currentThread().getContextClassLoader() )
to resolve/load classes. If not
using Context ClassLoader, then the class-loading defaults to
using the calling-class' ClassLoader.
boolean determines whether to use JellyContext ClassLoader. |
|
|