org.jboss.weld.resources.spi
Interface ResourceLoader

All Superinterfaces:
Service
All Known Implementing Classes:
ForwardingResourceLoader

public interface ResourceLoader
extends Service

Resource loading/class creation services for Weld. By default an implementation which uses the Thread Context ClassLoader if available, otherwise the classloading of the implementation is used. An alternative implementation that uses a predefined classloader is available for multi-modular environments. The ResourceLoader is a per-BeanManager service. Single-module deployments can use the default implementation, but applications that consist of multiple modules must use an implementation that is aware of the module classloader.

Author:
Pete Muir

Field Summary
static String PROPERTY_NAME
           
 
Method Summary
 Class<?> classForName(String name)
          Creates a class from a given FQCN
 URL getResource(String name)
          Gets a resource as a URL by name
 Collection<URL> getResources(String name)
          Gets resources as URLs by name
 
Methods inherited from interface org.jboss.weld.bootstrap.api.Service
cleanup
 

Field Detail

PROPERTY_NAME

static final String PROPERTY_NAME
Method Detail

classForName

Class<?> classForName(String name)
Creates a class from a given FQCN

Parameters:
name - The name of the clsas
Returns:
The class

getResource

URL getResource(String name)
Gets a resource as a URL by name

Parameters:
name - The name of the resource
Returns:
An URL to the resource

getResources

Collection<URL> getResources(String name)
Gets resources as URLs by name

Parameters:
name - The name of the resource
Returns:
references to the URLS


Copyright © 2013 Seam Framework. All Rights Reserved.