Package nz.org.riskscape.wizard.model2
Class DslHelper
java.lang.Object
nz.org.riskscape.wizard.model2.DslHelper
Provides some convenience methods to assist generating pipeline DSL code.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
asStructMembers
(List<? extends nz.org.riskscape.rl.ast.Expression> responses) Combines a list of expressions into a comma-separated struct declaration string, minus the {}s.static <T extends nz.org.riskscape.engine.types.Type>
Optional<T>getAttributeType
(nz.org.riskscape.engine.types.Struct parent, String attributeName, Class<T> type)
-
Constructor Details
-
DslHelper
public DslHelper()
-
-
Method Details
-
asStructMembers
Combines a list of expressions into a comma-separated struct declaration string, minus the {}s.
-
getAttributeType
public static <T extends nz.org.riskscape.engine.types.Type> Optional<T> getAttributeType(nz.org.riskscape.engine.types.Struct parent, String attributeName, Class<T> type) - Returns:
- the Type of the specified attribute (if present) within the parent struct.
-