@Test public void verifyComplexFilterInputParameterExtraction() { String filterExpression = "{ '$or' => [ {a => :#p1 }, { b => :#p2 } ] }"; List<String> result = FilterUtil.extractParameters(filterExpression); Assertions.assertThat(result).containsExactly("p1", "p2"); }
public static List<String> extractParameters(String filter) { List<String> result = new ArrayList<>(); Matcher matcher = PARAM_PATTERN.matcher(filter); while (matcher.find()) { String param = matcher.group(); result.add(param.substring(2)); } return result; }
FilterUtil { public static List<String> extractParameters(String filter) { List<String> result = new ArrayList<>(); Matcher matcher = PARAM_PATTERN.matcher(filter); while (matcher.find()) { String param = matcher.group(); result.add(param.substring(2)); } return result; } }
FilterUtil { public static List<String> extractParameters(String filter) { List<String> result = new ArrayList<>(); Matcher matcher = PARAM_PATTERN.matcher(filter); while (matcher.find()) { String param = matcher.group(); result.add(param.substring(2)); } return result; } private  FilterUtil(); }
FilterUtil { public static List<String> extractParameters(String filter) { List<String> result = new ArrayList<>(); Matcher matcher = PARAM_PATTERN.matcher(filter); while (matcher.find()) { String param = matcher.group(); result.add(param.substring(2)); } return result; } private  FilterUtil(); static List<String> extractParameters(String filter); static boolean hasAnyParameter(String filter); static String merge(String filter, String jsonMessage); }
FilterUtil { public static List<String> extractParameters(String filter) { List<String> result = new ArrayList<>(); Matcher matcher = PARAM_PATTERN.matcher(filter); while (matcher.find()) { String param = matcher.group(); result.add(param.substring(2)); } return result; } private  FilterUtil(); static List<String> extractParameters(String filter); static boolean hasAnyParameter(String filter); static String merge(String filter, String jsonMessage);  }