@Test public void testSingleParameter_RHSFieldValue() { final String result = utilities.convertSingleParameterToTemplateKey( "setField( $param )", ParameterizedValueBuilder.Part.RHS ); assertEquals( "setField( @{param1} )", result ); }
public String convertSingleParameterToTemplateKey( final String xlsTemplate, final ParameterizedValueBuilder.Part part ) { final StringBuffer result = new StringBuffer(); final Matcher matcherSingleParameter = patternSingleParameter.matcher( xlsTemplate ); while ( matcherSingleParameter.find() ) { matcherSingleParameter.appendReplacement( result, "@{" + PARAMETER_PREFIX + parameterCounter + "}" ); } parameterCounter++; matcherSingleParameter.appendTail( result ); return assertTemplateKeyConversion( result, part ); }
ParameterUtilities { public String convertSingleParameterToTemplateKey( final String xlsTemplate, final ParameterizedValueBuilder.Part part ) { final StringBuffer result = new StringBuffer(); final Matcher matcherSingleParameter = patternSingleParameter.matcher( xlsTemplate ); while ( matcherSingleParameter.find() ) { matcherSingleParameter.appendReplacement( result, "@{" + PARAMETER_PREFIX + parameterCounter + "}" ); } parameterCounter++; matcherSingleParameter.appendTail( result ); return assertTemplateKeyConversion( result, part ); } }
ParameterUtilities { public String convertSingleParameterToTemplateKey( final String xlsTemplate, final ParameterizedValueBuilder.Part part ) { final StringBuffer result = new StringBuffer(); final Matcher matcherSingleParameter = patternSingleParameter.matcher( xlsTemplate ); while ( matcherSingleParameter.find() ) { matcherSingleParameter.appendReplacement( result, "@{" + PARAMETER_PREFIX + parameterCounter + "}" ); } parameterCounter++; matcherSingleParameter.appendTail( result ); return assertTemplateKeyConversion( result, part ); }  }
ParameterUtilities { public String convertSingleParameterToTemplateKey( final String xlsTemplate, final ParameterizedValueBuilder.Part part ) { final StringBuffer result = new StringBuffer(); final Matcher matcherSingleParameter = patternSingleParameter.matcher( xlsTemplate ); while ( matcherSingleParameter.find() ) { matcherSingleParameter.appendReplacement( result, "@{" + PARAMETER_PREFIX + parameterCounter + "}" ); } parameterCounter++; matcherSingleParameter.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 convertSingleParameterToTemplateKey( final String xlsTemplate, final ParameterizedValueBuilder.Part part ) { final StringBuffer result = new StringBuffer(); final Matcher matcherSingleParameter = patternSingleParameter.matcher( xlsTemplate ); while ( matcherSingleParameter.find() ) { matcherSingleParameter.appendReplacement( result, "@{" + PARAMETER_PREFIX + parameterCounter + "}" ); } parameterCounter++; matcherSingleParameter.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 );  }