|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
org.eclipse.emf.common.util.BasicEList<java.util.Iterator<? extends E>>
org.eclipse.emf.common.util.AbstractTreeIterator<E>
org.eclipse.emf.ecore.util.EcoreUtil.ContentTreeIterator<E>
public static class EcoreUtil.ContentTreeIterator<E>
An iterator over the tree contents of a collection of EObjects, Resources, and ResourceSets. It provides a special iterator for ResourceSet.getResources that is tolerant of growth in the underlying collection which result from demand loaded resources; the iterator will walk these additional resources.
EcoreUtil.getAllContents(EObject, boolean),
EcoreUtil.getAllContents(Resource, boolean),
EcoreUtil.getAllContents(ResourceSet, boolean),
Serialized Form| Nested Class Summary | |
|---|---|
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. |
| Nested classes/interfaces inherited from class org.eclipse.emf.common.util.BasicEList |
|---|
BasicEList.BasicIndexOutOfBoundsException, BasicEList.EIterator<E1>, BasicEList.EListIterator<E1>, BasicEList.FastCompare<E>, BasicEList.NonResolvingEIterator<E1>, BasicEList.NonResolvingEListIterator<E1>, BasicEList.UnmodifiableEList<E> |
| Field Summary | |
|---|---|
protected boolean |
isResolveProxies
Whether proxies should be resolved. |
protected EcoreUtil.ContentTreeIterator.ResourcesIterator |
resourceSetIterator
The most recently created iterator over a resource set's resources. |
| Fields inherited from class org.eclipse.emf.common.util.AbstractTreeIterator |
|---|
includeRoot, nextPruneIterator, nextRemoveIterator, object |
| Fields inherited from class org.eclipse.emf.common.util.BasicEList |
|---|
data, size |
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Constructor Summary | |
|---|---|
protected |
EcoreUtil.ContentTreeIterator(java.util.Collection<?> emfObjects)
Creates an instance for the given collection of objects. |
protected |
EcoreUtil.ContentTreeIterator(java.lang.Object object,
boolean isResolveProxies)
Creates an instance for the given collection of objects. |
| Method Summary | |
|---|---|
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. |
| Methods inherited from class org.eclipse.emf.common.util.AbstractTreeIterator |
|---|
next, prune, remove |
| Methods inherited from class org.eclipse.emf.common.util.BasicEList |
|---|
add, add, addAll, addAll, addAllUnique, addAllUnique, addAllUnique, addAllUnique, addUnique, addUnique, assign, basicGet, basicIterator, basicList, basicListIterator, basicListIterator, canContainNull, clear, clone, contains, containsAll, data, didAdd, didChange, didClear, didMove, didRemove, didSet, equalObjects, equals, get, getDuplicates, getNonDuplicates, grow, hashCode, indexOf, isEmpty, isUnique, iterator, lastIndexOf, listIterator, listIterator, move, move, newData, remove, remove, removeAll, resolve, retainAll, set, setData, setUnique, shrink, size, toArray, toArray, toString, useEquals, validate |
| Methods inherited from class java.util.AbstractList |
|---|
removeRange, subList |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
|---|
subList |
| Field Detail |
|---|
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.
| Constructor Detail |
|---|
protected EcoreUtil.ContentTreeIterator(java.util.Collection<?> emfObjects)
emfObjects - the collection of objects to iterate over.
protected EcoreUtil.ContentTreeIterator(java.lang.Object object,
boolean isResolveProxies)
object - the collection of objects to iterate over.isResolveProxies - whether proxies should be resolved during the traversal.| Method Detail |
|---|
public java.util.Iterator<E> getChildren(java.lang.Object object)
getChildren in class AbstractTreeIterator<E>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.
hasNext in interface java.util.Iterator<E>hasNext in class AbstractTreeIterator<E>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 2001-2006 IBM Corporation and others. All Rights Reserved. |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||