Class ProfileImportResolver
java.lang.Object
org.modelversioning.emfprofileapplication.util.ProfileImportResolver
Utility class to resolve
profile imports.
TODO write to global persistent registry.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidpersistProfileImport(ProfileImport profileImport) Persists the specifiedprofileImportso that it can be resolved later.static Profileresolve(ProfileImport profileImport) Tries to resolve the suppliedprofileImportusing the globalEPackage.Registry.static Profileresolve(ProfileImport profileImport, ResourceSet resourceSet) Tries to resolve the suppliedprofileImportusing the globalEPackage.Registryand the local registry of the suppliedresourceSet.
-
Constructor Details
-
ProfileImportResolver
public ProfileImportResolver()
-
-
Method Details
-
resolve
Tries to resolve the suppliedprofileImportusing the globalEPackage.Registry.If the
Profilecould be resolved, it will besetto theProfile.- Parameters:
profileImport- to resolve.- Returns:
- resolved
Profile.
-
resolve
Tries to resolve the suppliedprofileImportusing the globalEPackage.Registryand the local registry of the suppliedresourceSet.If the
Profilecould be resolved, it will besetto theProfile.- Parameters:
profileImport- to resolve.resourceSet- used for resolution.- Returns:
- the resolved
Profileornull.
-
persistProfileImport
Persists the specifiedprofileImportso that it can be resolved later. This method may changethe locationfor a later resolution.- Parameters:
profileImport- to persist.- Throws:
IllegalArgumentException- ifprofileImporthas noProfileset.
-