@Test public void evaluate_not_binding() throws Exception { try { Binding.valueOf("abc", null, null); } catch (IllegalArgumentException e) { assertThat(true, is(true)); } }
public static Binding valueOf(@NonNull final String value, Context context, FunctionManager manager) { Matcher matcher = BINDING_PATTERN.matcher(value); if (matcher.find()) { if (matcher.group(3) != null) { return DataBinding.valueOf(matcher.group(3)); } else { return FunctionBinding.valueOf(matcher.group(1), matcher.group(2), context, manager); } } else { throw new IllegalArgumentException(value + " is not a binding"); } }
Binding extends Value { public static Binding valueOf(@NonNull final String value, Context context, FunctionManager manager) { Matcher matcher = BINDING_PATTERN.matcher(value); if (matcher.find()) { if (matcher.group(3) != null) { return DataBinding.valueOf(matcher.group(3)); } else { return FunctionBinding.valueOf(matcher.group(1), matcher.group(2), context, manager); } } else { throw new IllegalArgumentException(value + " is not a binding"); } } }
Binding extends Value { public static Binding valueOf(@NonNull final String value, Context context, FunctionManager manager) { Matcher matcher = BINDING_PATTERN.matcher(value); if (matcher.find()) { if (matcher.group(3) != null) { return DataBinding.valueOf(matcher.group(3)); } else { return FunctionBinding.valueOf(matcher.group(1), matcher.group(2), context, manager); } } else { throw new IllegalArgumentException(value + " is not a binding"); } }  }
Binding extends Value { public static Binding valueOf(@NonNull final String value, Context context, FunctionManager manager) { Matcher matcher = BINDING_PATTERN.matcher(value); if (matcher.find()) { if (matcher.group(3) != null) { return DataBinding.valueOf(matcher.group(3)); } else { return FunctionBinding.valueOf(matcher.group(1), matcher.group(2), context, manager); } } else { throw new IllegalArgumentException(value + " is not a binding"); } }  static boolean isBindingValue(@NonNull final String value); static Binding valueOf(@NonNull final String value, Context context, FunctionManager manager); @NonNull abstract Value evaluate(Context context, Value data, int index); @NonNull abstract String toString(); @Override Binding copy(); }
Binding extends Value { public static Binding valueOf(@NonNull final String value, Context context, FunctionManager manager) { Matcher matcher = BINDING_PATTERN.matcher(value); if (matcher.find()) { if (matcher.group(3) != null) { return DataBinding.valueOf(matcher.group(3)); } else { return FunctionBinding.valueOf(matcher.group(1), matcher.group(2), context, manager); } } else { throw new IllegalArgumentException(value + " is not a binding"); } }  static boolean isBindingValue(@NonNull final String value); static Binding valueOf(@NonNull final String value, Context context, FunctionManager manager); @NonNull abstract Value evaluate(Context context, Value data, int index); @NonNull abstract String toString(); @Override Binding copy(); static final char BINDING_PREFIX_0; static final char BINDING_PREFIX_1; static final char BINDING_SUFFIX; static final String INDEX; static final String ARRAY_DATA_LENGTH_REFERENCE; static final String ARRAY_DATA_LAST_INDEX_REFERENCE; static final Pattern BINDING_PATTERN; static final Pattern FUNCTION_ARGS_DELIMITER; static final String DATA_PATH_DELIMITERS; static final char DELIMITER_OBJECT; static final char DELIMITER_ARRAY_OPENING; static final char DELIMITER_ARRAY_CLOSING; }