public abstract class BaseClassLoaderTag extends TagSupport
ClassLoader support.| Modifier and Type | Field and Description |
|---|---|
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. |
body, context, parent| Constructor and Description |
|---|
BaseClassLoaderTag() |
| Modifier and Type | Method and Description |
|---|---|
ClassLoader |
getClassLoader()
Return the class loader to be used for instantiating application objects
when required.
|
boolean |
getUseContextClassLoader()
Return the boolean as to whether the context classloader should be used.
|
void |
setClassLoader(ClassLoader classLoader)
Set the class loader to be used for instantiating application objects
when required.
|
void |
setUseContextClassLoader(boolean use)
Determine whether to use the Context ClassLoader (the one found by
calling
Thread.currentThread().getContextClassLoader())
to resolve/load classes. |
findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getBodyText, getContext, getParent, invokeBody, isEscapeText, isTrim, setBody, setContext, setEscapeText, setParent, setTrim, trimBodyprotected ClassLoader classLoader
useContextClassLoader variable.protected boolean useContextClassLoader
false.public ClassLoader getClassLoader()
setClassLoader(), if anyuseContextClassLoader property is set to truepublic void setClassLoader(ClassLoader classLoader)
classLoader - The new class loader to use, or null
to revert to the standard rulespublic boolean getUseContextClassLoader()
public void setUseContextClassLoader(boolean use)
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.Copyright © 2012 Apache Software Foundation. All Rights Reserved.