Package com._1c.g5.v8.dt.core.model
Class ClassAncestryHelper
- java.lang.Object
-
- com._1c.g5.v8.dt.core.model.ClassAncestryHelper
-
public class ClassAncestryHelper extends Object
Helper class for receiving information about EClass inheritance
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.eclipse.emf.ecore.EClass
getCommonSuperClass(Collection<org.eclipse.emf.ecore.EObject> elements)
Calculate the common super class of a list of instancesstatic org.eclipse.emf.ecore.EClass
getLeastCommonAncestor(Collection<org.eclipse.emf.ecore.EClass> classes)
Get the least common ancestor of a collection of classesstatic org.eclipse.emf.ecore.EClass
getLeastCommonAncestor(org.eclipse.emf.ecore.EClass classA, org.eclipse.emf.ecore.EClass classB)
Get the least common ancestor of two classesstatic boolean
isAncestor(org.eclipse.emf.ecore.EClass classA, org.eclipse.emf.ecore.EClass classB)
Decide whether the second class is an ancestor of the first class
-
-
-
Method Detail
-
getLeastCommonAncestor
public static org.eclipse.emf.ecore.EClass getLeastCommonAncestor(Collection<org.eclipse.emf.ecore.EClass> classes)
Get the least common ancestor of a collection of classes- Parameters:
classes
- - collection of classes- Returns:
- - least common ancestor
-
getLeastCommonAncestor
public static org.eclipse.emf.ecore.EClass getLeastCommonAncestor(org.eclipse.emf.ecore.EClass classA, org.eclipse.emf.ecore.EClass classB)
Get the least common ancestor of two classes- Parameters:
classA
- - first classclassB
- - second class- Returns:
- least common ancestor
-
isAncestor
public static boolean isAncestor(org.eclipse.emf.ecore.EClass classA, org.eclipse.emf.ecore.EClass classB)
Decide whether the second class is an ancestor of the first class- Parameters:
classA
- First classclassB
- Second class- Returns:
- true if the second class is an ancestor of the first class, false otherwise
-
getCommonSuperClass
public static org.eclipse.emf.ecore.EClass getCommonSuperClass(Collection<org.eclipse.emf.ecore.EObject> elements)
Calculate the common super class of a list of instances- Parameters:
elements
- List of instances- Returns:
- Common super class
-
-