@Test public void testMultiPlaceHolderEscapedComma() { final String snippet = "rulesOutputRouting.set( $1, $2, $3, $4, $5 );"; final SnippetBuilder snip = new SnippetBuilder(snippet); final String result = snip.build("\"80\",\"Department Manager\",toa.getPersonExpense().getEntityCode(\"Part Of\",\"Office\"),10004,30"); assertEquals("rulesOutputRouting.set( \"80\", \"Department Manager\", toa.getPersonExpense().getEntityCode(\"Part Of\",\"Office\"), 10004, 30 );", result); }
public String build( final String cellValue ) { switch ( type ) { case FORALL: return buildForAll( cellValue ); case INDEXED: return buildMulti( cellValue ); default: return buildSingle( cellValue ); } }
SnippetBuilder { public String build( final String cellValue ) { switch ( type ) { case FORALL: return buildForAll( cellValue ); case INDEXED: return buildMulti( cellValue ); default: return buildSingle( cellValue ); } } }
SnippetBuilder { public String build( final String cellValue ) { switch ( type ) { case FORALL: return buildForAll( cellValue ); case INDEXED: return buildMulti( cellValue ); default: return buildSingle( cellValue ); } } SnippetBuilder( String snippetTemplate );  SnippetBuilder( String snippetTemplate, boolean trim ); }
SnippetBuilder { public String build( final String cellValue ) { switch ( type ) { case FORALL: return buildForAll( cellValue ); case INDEXED: return buildMulti( cellValue ); default: return buildSingle( cellValue ); } } SnippetBuilder( String snippetTemplate );  SnippetBuilder( String snippetTemplate, boolean trim ); static SnippetType getType( String template ); String build( final String cellValue ); }
SnippetBuilder { public String build( final String cellValue ) { switch ( type ) { case FORALL: return buildForAll( cellValue ); case INDEXED: return buildMulti( cellValue ); default: return buildSingle( cellValue ); } } SnippetBuilder( String snippetTemplate );  SnippetBuilder( String snippetTemplate, boolean trim ); static SnippetType getType( String template ); String build( final String cellValue ); static final String PARAM_PREFIX; static final String PARAM_SUFFIX; static final String PARAM_STRING; static final String PARAM_FORALL_STRING; static final Pattern PARAM_FORALL_PATTERN; }