org.jboss.webbeans.resources
Class DefaultResourceLoader

java.lang.Object
  extended by org.jboss.webbeans.resources.DefaultResourceLoader
All Implemented Interfaces:
Service, ResourceLoader

public class DefaultResourceLoader
extends java.lang.Object
implements ResourceLoader

A simple resource loader. Uses DefaultResourceLoader's classloader if the Thread Context Classloader isn't available

Author:
Pete Muir

Field Summary
 
Fields inherited from interface org.jboss.webbeans.resources.spi.ResourceLoader
PROPERTY_NAME
 
Constructor Summary
DefaultResourceLoader()
           
 
Method Summary
 java.lang.Class<?> classForName(java.lang.String name)
          Creates a class from a given FQCN
 java.net.URL getResource(java.lang.String name)
          Gets a resource as a URL by name
 java.lang.Iterable<java.net.URL> getResources(java.lang.String name)
          Gets resources as URLs by name
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultResourceLoader

public DefaultResourceLoader()
Method Detail

classForName

public java.lang.Class<?> classForName(java.lang.String name)
Description copied from interface: ResourceLoader
Creates a class from a given FQCN

Specified by:
classForName in interface ResourceLoader
Parameters:
name - The name of the clsas
Returns:
The class

getResource

public java.net.URL getResource(java.lang.String name)
Description copied from interface: ResourceLoader
Gets a resource as a URL by name

Specified by:
getResource in interface ResourceLoader
Parameters:
name - The name of the resource
Returns:
An URL to the resource

getResources

public java.lang.Iterable<java.net.URL> getResources(java.lang.String name)
Description copied from interface: ResourceLoader
Gets resources as URLs by name

Specified by:
getResources in interface ResourceLoader
Parameters:
name - The name of the resource
Returns:
An iterable reference to the URLS


Copyright © 2011. All Rights Reserved.