Package org.jboss.weld.resources
Class WeldClassLoaderResourceLoader
- java.lang.Object
-
- org.jboss.weld.resources.AbstractClassLoaderResourceLoader
-
- org.jboss.weld.resources.WeldClassLoaderResourceLoader
-
- All Implemented Interfaces:
org.jboss.weld.bootstrap.api.Service
,org.jboss.weld.resources.spi.ResourceLoader
- Direct Known Subclasses:
DefaultResourceLoader
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 theDefaultResourceLoader
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.- Author:
- Jozef Hartinger
-
-
Field Summary
Fields Modifier and Type Field Description static WeldClassLoaderResourceLoader
INSTANCE
-
Constructor Summary
Constructors Modifier Constructor Description protected
WeldClassLoaderResourceLoader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ClassLoader
classLoader()
void
cleanup()
-
Methods inherited from class org.jboss.weld.resources.AbstractClassLoaderResourceLoader
classForName, getResource, getResources
-
-
-
-
Field Detail
-
INSTANCE
public static final WeldClassLoaderResourceLoader INSTANCE
-
-
Method Detail
-
classLoader
protected ClassLoader classLoader()
- Specified by:
classLoader
in classAbstractClassLoaderResourceLoader
-
cleanup
public void cleanup()
-
-