public final class TypeUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static boolean |
ancestor(org.eclipse.emf.ecore.EClass class1,
org.eclipse.emf.ecore.EClass class2)
Decide whether the second class is an ancestor of the first class
|
static org.eclipse.emf.ecore.EClass |
commonSuperClass(List<org.eclipse.emf.ecore.EObject> elements)
Calculate the common super class of a list of instances
|
static boolean |
isCompatible(org.eclipse.emf.ecore.EClassifier classifier,
org.eclipse.emf.ecore.EClassifier withClassifier)
Check whether a type can be used in the context where another type is expected
|
static org.eclipse.emf.ecore.EClass |
leastCommonAncestor(Collection<org.eclipse.emf.ecore.EClass> classes)
Get the wrapped least common ancestor of a collection of classes
|
static org.eclipse.emf.ecore.EClass |
leastCommonAncestor(org.eclipse.emf.ecore.EClass class1,
org.eclipse.emf.ecore.EClass class2)
Get the wrapped least common ancestor of two classes
|
public static org.eclipse.emf.ecore.EClass leastCommonAncestor(Collection<org.eclipse.emf.ecore.EClass> classes)
classes - Collection of classespublic static org.eclipse.emf.ecore.EClass leastCommonAncestor(org.eclipse.emf.ecore.EClass class1,
org.eclipse.emf.ecore.EClass class2)
class1 - First classclass2 - Second classpublic static boolean ancestor(org.eclipse.emf.ecore.EClass class1,
org.eclipse.emf.ecore.EClass class2)
class1 - First classclass2 - Second classpublic static org.eclipse.emf.ecore.EClass commonSuperClass(List<org.eclipse.emf.ecore.EObject> elements)
elements - List of instancespublic static boolean isCompatible(org.eclipse.emf.ecore.EClassifier classifier,
org.eclipse.emf.ecore.EClassifier withClassifier)
classifier - Actual typewithClassifier - Expected typeCopyright © 2020. All rights reserved.