|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.emf.validation.service.AbstractTraversalStrategy
org.eclipse.emf.validation.service.ITraversalStrategy.Recursive
An implementation of the ITraversalStrategy
interface that is
recursive: it iterates over the content trees of the roots, according
to the basic EMF EObject.eAllContents()
tree-iterator. One bit
of value-add that it offers, though, is that it avoids duplication of
sub-trees where one of the traversal roots is actually contained within
another.
This traversal strategy assumes that only the root elements of the traversal may be in different client contexts, not any contents of their sub-trees.
Nested Class Summary |
---|
Nested classes inherited from class org.eclipse.emf.validation.service.ITraversalStrategy |
---|
ITraversalStrategy.Flat, ITraversalStrategy.Recursive |
Constructor Summary | |
---|---|
ITraversalStrategy.Recursive()
Initializes me. |
Method Summary | |
---|---|
protected int |
countElements(java.util.Collection ignored)
Implemented by subclasses to compute the number of elements that will be validated within the scope of the specified root elements. |
protected java.util.Iterator |
createIterator(java.util.Collection ignored)
Implemented by subclasses to return an iterator that provides all of the elements to be validated, within the scope of the specified root elements. |
boolean |
isClientContextChanged()
This implementation is pessimistic, always returning true
to indicate that the client context should be recomputed for each
object traversed. |
void |
startTraversal(java.util.Collection traversalRoots,
org.eclipse.core.runtime.IProgressMonitor progressMonitor)
Initializes the traversal by asking the subclass to count the number of elements that will be validated and to create an iterator that will provide them all. |
Methods inherited from class org.eclipse.emf.validation.service.AbstractTraversalStrategy |
---|
elementValidated, getProgressMonitor, getTaskLabel, hasNext, next |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ITraversalStrategy.Recursive()
Method Detail |
public void startTraversal(java.util.Collection traversalRoots, org.eclipse.core.runtime.IProgressMonitor progressMonitor)
AbstractTraversalStrategy
startTraversal
in interface ITraversalStrategy
startTraversal
in class AbstractTraversalStrategy
protected int countElements(java.util.Collection ignored)
AbstractTraversalStrategy
countElements
in class AbstractTraversalStrategy
ignored
- the roots of the traversal sub-trees
protected java.util.Iterator createIterator(java.util.Collection ignored)
AbstractTraversalStrategy
createIterator
in class AbstractTraversalStrategy
ignored
- the roots of the traversal sub-trees
public boolean isClientContextChanged()
AbstractTraversalStrategy
true
to indicate that the client context should be recomputed for each
object traversed.
isClientContextChanged
in interface ITraversalStrategy
isClientContextChanged
in class AbstractTraversalStrategy
|
Copyright 2002, 2006 IBM Corporation and others. All Rights Reserved. |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |