public final class MetamodelUtils extends Object
Modifier and Type | Method and Description |
---|---|
static <V extends org.eclipse.emf.ecore.EModelElement> |
copy(V modelElement)
Copy a metamodel element.
|
static org.eclipse.emf.ecore.resource.ResourceSet |
createIndependentMetamodelCopy(Collection<org.eclipse.emf.ecore.EPackage> rootPackages,
org.eclipse.emf.common.util.URI metamodelURI)
Create a copy of a set of packages that is independent of generated
packages.
|
static Collection<org.eclipse.emf.ecore.EPackage> |
getAllRootPackages(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
Get all root packages in a resource set.
|
static org.eclipse.emf.ecore.EReference |
getGenericReference(org.eclipse.emf.ecore.EReference reference)
Get the corresponding reference which is generic.
|
static org.eclipse.emf.ecore.EReference |
getNonGenericReference(org.eclipse.emf.ecore.EReference genericReference)
Get the corresponding reference which is not generic.
|
static org.eclipse.emf.ecore.EPackage |
getRootPackage(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
Get any root package in a resource set.
|
static boolean |
isConcrete(org.eclipse.emf.ecore.EClass eClass)
Check whether a class is concrete, i.e.
|
static boolean |
isGenericReference(org.eclipse.emf.ecore.EReference reference)
Check whether a reference is of generic type.
|
static boolean |
isMetamodelResource(org.eclipse.emf.ecore.resource.Resource resource)
Check whether the resource contains a metamodel.
|
static boolean |
isMetamodelURI(org.eclipse.emf.common.util.URI uri)
Check whether the URI denotes a resource containing a metamodel.
|
static List<org.eclipse.emf.ecore.EStructuralFeature> |
subtractFeatures(org.eclipse.emf.ecore.EClass minuend,
org.eclipse.emf.ecore.EClass subtrahend)
Subtract the features that are provided by a class from the types that
are provided by another class.
|
static List<org.eclipse.emf.ecore.EClass> |
subtractTypes(org.eclipse.emf.ecore.EClass minuend,
org.eclipse.emf.ecore.EClass subtrahend)
Subtract the types that are provided by a class from the types that are
provided by another class.
|
public static boolean isGenericReference(org.eclipse.emf.ecore.EReference reference)
public static org.eclipse.emf.ecore.EReference getNonGenericReference(org.eclipse.emf.ecore.EReference genericReference)
public static org.eclipse.emf.ecore.EReference getGenericReference(org.eclipse.emf.ecore.EReference reference)
public static <V extends org.eclipse.emf.ecore.EModelElement> V copy(V modelElement)
public static Collection<org.eclipse.emf.ecore.EPackage> getAllRootPackages(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
public static boolean isMetamodelResource(org.eclipse.emf.ecore.resource.Resource resource)
public static boolean isMetamodelURI(org.eclipse.emf.common.util.URI uri)
public static org.eclipse.emf.ecore.EPackage getRootPackage(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
public static boolean isConcrete(org.eclipse.emf.ecore.EClass eClass)
public static List<org.eclipse.emf.ecore.EClass> subtractTypes(org.eclipse.emf.ecore.EClass minuend, org.eclipse.emf.ecore.EClass subtrahend)
public static List<org.eclipse.emf.ecore.EStructuralFeature> subtractFeatures(org.eclipse.emf.ecore.EClass minuend, org.eclipse.emf.ecore.EClass subtrahend)
public static org.eclipse.emf.ecore.resource.ResourceSet createIndependentMetamodelCopy(Collection<org.eclipse.emf.ecore.EPackage> rootPackages, org.eclipse.emf.common.util.URI metamodelURI)
Copyright © 2019. All rights reserved.