|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection
java.util.AbstractList
org.eclipse.emf.common.util.BasicEList
org.eclipse.emf.common.util.AbstractTreeIterator
org.eclipse.emf.ecore.util.EcoreUtil.ContentTreeIterator
An iterator over the tree contents of a collection of EObjects, Resources, and ResourceSets;
use getAllContents
to create a new instance.
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.
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 inherited from class org.eclipse.emf.common.util.BasicEList |
BasicEList.BasicIndexOutOfBoundsException, BasicEList.EIterator, BasicEList.EListIterator, BasicEList.FastCompare, BasicEList.NonResolvingEIterator, BasicEList.NonResolvingEListIterator, BasicEList.UnmodifiableEList |
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(Collection emfObjects)
Creates an instance for the given collection of objects. |
protected |
EcoreUtil.ContentTreeIterator(Object object,
boolean isResolveProxies)
Creates an instance for the given collection of objects. |
Method Summary | |
Iterator |
getChildren(Object object)
Returns an iterator over the children of the given parent object. |
protected Iterator |
getEObjectChildren(EObject eObject)
Returns an iterator over the children of the given parent EObject. |
protected Iterator |
getObjectChildren(Object object)
Returns an empty iterator; subclasses may override this method. |
protected Iterator |
getResourceChildren(Resource resource)
Returns an iterator over the children of the given parent resource. |
protected Iterator |
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(Collection emfObjects)
emfObjects
- the collection of objects to iterate over.protected EcoreUtil.ContentTreeIterator(Object object, boolean isResolveProxies)
Method Detail |
public Iterator getChildren(Object object)
getChildren
in class AbstractTreeIterator
object
- the parent object.
protected Iterator getEObjectChildren(EObject eObject)
children
of the given parent EObject.
eObject
- the parent object.
protected boolean isResolveProxies()
protected Iterator 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 Iterator
hasNext
in class AbstractTreeIterator
protected Iterator 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 Iterator getObjectChildren(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 |