@Test public void containsExpression_should_returnTrue_when_ObjectNodeContainsExpressionPattern() throws Exception { ObjectNode objectNode = mapper.readValue("{\"name\": \"${name}\"}", ObjectNode.class); boolean containsExpression = expressionResolver.containsExpression(objectNode); assertThat(containsExpression).isTrue(); }
public boolean containsExpression(final Object source) { if (source == null) { return false; } else if (source instanceof String) { return containsExpressionString((String) source); } else if (source instanceof ObjectNode) { return containsExpressionMap(mapper.convertValue(source, MAP_STRING_OBJECT_TYPE)); } else if (source instanceof Map<?, ?>) { return containsExpressionMap((Map<String, ?>) source); } else if (source instanceof List<?>) { return containsExpressionList((List<?>) source); } else { return false; } }
ExpressionResolver { public boolean containsExpression(final Object source) { if (source == null) { return false; } else if (source instanceof String) { return containsExpressionString((String) source); } else if (source instanceof ObjectNode) { return containsExpressionMap(mapper.convertValue(source, MAP_STRING_OBJECT_TYPE)); } else if (source instanceof Map<?, ?>) { return containsExpressionMap((Map<String, ?>) source); } else if (source instanceof List<?>) { return containsExpressionList((List<?>) source); } else { return false; } } }
ExpressionResolver { public boolean containsExpression(final Object source) { if (source == null) { return false; } else if (source instanceof String) { return containsExpressionString((String) source); } else if (source instanceof ObjectNode) { return containsExpressionMap(mapper.convertValue(source, MAP_STRING_OBJECT_TYPE)); } else if (source instanceof Map<?, ?>) { return containsExpressionMap((Map<String, ?>) source); } else if (source instanceof List<?>) { return containsExpressionList((List<?>) source); } else { return false; } } ExpressionResolver(ExpressionManager expressionManager,
        ObjectMapper mapper,
        DelegateInterceptor delegateInterceptor); }
ExpressionResolver { public boolean containsExpression(final Object source) { if (source == null) { return false; } else if (source instanceof String) { return containsExpressionString((String) source); } else if (source instanceof ObjectNode) { return containsExpressionMap(mapper.convertValue(source, MAP_STRING_OBJECT_TYPE)); } else if (source instanceof Map<?, ?>) { return containsExpressionMap((Map<String, ?>) source); } else if (source instanceof List<?>) { return containsExpressionList((List<?>) source); } else { return false; } } ExpressionResolver(ExpressionManager expressionManager,
        ObjectMapper mapper,
        DelegateInterceptor delegateInterceptor); Map<String, Object> resolveExpressionsMap(final ExpressionEvaluator expressionEvaluator,
                                                     final Map<String, ?> sourceMap); boolean containsExpression(final Object source); }
ExpressionResolver { public boolean containsExpression(final Object source) { if (source == null) { return false; } else if (source instanceof String) { return containsExpressionString((String) source); } else if (source instanceof ObjectNode) { return containsExpressionMap(mapper.convertValue(source, MAP_STRING_OBJECT_TYPE)); } else if (source instanceof Map<?, ?>) { return containsExpressionMap((Map<String, ?>) source); } else if (source instanceof List<?>) { return containsExpressionList((List<?>) source); } else { return false; } } ExpressionResolver(ExpressionManager expressionManager,
        ObjectMapper mapper,
        DelegateInterceptor delegateInterceptor); Map<String, Object> resolveExpressionsMap(final ExpressionEvaluator expressionEvaluator,
                                                     final Map<String, ?> sourceMap); boolean containsExpression(final Object source);  }