ResourceResolver (Apache CXF JavaDoc 4.2.2 API)
Description: declaration: package: org.apache.cxf.resource, interface: ResourceResolver

Package org.apache.cxf.resource

# Interface ResourceResolver

All Known Implementing Classes:
  `BusApplicationContextResourceResolver`, `ClassLoaderResolver`, `ClasspathResolver`, `ObjectTypeResolver`, `PropertiesResolver`, `SinglePropertyResolver`

public interface ResourceResolver
Resolves resource. A ResourceResolver is used to find references to resources that are being injected into classes

- ## Method Summary

  Modifier and Type
  Method
  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.

- ## Method Details

  - ### resolve

    <T> T resolve(String resourceName, Class<T> resourceType)
    Resolve a resource given its name and type.
    Parameters:
      `resourceName` - name of the resource to resolve.
      `resourceType` - type of the resource to resolve.
    Returns:
      an instance of the resource or `null` if the resource cannot be resolved.

  - ### getAsStream

    InputStream getAsStream(String name)
    Resolve a resource given its name and return an InputStream to it.
    Parameters:
      `name` - name of the resource to resolve.
    Returns:
      an InputStream for the resource or null if it could not be found.