static AttributeBindingException createWithNoKey(String message, Throwable cause) { return new AttributeBindingException(null, message, cause); } }
static AttributeBindingException createWithNoKey(String message) { return new AttributeBindingException(null, message); }
public void performAction(BindingTracker bindingTracker, int level, Object object, Field field, Object value, Predicate<Field> predicate) throws InstantiationException { final String key = BindableUtils.getKey(field); try { // Apply transforms for (IAttributeTransformer transformer : transformers) { value = transformer.transform(value, key, field); } if (bindingTracker.canBind(object, key, level)) { values.put(key, value); } } catch (final Exception e) { throw new AttributeBindingException(key, "Could not get field value " + object.getClass().getName() + "#" + field.getName(), e); } } }
throw new AttributeBindingException(key, "No value for required attribute: " + key + " (" + field.getDeclaringClass().getName() + "#" + field.getName() throw new AttributeBindingException(key, "Not allowed to set required attribute to null: " + key); throw new AttributeBindingException(key, "Could not assign field " + object.getClass().getName() + "#" + field.getName() + " with value " + value, e);