org.eclipse.emf.mwe.core.resources
Class AbstractResourceLoader

java.lang.Object
  extended by org.eclipse.emf.mwe.core.resources.AbstractResourceLoader
All Implemented Interfaces:
ResourceLoader
Direct Known Subclasses:
OsgiResourceLoader, ResourceLoaderDefaultImpl

public abstract class AbstractResourceLoader
extends java.lang.Object
implements ResourceLoader

Author:
Sebastian Zarnekow - Initial contribution and API

Constructor Summary
AbstractResourceLoader()
           
 
Method Summary
 java.net.URL getResource(java.lang.String path)
           
 java.io.InputStream getResourceAsStream(java.lang.String path)
           
protected  java.lang.Class<?> internalLoadClass(java.lang.String clazzName)
           
 java.lang.Class<?> loadClass(java.lang.String clazzName)
           
protected  java.net.URL loadFromContextClassLoader(java.lang.String path)
           
protected abstract  java.lang.Class<?> tryLoadClass(java.lang.String clazzName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractResourceLoader

public AbstractResourceLoader()
Method Detail

tryLoadClass

protected abstract java.lang.Class<?> tryLoadClass(java.lang.String clazzName)
                                            throws java.lang.ClassNotFoundException
Throws:
java.lang.ClassNotFoundException

getResourceAsStream

public java.io.InputStream getResourceAsStream(java.lang.String path)
Specified by:
getResourceAsStream in interface ResourceLoader
Parameters:
path - Identifier for a resource
Returns:
InputStream for the specified resource.

loadClass

public java.lang.Class<?> loadClass(java.lang.String clazzName)
Specified by:
loadClass in interface ResourceLoader
Parameters:
clazzName - The class name
Returns:
The class instance or null if no such class could be found

internalLoadClass

protected java.lang.Class<?> internalLoadClass(java.lang.String clazzName)
                                        throws java.lang.ClassNotFoundException
Throws:
java.lang.ClassNotFoundException

getResource

public java.net.URL getResource(java.lang.String path)
Specified by:
getResource in interface ResourceLoader

loadFromContextClassLoader

protected java.net.URL loadFromContextClassLoader(java.lang.String path)