org.eclipse.xtext.resource
Class ClassloaderClasspathUriResolver
java.lang.Object
org.eclipse.xtext.resource.ClassloaderClasspathUriResolver
- All Implemented Interfaces:
- IClasspathUriResolver
public class ClassloaderClasspathUriResolver
- extends java.lang.Object
- implements IClasspathUriResolver
A classpath URI resolver that looks up a resource in the classpath of the
context attribute.
- Author:
- Jan Köhnlein
Method Summary |
org.eclipse.emf.common.util.URI |
findResourceOnClasspath(java.lang.ClassLoader classLoader,
org.eclipse.emf.common.util.URI classpathUri)
|
org.eclipse.emf.common.util.URI |
resolve(java.lang.Object context,
org.eclipse.emf.common.util.URI classpathUri)
Locates a resource using a classloader. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ClassloaderClasspathUriResolver
public ClassloaderClasspathUriResolver()
resolve
public org.eclipse.emf.common.util.URI resolve(java.lang.Object context,
org.eclipse.emf.common.util.URI classpathUri)
- Locates a resource using a classloader.
- Specified by:
resolve
in interface IClasspathUriResolver
- Parameters:
context
- the classloader to be used, or an object whose classloader is used.
If null, the context classloader of the current thread is used.
findResourceOnClasspath
public org.eclipse.emf.common.util.URI findResourceOnClasspath(java.lang.ClassLoader classLoader,
org.eclipse.emf.common.util.URI classpathUri)
throws java.net.URISyntaxException
- Throws:
java.net.URISyntaxException