public static class EcoreUtil.ContentTreeIterator<E>
extends <any>
| Modifier and Type | Class and Description |
|---|---|
protected static class |
EcoreUtil.ContentTreeIterator.ResourcesIterator
A special iterator that's tolerant of growth in the list of resources
which can result from demand loading when traversing the tree of contents.
|
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
isResolveProxies
Whether proxies should be resolved.
|
protected EcoreUtil.ContentTreeIterator.ResourcesIterator |
resourceSetIterator
The most recently created iterator over a resource set's resources.
|
| Modifier | Constructor and Description |
|---|---|
protected |
ContentTreeIterator(java.util.Collection<?> emfObjects)
Creates an instance for the given collection of objects.
|
protected |
ContentTreeIterator(java.lang.Object object,
boolean isResolveProxies)
Creates an instance for the given collection of objects.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Iterator<E> |
getChildren(java.lang.Object object)
Returns an iterator over the children of the given parent object.
|
protected java.util.Iterator<? extends EObject> |
getEObjectChildren(EObject eObject)
Returns an iterator over the
children of the given parent EObject. |
protected java.util.Iterator<E> |
getObjectChildren(java.lang.Object object)
Returns an empty iterator; subclasses may override this method.
|
protected java.util.Iterator<EObject> |
getResourceChildren(Resource resource)
Returns an iterator over the
children of the given parent resource. |
protected java.util.Iterator<Resource> |
getResourceSetChildren(ResourceSet resourceSet)
Returns an iterator over the
children of the given parent resource set. |
boolean |
hasNext()
Returns the next object and advances the iterator.
|
protected boolean |
isResolveProxies()
Returns whether proxies should resolve.
|
protected boolean isResolveProxies
protected EcoreUtil.ContentTreeIterator.ResourcesIterator resourceSetIterator
true for hasNext()
even when the list is exhausted.
This ensures that any growth in the resources list will not be overlooked.protected ContentTreeIterator(java.util.Collection<?> emfObjects)
emfObjects - the collection of objects to iterate over.protected ContentTreeIterator(java.lang.Object object,
boolean isResolveProxies)
object - the collection of objects to iterate over.isResolveProxies - whether proxies should be resolved during the traversal.public java.util.Iterator<E> getChildren(java.lang.Object object)
object - the parent object.protected java.util.Iterator<? extends EObject> getEObjectChildren(EObject eObject)
children of the given parent EObject.eObject - the parent object.protected boolean isResolveProxies()
protected java.util.Iterator<EObject> getResourceChildren(Resource resource)
children of the given parent resource.resource - the parent resource.public boolean hasNext()
resourceSetIterator in a special way,
i.e., it skips the null object that iterator yields as the last fake item of the list.protected java.util.Iterator<Resource> getResourceSetChildren(ResourceSet resourceSet)
children of the given parent resource set.
It also records the result in resourceSetIterator for special handling in hasNext().resourceSet - the parent resource set.protected java.util.Iterator<E> getObjectChildren(java.lang.Object object)
object - the parent object.Copyright © 2018. Licensed under the Eclipse Public License v1.0. All rights reserved.
Submit a bug or feature