File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
src/main/java/com/lmax/simpledsl/api Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,27 @@ static DslParams create(String[] args, DslArg... arguments)
6464 return new DslParamsParser ().parse (args , arguments );
6565 }
6666
67+ /**
68+ * Create new {@link DslParams} from multiline args. Useful for passing java text blocks.
69+ *
70+ * <pre>
71+ * publicAPI.placeOrder("""
72+ * FTSE100
73+ * side: buy
74+ * quantity: 10
75+ * price: 5000
76+ * expectedStatus: UNMATCHED
77+ * """);
78+ * </pre>
79+ *
80+ * @param multilineArgs the values
81+ * @param arguments the {@link DslArg multilineArgs}
82+ * @return the new {@link DslParams}
83+ */
84+ static DslParams create (String multilineArgs , DslArg ... arguments )
85+ {
86+ return new DslParamsParser ().parse (multilineArgs .split (System .lineSeparator ()), arguments );
87+ }
6788
6889 /**
6990 * A shorthand way to create a {@link DslParams} instance that accepts a single required parameter and return the
You can’t perform that action at this time.
0 commit comments