Class EMFHelper
java.lang.Object
org.palladiosimulator.solver.transformations.EMFHelper
Provides utility functions for EMF models.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetElements(EObject root, EClass type) Retrieves all model elements of a given EMF type under some root element.static EObjectloadFromXMIFile(String fileName) static voidsaveToXMIFile(EObject modelToSave, String fileName) Save the given EObject to the file given by filename.
-
Constructor Details
-
EMFHelper
public EMFHelper()
-
-
Method Details
-
getElements
Retrieves all model elements of a given EMF type under some root element.- Parameters:
root- the root elementtype- the type of objects to find- Returns:
- all objects of the given type or a sub type
-
saveToXMIFile
Save the given EObject to the file given by filename.- Parameters:
modelToSave- The EObject to savefileName- The filename where to save.
-
loadFromXMIFile
- Parameters:
fileName- the filename specifying the file to load from- Returns:
- The EObject loaded from the file
-