|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.emf.emfstore.internal.common.CommonUtil
public final class CommonUtil
Utility class to retrieve meta model information.
Method Summary | ||
---|---|---|
static Set<org.eclipse.emf.ecore.EClass> |
getAllEContainments(org.eclipse.emf.ecore.EClass eClass)
Gives all registryEClasses which can be contained in a given EClass. |
|
static Set<org.eclipse.emf.ecore.EClass> |
getAllModelElementEClasses()
Retrieve all EClasses from the ECore package registry. |
|
static Set<org.eclipse.emf.ecore.EClass> |
getAllSubEClasses(org.eclipse.emf.ecore.EClass eClass)
Retrieve all EClasses from the ECore package registry that are subclasses of the given EClass. |
|
static String |
getEncoding()
Returns the file encoding in use. |
|
static Set<org.eclipse.emf.ecore.EObject> |
getNonTransientContents(org.eclipse.emf.ecore.EObject eObject)
Get all contained EObjects not including transient containment features. |
|
static
|
getParent(Class<T> parent,
org.eclipse.emf.ecore.EObject child)
Get the EContainer that contains the given model element and whose EContainer is null. |
|
static org.eclipse.emf.ecore.EReference |
getPossibleContainingReference(org.eclipse.emf.ecore.EObject containee,
org.eclipse.emf.ecore.EObject parent)
Returns a containing reference of the parent that may contain the
given containee . |
|
static boolean |
isSelfContained(org.eclipse.emf.ecore.EObject object)
Check an EObject and its containment tree whether it is self-contained. |
|
static boolean |
isSelfContained(org.eclipse.emf.ecore.EObject eObject,
boolean ignoreContainer)
Check an EObject and its containment tree whether it is self-contained. A containment tree is self contained if it does not have references to EObjects outside the tree. |
|
static boolean |
isSingletonEObject(org.eclipse.emf.ecore.EObject eObject)
Determines whether an EObject is a singleton object. |
|
static boolean |
isTesting()
|
|
static Set<org.eclipse.emf.ecore.EObject> |
loadFromResource(org.eclipse.emf.ecore.resource.Resource resource,
List<String> errorStrings)
Loads a Set of EObject from a given resource. |
|
static void |
setTesting(boolean testing)
If we are running tests. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static org.eclipse.emf.ecore.EReference getPossibleContainingReference(org.eclipse.emf.ecore.EObject containee, org.eclipse.emf.ecore.EObject parent)
parent
that may contain the
given containee
.
containee
- the EObject that may be contained by the parent's reference, if anyparent
- The EObject to get the containment references from
parent
's container referencepublic static Set<org.eclipse.emf.ecore.EClass> getAllEContainments(org.eclipse.emf.ecore.EClass eClass)
eClass
- the EClass
public static Set<org.eclipse.emf.ecore.EClass> getAllSubEClasses(org.eclipse.emf.ecore.EClass eClass)
eClass
- the superClass of the subClasses to retrieve
public static Set<org.eclipse.emf.ecore.EClass> getAllModelElementEClasses()
public static <T extends org.eclipse.emf.ecore.EObject> T getParent(Class<T> parent, org.eclipse.emf.ecore.EObject child)
T
- parent typeparent
- the Class of the parentchild
- the model element whose container should get returned
public static boolean isSelfContained(org.eclipse.emf.ecore.EObject object)
object
- the eObject that is checked whether it is self-contained
public static boolean isSelfContained(org.eclipse.emf.ecore.EObject eObject, boolean ignoreContainer)
eObject
- the EObject that is checked whether it is self-containedignoreContainer
- true, if references of object to its container should be ignored in the check
public static Set<org.eclipse.emf.ecore.EObject> getNonTransientContents(org.eclipse.emf.ecore.EObject eObject)
eObject
- the EObject whose non-transient contents should be retrieved
public static boolean isSingletonEObject(org.eclipse.emf.ecore.EObject eObject)
eObject
- the EObject that will be checked whether it is a singleton
public static Set<org.eclipse.emf.ecore.EObject> loadFromResource(org.eclipse.emf.ecore.resource.Resource resource, List<String> errorStrings)
resource
- contains the items which should be loaded.errorStrings
- contains all messages about items which couldn't be loaded by the method.
public static void setTesting(boolean testing)
testing
- the testing to setpublic static boolean isTesting()
public static String getEncoding()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |