Package org.eclipse.m2m.atl.emftvm.util
Class DefaultModuleResolver
java.lang.Object
org.eclipse.m2m.atl.emftvm.util.DefaultModuleResolver
- All Implemented Interfaces:
ModuleResolver
Resolves modules based on an EMF URI prefix.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefaultModuleResolver(String uriPrefix, org.eclipse.emf.ecore.resource.ResourceSet resourceSet) Creates a newDefaultModuleResolver. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddUriPrefix(String uriPrefix) AddsuriPrefixto the URI prefixes list.org.eclipse.emf.ecore.resource.ResourceSetReturns the EMFResourceSet.Returns the URI prefixes.resolveModule(String name) Resolves the module with the given
-
Field Details
-
FILE_EXT
EMFTVM file extension to add when resolving modules.- See Also:
-
-
Constructor Details
-
DefaultModuleResolver
public DefaultModuleResolver(String uriPrefix, org.eclipse.emf.ecore.resource.ResourceSet resourceSet) Creates a newDefaultModuleResolver.- Parameters:
uriPrefix- the URI prefix to prepend to module namesresourceSet- the EMFResourceSetto load modules into
-
-
Method Details
-
resolveModule
Resolves the module with the givenname
.- Specified by:
resolveModulein interfaceModuleResolver- Parameters:
name- the module name- Returns:
- the module with the given name
- Throws:
ModuleNotFoundException
-
getUriPrefixes
Returns the URI prefixes.- Returns:
- the uriPrefixes
-
addUriPrefix
AddsuriPrefixto the URI prefixes list.- Parameters:
uriPrefix- the URI prefix to add
-
getResourceSet
public org.eclipse.emf.ecore.resource.ResourceSet getResourceSet()Returns the EMFResourceSet.- Returns:
- the resourceSet
-