public class ClassLoaderResolver extends Object implements ResourceResolver
Constructor and Description |
---|
ClassLoaderResolver() |
ClassLoaderResolver(ClassLoader l) |
Modifier and Type | Method and Description |
---|---|
InputStream |
getAsStream(String name)
Resolve a resource given its name and return an InputStream to it.
|
<T> T |
resolve(String resourceName,
Class<T> resourceType)
Resolve a resource given its name and type.
|
public ClassLoaderResolver()
public ClassLoaderResolver(ClassLoader l)
public <T> T resolve(String resourceName, Class<T> resourceType)
ResourceResolver
resolve
in interface ResourceResolver
resourceName
- name of the resource to resolve.resourceType
- type of the resource to resolve.null
if the
resource cannot be resolved.public InputStream getAsStream(String name)
ResourceResolver
getAsStream
in interface ResourceResolver
name
- name of the resource to resolve.Copyright © 2018 JBoss by Red Hat. All rights reserved.