@Override public boolean matchesSafely(T obj) { try { return PropertyUtil.getPropertyDescriptor(propertyName, obj) != null; } catch (IllegalArgumentException e) { return false; } }
@Override public boolean matchesSafely(T obj) { try { return PropertyUtil.getPropertyDescriptor(propertyName, obj) != null; } catch (IllegalArgumentException e) { return false; } }
private Condition<PropertyDescriptor> propertyOn(T bean, Description mismatch) { PropertyDescriptor property = PropertyUtil.getPropertyDescriptor(propertyName, bean); if (property == null) { mismatch.appendText("No property \"" + propertyName + "\""); return notMatched(); } return matched(property, mismatch); }
private Condition<PropertyDescriptor> propertyOn(T bean, Description mismatch) { PropertyDescriptor property = PropertyUtil.getPropertyDescriptor(propertyName, bean); if (property == null) { mismatch.appendText("No property \"" + propertyName + "\""); return notMatched(); } return matched(property, mismatch); }
@Override public boolean matchesSafely(T obj) { try { return PropertyUtil.getPropertyDescriptor(propertyName, obj) != null; } catch (IllegalArgumentException e) { return false; } }
private Condition<PropertyDescriptor> propertyOn(T bean, Description mismatch) { PropertyDescriptor property = PropertyUtil.getPropertyDescriptor(propertyName, bean); if (property == null) { mismatch.appendText("No property \"" + propertyName + "\""); return notMatched(); } return matched(property, mismatch); }
@Override public boolean matchesSafely(T obj) { try { return PropertyUtil.getPropertyDescriptor(propertyName, obj) != null; } catch (IllegalArgumentException e) { return false; } }
public boolean matchesSafely(T obj) { try { return PropertyUtil.getPropertyDescriptor(propertyName, obj) != null; } catch (IntrospectionException e) { // introspection failure is treated as a matcher failure return false; } }
private Method getReadMethod(Object argument) throws IntrospectionException { PropertyDescriptor property = PropertyUtil.getPropertyDescriptor(propertyName, argument); return property == null ? null : property.getReadMethod(); }
private Condition<PropertyDescriptor> propertyOn(T bean, Description mismatch) { PropertyDescriptor property = PropertyUtil.getPropertyDescriptor(propertyName, bean); if (property == null) { mismatch.appendText("No property \"" + propertyName + "\""); return notMatched(); } return matched(property, mismatch); }