/** {@inheritDoc} */ public Class getType(Object instance, String propertyName) { if (instance == null || propertyName == null) return null; BeanProperty bp = getBeanProperty(instance, propertyName); if (bp != null) { return bp.getType(); } return null; }
/** {@inheritDoc} */ public Class getType(Object instance, String propertyName) { if (instance == null || propertyName == null) return null; BeanProperty bp = getBeanProperty(instance, propertyName); return bp == null? null : bp.getType(); }
/** {@inheritDoc} */ public Class getType(Object instance, String propertyName) { if (instance == null || propertyName == null) return null; BeanProperty bp = getBeanProperty(instance, propertyName); return bp == null? null : bp.getType(); }
/** * Return true if this property is write only, which means we cannot get a value for it. * * @param instance the instance * @param propertyName the property name * @return true if there is a way to write but not read the property */ public boolean isWriteOnly(Object instance, String propertyName) { if (instance == null || propertyName == null) return false; BeanProperty bp = getBeanProperty(instance, propertyName); return bp != null && bp.isWrite() && !bp.isRead(); }
/** * Return true if this property is write only, which means we cannot get a value for it. * * @param instance the instance * @param propertyName the property name * @return true if there is a way to write but not read the property */ public boolean isWriteOnly(Object instance, String propertyName) { if (instance == null || propertyName == null) return false; BeanProperty bp = getBeanProperty(instance, propertyName); return bp != null && bp.isWrite() && !bp.isRead(); }
/** {@inheritDoc} */ public Object getValue(Object instance, String propertyName) { if (instance == null || propertyName == null) return null; BeanProperty bp = getBeanProperty(instance, propertyName); if (bp != null) return getBeanValue(instance, bp); SerializationContext context = getSerializationContext(); if (!ignorePropertyErrors(context)) { // Property '{propertyName}' not found on class '{alias}'. MessageException ex = new MessageException(); ex.setMessage(UNKNOWN_PROPERTY_ERROR, new Object[] {propertyName, getAlias(instance)}); throw ex; } return null; }
/** {@inheritDoc} */ public Object getValue(Object instance, String propertyName) { if (instance == null || propertyName == null) return null; BeanProperty bp = getBeanProperty(instance, propertyName); if (bp != null) return getBeanValue(instance, bp); SerializationContext context = getSerializationContext(); if (!ignorePropertyErrors(context)) { // Property '{propertyName}' not found on class '{alias}'. MessageException ex = new MessageException(); ex.setMessage(UNKNOWN_PROPERTY_ERROR, new Object[] {propertyName, getAlias(instance)}); throw ex; } return null; }
/** {@inheritDoc} */ public Object getValue(Object instance, String propertyName) { if (instance == null || propertyName == null) return null; BeanProperty bp = getBeanProperty(instance, propertyName); if (bp != null) { return getBeanValue(instance, bp); } else { SerializationContext context = getSerializationContext(); if (!ignorePropertyErrors(context)) { // Property '{propertyName}' not found on class '{alias}'. MessageException ex = new MessageException(); ex.setMessage(UNKNOWN_PROPERTY_ERROR, new Object[] {propertyName, getAlias(instance)}); throw ex; } } return null; }
BeanProperty bp = getBeanProperty(instance, propertyName);
BeanProperty bp = getBeanProperty(instance, propertyName);
BeanProperty bp = getBeanProperty(instance, propertyName);