Package com._1c.g5.v8.dt.lcore.util
Class Visitors.CompositeVisitor
- java.lang.Object
-
- com._1c.g5.v8.dt.lcore.util.Visitors.CompositeVisitor
-
- All Implemented Interfaces:
Visitors.IVisitor
- Enclosing class:
- Visitors
public static class Visitors.CompositeVisitor extends Object implements Visitors.IVisitor
Composes several visitors into one. Sequentially calls the given visitors, returningfalse
iff all of them returnedfalse
.
-
-
Constructor Summary
Constructors Constructor Description CompositeVisitor(Visitors.IVisitor... visitors)
Constructs a composite visitor from the given visitors.CompositeVisitor(Collection<Visitors.IVisitor> visitors)
Constructs a composite visitor from the given visitors.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
visit(org.eclipse.emf.ecore.EObject eObject)
Visits the given object.
-
-
-
Constructor Detail
-
CompositeVisitor
public CompositeVisitor(Visitors.IVisitor... visitors)
Constructs a composite visitor from the given visitors. The given array is copied.- Parameters:
visitors
- the visitors to compose
-
CompositeVisitor
public CompositeVisitor(Collection<Visitors.IVisitor> visitors)
Constructs a composite visitor from the given visitors. The given collection is copied.- Parameters:
visitors
- the visitors to compose (notnull
)
-
-
Method Detail
-
visit
public boolean visit(org.eclipse.emf.ecore.EObject eObject)
Description copied from interface:Visitors.IVisitor
Visits the given object. Returns whether the contents of the object should also be visited.- Specified by:
visit
in interfaceVisitors.IVisitor
- Parameters:
eObject
- notnull
- Returns:
true
if the contents of the given object should be visited, andfalse
otherwise
-
-