public final class EMFUtils extends Object
Modifier and Type | Method and Description |
---|---|
static <A> Optional<A> |
adapt(org.eclipse.emf.ecore.EObject object,
Class<A> adapter)
Tries to adapt the given EObject to the given class.
|
static boolean |
filteredEquals(org.eclipse.emf.ecore.EObject property,
org.eclipse.emf.ecore.EObject other,
org.eclipse.emf.ecore.EStructuralFeature... filteredFeatures)
Check two EObjects for equality by comparing their EClass and all their features' values.
|
static Set<org.eclipse.emf.ecore.EPackage> |
getAllRegisteredEPackages()
Returns the set of all known
EPackages . |
static Collection<org.eclipse.emf.ecore.EClass> |
getSubClasses(org.eclipse.emf.ecore.EClass superClass)
This method looks through all known
EPackage s to find all concrete subclasses for the provided super
class (abstract classes and interfaces will be ignored). |
public static Collection<org.eclipse.emf.ecore.EClass> getSubClasses(org.eclipse.emf.ecore.EClass superClass)
EPackage
s to find all concrete subclasses for the provided super
class (abstract classes and interfaces will be ignored). If the EClass is EObject, all non abstract and non
interface classes will be returned.superClass
- - the class for which to get the subclassesCollection
of EClasses
public static Set<org.eclipse.emf.ecore.EPackage> getAllRegisteredEPackages()
EPackages
.Epackages
public static boolean filteredEquals(org.eclipse.emf.ecore.EObject property, org.eclipse.emf.ecore.EObject other, org.eclipse.emf.ecore.EStructuralFeature... filteredFeatures)
property
- The EObject triggering the comparison, might be null
.other
- The other style EObject, might be null
filteredFeatures
- Features that are ignored in the equality check.true
if the EClass and the values of all features are equal or if both EObjects are
null
, false
otherwisepublic static <A> Optional<A> adapt(org.eclipse.emf.ecore.EObject object, Class<A> adapter)
A
- The adapter typeobject
- The EObject
to adaptadapter
- The adapter classCopyright © 2019. All rights reserved.