public class WeldClassLoaderResourceLoader extends AbstractClassLoaderResourceLoader
ResourceLoader
implementation that uses the classloader that loaded this class to load other resources. This is not
very useful except for cases where we need to decide whether optional parts of weld-core should be registered or not.
These optional parts depend on certain artifacts that may not be available (e.g. servlet API). We cannot use the
DefaultResourceLoader
for the decision making since in a modular environment the required artifact may be available
to the application (loadable via TCCL) but may not be available to Weld. This class is helpful for detecting such situations.https://issues.jboss.org/browse/WELD-1208
Modifier and Type | Field and Description |
---|---|
static WeldClassLoaderResourceLoader |
INSTANCE |
PROPERTY_NAME
Modifier | Constructor and Description |
---|---|
protected |
WeldClassLoaderResourceLoader() |
Modifier and Type | Method and Description |
---|---|
protected ClassLoader |
classLoader() |
void |
cleanup()
Called by Weld when it is shutting down, allowing the service to perform any cleanup needed.
|
classForName, getResource, getResources
public static final WeldClassLoaderResourceLoader INSTANCE
protected ClassLoader classLoader()
classLoader
in class AbstractClassLoaderResourceLoader
public void cleanup()
Service
Copyright © 2014. All Rights Reserved.