code: public static Object getProperty(Object obj, String prop, Object defaultValue) {
  
  	// first try field
  	Field[] fields = getFieldsIgnoreCase(obj.getClass(), prop, null);
  	if (!ArrayUtil.isEmpty(fields)) {
  	    try {
  		return fields[0].get(obj);
  	    }
  	    catch (Throwable t) {
  		ExceptionUtil.rethrowIfNecessary(t);
  	    }
  	}
  
  	// then getter
  	try {
  	    char first = prop.charAt(0);
  	    if (first >= '0' && first <= '9') return defaultValue;
  	    return getGetter(obj.getClass(), prop).invoke(obj);
  	}
  	catch (Throwable e1) {
  	    ExceptionUtil.rethrowIfNecessary(e1);
  	    return defaultValue;
  	}
      }
docs: to get a visible Propety (Field or Getter) of a object
  
  @param obj Object to invoke
  @param prop property to call
  @return property value