@Test public void testIndexedParameters_LHSFieldValue() { final String result = utilities.convertIndexedParametersToTemplateKeys( "field1 == $1, field2 == $2", ParameterizedValueBuilder.Part.LHS ); assertEquals( "field1 == \"@{param1}\", field2 == \"@{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 );  }