Class DslHelper

java.lang.Object
nz.org.riskscape.wizard.model2.DslHelper

public class DslHelper extends Object

Provides some convenience methods to assist generating pipeline DSL code.

  • Constructor Details

    • DslHelper

      public DslHelper()
  • Method Details

    • asStructMembers

      public static 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.

    • 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.