@Test public void testIndexedParameters_RHSFieldValue() { final String result = utilities.convertIndexedParametersToTemplateKeys( "setField1( $1 ); setField2( $2 )", ParameterizedValueBuilder.Part.RHS ); assertEquals( "setField1( @{param1} ); setField2( @{param2} )", result ); }
public String convertIndexedParametersToTemplateKeys( final String xlsTemplate, final ParameterizedValueBuilder.Part part ) { final StringBuffer result = new StringBuffer(); final Matcher matcherIndexedParameter = patternIndexedParameter.matcher( xlsTemplate ); while ( matcherIndexedParameter.find() ) { matcherIndexedParameter.appendReplacement( result, "@{" + PARAMETER_PREFIX + ( parameterCounter++ ) + "}" ); } matcherIndexedParameter.appendTail( result ); return assertTemplateKeyConversion( result, part ); }
ParameterUtilities { public String convertIndexedParametersToTemplateKeys( final String xlsTemplate, final ParameterizedValueBuilder.Part part ) { final StringBuffer result = new StringBuffer(); final Matcher matcherIndexedParameter = patternIndexedParameter.matcher( xlsTemplate ); while ( matcherIndexedParameter.find() ) { matcherIndexedParameter.appendReplacement( result, "@{" + PARAMETER_PREFIX + ( parameterCounter++ ) + "}" ); } matcherIndexedParameter.appendTail( result ); return assertTemplateKeyConversion( result, part ); } }
ParameterUtilities { public String convertIndexedParametersToTemplateKeys( final String xlsTemplate, final ParameterizedValueBuilder.Part part ) { final StringBuffer result = new StringBuffer(); final Matcher matcherIndexedParameter = patternIndexedParameter.matcher( xlsTemplate ); while ( matcherIndexedParameter.find() ) { matcherIndexedParameter.appendReplacement( result, "@{" + PARAMETER_PREFIX + ( parameterCounter++ ) + "}" ); } matcherIndexedParameter.appendTail( result ); return assertTemplateKeyConversion( result, part ); }  }
ParameterUtilities { public String convertIndexedParametersToTemplateKeys( final String xlsTemplate, final ParameterizedValueBuilder.Part part ) { final StringBuffer result = new StringBuffer(); final Matcher matcherIndexedParameter = patternIndexedParameter.matcher( xlsTemplate ); while ( matcherIndexedParameter.find() ) { matcherIndexedParameter.appendReplacement( result, "@{" + PARAMETER_PREFIX + ( parameterCounter++ ) + "}" ); } matcherIndexedParameter.appendTail( result ); return assertTemplateKeyConversion( result, part ); }  String convertIndexedParametersToTemplateKeys( final String xlsTemplate,
                                                          final ParameterizedValueBuilder.Part part ); String convertSingleParameterToTemplateKey( final String xlsTemplate,
                                                       final ParameterizedValueBuilder.Part part ); Set<String> extractTemplateKeys( final String template ); }
ParameterUtilities { public String convertIndexedParametersToTemplateKeys( final String xlsTemplate, final ParameterizedValueBuilder.Part part ) { final StringBuffer result = new StringBuffer(); final Matcher matcherIndexedParameter = patternIndexedParameter.matcher( xlsTemplate ); while ( matcherIndexedParameter.find() ) { matcherIndexedParameter.appendReplacement( result, "@{" + PARAMETER_PREFIX + ( parameterCounter++ ) + "}" ); } matcherIndexedParameter.appendTail( result ); return assertTemplateKeyConversion( result, part ); }  String convertIndexedParametersToTemplateKeys( final String xlsTemplate,
                                                          final ParameterizedValueBuilder.Part part ); String convertSingleParameterToTemplateKey( final String xlsTemplate,
                                                       final ParameterizedValueBuilder.Part part ); Set<String> extractTemplateKeys( final String template );  }