public class DefaultEcoreTraversalHelper extends java.lang.Object implements EcoreTraversalHelper
Constructor and Description |
---|
DefaultEcoreTraversalHelper() |
Modifier and Type | Method and Description |
---|---|
boolean |
collectReachableObjectsOfTypeUnderObject(java.util.Collection<org.eclipse.emf.ecore.EObject> result,
org.eclipse.emf.ecore.EObject object,
org.eclipse.emf.ecore.EClassifier type)
Collects all EObjects of a specified type which are descendants of the given EObject.
|
protected java.util.List<org.eclipse.emf.ecore.EStructuralFeature> |
getDefaultFeaturesToTraverseFor(org.eclipse.emf.ecore.EObject object,
org.eclipse.emf.ecore.EClassifier type) |
java.util.List<org.eclipse.emf.ecore.EStructuralFeature> |
getFeaturesToTraverseFor(org.eclipse.emf.ecore.EObject object,
org.eclipse.emf.ecore.EClassifier type) |
java.util.Collection<org.eclipse.emf.ecore.EObject> |
getReachableEObjects(org.eclipse.emf.ecore.EObject referenceSource,
org.eclipse.emf.ecore.EReference reference)
Returns all EObjects reachable from a specified EObject with a given EReference.
|
public java.util.Collection<org.eclipse.emf.ecore.EObject> getReachableEObjects(org.eclipse.emf.ecore.EObject referenceSource, org.eclipse.emf.ecore.EReference reference)
referenceSource
to the EObject can be established with the provided
reference
.
Applies resource filtering to include only reachable references that are in the same context as the given object.
getReachableEObjects
in interface EcoreTraversalHelper
referenceSource
- The EObject from which a direct connection to the returned EObjects could be established by the
reference
provided.reference
- The EReference describing the type of reference.referenceSource
directly via the given
EReference.org.eclipse.sphinx.emf.resource.IResourceFilter
public boolean collectReachableObjectsOfTypeUnderObject(java.util.Collection<org.eclipse.emf.ecore.EObject> result, org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EClassifier type)
EcoreTraversalHelper
collectReachableObjectsOfTypeUnderObject
in interface EcoreTraversalHelper
result
- The EObjects of the specified type
found beneath the root
.object
- The EObject from which the descending search starts.type
- The type of which the collected EObjects are to be of.public java.util.List<org.eclipse.emf.ecore.EStructuralFeature> getFeaturesToTraverseFor(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EClassifier type)
getFeaturesToTraverseFor
in interface EcoreTraversalHelper
protected java.util.List<org.eclipse.emf.ecore.EStructuralFeature> getDefaultFeaturesToTraverseFor(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EClassifier type)