org.ow2.jonas.cdi.weld.internal.resource
Class ApplicationResourceLoader
java.lang.Object
org.ow2.jonas.cdi.weld.internal.resource.ApplicationResourceLoader
- All Implemented Interfaces:
- org.jboss.weld.bootstrap.api.Service, org.jboss.weld.resources.spi.ResourceLoader
public class ApplicationResourceLoader
- extends Object
- implements org.jboss.weld.resources.spi.ResourceLoader
Provides a ResourceLoader backed by a given ClassLoader.
- Author:
- Guillaume Sauthier
| Fields inherited from interface org.jboss.weld.resources.spi.ResourceLoader |
PROPERTY_NAME |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ApplicationResourceLoader
public ApplicationResourceLoader(ClassLoader loader)
classForName
public Class<?> classForName(String name)
- Creates a class from a given FQCN
- Specified by:
classForName in interface org.jboss.weld.resources.spi.ResourceLoader
- Parameters:
name - The name of the clsas
- Returns:
- The class
getResource
public URL getResource(String name)
- Gets a resource as a URL by name
- Specified by:
getResource in interface org.jboss.weld.resources.spi.ResourceLoader
- Parameters:
name - The name of the resource
- Returns:
- An URL to the resource
getResources
public Collection<URL> getResources(String name)
- Gets resources as URLs by name
- Specified by:
getResources in interface org.jboss.weld.resources.spi.ResourceLoader
- Parameters:
name - The name of the resource
- Returns:
- references to the URLS
cleanup
public void cleanup()
- Specified by:
cleanup in interface org.jboss.weld.bootstrap.api.Service
Copyright © 2011 OW2 Consortium. All Rights Reserved.