Class EMFHelper
- java.lang.Object
-
- org.palladiosimulator.solver.transformations.EMFHelper
-
public class EMFHelper extends Object
Provides utility functions for EMF models.
-
-
Constructor Summary
Constructors Constructor Description EMFHelper()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description EList<EObject>
getElements(EObject root, EClass type)
Retrieves all model elements of a given EMF type under some root element.static EObject
loadFromXMIFile(String fileName)
static void
saveToXMIFile(EObject modelToSave, String fileName)
Save the given EObject to the file given by filename.
-
-
-
Method Detail
-
getElements
public EList<EObject> getElements(EObject root, EClass type)
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
public static void saveToXMIFile(EObject modelToSave, String fileName)
Save the given EObject to the file given by filename.- Parameters:
modelToSave
- The EObject to savefileName
- The filename where to save.
-
-