public class Row extends Object
Row corresponds to a row of DSL method invocations in their typically formatting.
In the typical formatting, a row has the syntax of: [OutputElement] MainElement [InputElement]*.
See ElementUtil.isOutputElement(Element), ElementUtil.isMainElement(Element), and
ElementUtil.isInputElement(Element) for how elements are categorised.
For instance, each of the following code rows a code will translate into a Row when parsing the DSL.
.if_(1,"condition)
.value("account").call(2,"accountService","findAccount","{accountId}");
.endIf();
A maybe associated with a Node when parsing the Tree of rows. The associated node is the created node
based on the elements in the given row.| Modifier and Type | Method and Description |
|---|---|
void |
addToken(Element element) |
int |
getId()
Convenience method returning the main element's id.
|
List<Element> |
getInputElement()
Returns a list of the row's input elements.
|
Element |
getMainElement() |
Node |
getNode() |
Element |
getOutputElement() |
Element.Type |
getType()
Convenience method returning the main element's type.
|
boolean |
hasNode() |
void |
setNode(Node node) |
String |
toString() |
public Row(Element... tokens)
public void addToken(Element element)
public Element getMainElement()
public int getId()
NullPointerException - if the row's main element does not define an id.public Element.Type getType()
public Element getOutputElement()
public List<Element> getInputElement()
null.public void setNode(Node node)
public Node getNode()
public boolean hasNode()
Copyright © 2018. All rights reserved.