Package org.eclipse.m2m.atl.emftvm.util

# Class DefaultModuleResolver

java.lang.Object
org.eclipse.m2m.atl.emftvm.util.DefaultModuleResolver

All Implemented Interfaces:
  `ModuleResolver`

public class DefaultModuleResolver extends Object implements ModuleResolver
Resolves modules based on an EMF URI prefix.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`FILE_EXT`
EMFTVM file extension to add when resolving modules.

## Constructor Summary

Constructors
Constructor
Description
`DefaultModuleResolver(String uriPrefix, org.eclipse.emf.ecore.resource.ResourceSet resourceSet)`
Creates a new `DefaultModuleResolver`.

## Method Summary

Modifier and Type
Method
Description
`void`
`addUriPrefix(String uriPrefix)`
Adds `uriPrefix` to the URI prefixes list.
`org.eclipse.emf.ecore.resource.ResourceSet`
`getResourceSet()`
Returns the EMF `ResourceSet`.
`List<String>`
`getUriPrefixes()`
Returns the URI prefixes.
`Module`
`resolveModule(String name)`
Resolves the module with the given

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### FILE_EXT

public static final String FILE_EXT
EMFTVM file extension to add when resolving modules.

See Also:
  - Constant Field Values

## Constructor Details

### DefaultModuleResolver

public DefaultModuleResolver(String uriPrefix, org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
Creates a new `DefaultModuleResolver`.

Parameters:
  `uriPrefix` - the URI prefix to prepend to module names
  `resourceSet` - the EMF `ResourceSet` to load modules into

## Method Details

### resolveModule

public Module resolveModule(String name) throws ModuleNotFoundException
Resolves the module with the given

    name

.

Specified by:
  `resolveModule` in interface `ModuleResolver`
Parameters:
  `name` - the module name
Returns:
  the module with the given name
Throws:
  `ModuleNotFoundException`

### getUriPrefixes

public List<String> getUriPrefixes()
Returns the URI prefixes.

Returns:
  the uriPrefixes

### addUriPrefix

public void addUriPrefix(String uriPrefix)
Adds `uriPrefix` to the URI prefixes list.

Parameters:
  `uriPrefix` - the URI prefix to add

### getResourceSet

public org.eclipse.emf.ecore.resource.ResourceSet getResourceSet()
Returns the EMF `ResourceSet`.

Returns:
  the resourceSet