Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Qizx/open 4.1 API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.qizx.api.util
Class DefaultModuleResolver

    java.lang.Object
      com.qizx.api.util.DefaultModuleResolver

All Implemented Interfaces:
  ModuleResolver

    public class DefaultModuleResolver

extends Object
implements ModuleResolver

Default ModuleResolver implementation using a base URL.

The strategy used consists of appending the module namespace URI to the base URI, and (if possible) checking the existence of the pointed resource.

If the check fails, and if location hints are provided, then each hint is appended to the base URL and put to the result list, unless it can be verified that the URL formed this way points to a non-existent resource.

Constructor Summary
`DefaultModuleResolver(URL base)` Creates a resolver using a base URL.

Method Summary
`URL` | `getBase()`
`URL[]` | `resolve(String moduleNamespaceURI, String[] locationHints)` Resolves a module namespace to one or several compilation units.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DefaultModuleResolver

    public DefaultModuleResolver(URL base)

  Creates a resolver using a base URL.

  Parameters:
    `base` - an URL used as a base for resolving module URI's.

Method Detail

### resolve

    public URL[] resolve(String moduleNamespaceURI,
                         String[] locationHints)
                  throws MalformedURLException

  Description copied from interface: `ModuleResolver`
  Resolves a module namespace to one or several compilation units.

  Specified by:
    `resolve` in interface `ModuleResolver`
  Parameters:
    `moduleNamespaceURI` - target namespace of the module to import.
    `locationHints` - optional URI's used as resolution hints.
  Returns:
    one or several physical locations of module units.
  Throws:
    `MalformedURLException` - if provided module URI's or hints are invalid
  See Also:
    `ModuleResolver.resolve(java.lang.String, java.lang.String[])`

### getBase

    public URL getBase()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| © 2010 Axyana Software
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD