Class 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 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.
    Author:
    Jozef Hartinger