org.infolayer.templates.elements
Class TE_forAll
java.lang.Object
org.kxml2.kdom.Element
org.infolayer.templates.TemplateElement
org.infolayer.templates.elements.TE_forAll
- public class TE_forAll
- extends TemplateElement
Processes all child elements for each element of the collection
obtained from evaluating the expr-attribute. If the type
of expr is OclType, an implicit call to
allInstances() is performed to obtain a set. If the expr
attribute is omitted, it defaults to the expression self.
When a iterator attribute is given, its value is used
as the name of an iterator variable. Otherwise, the evaluation
context (self) is set accordingly in each iteration step. The
counter-attribute allows to declare an integer
variable, holding the current element index in each iteration step.
Attributes
- expr
- Contains an OCL expression that must result
in an collection.
- iterator
- If present, the value denotes an iterator variable name
that is used instead of self.
- counter
- If present, the given variable name
is used to declare an integer variable holding the
current element index.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TE_forAll
public TE_forAll()
init
public void init()
- Overrides:
init
in class TemplateElement
getEnumeration
public java.util.Iterator getEnumeration(Bindings bindings)
apply
public void apply(XmlSerializer xw,
IlRequest context,
Bindings bindings)
throws java.io.IOException
- Description copied from class:
TemplateElement
- Applies the template mechanism. Must be overwritten in the
- Overrides:
apply
in class TemplateElement
- Throws:
java.io.IOException