code: public static SortedMap<String, Object> asMap(Object bean) {
          if (bean == null) {
              throw new IllegalArgumentException();
          }
          BeanPropertyMapFactory factory = forClass(bean.getClass());
          return factory.createMap(bean);
      }
docs: Returns a fixed-size map backed by the given bean. Map remove operations
  are unsupported, as is access to excluded properties.
  
  @throws IllegalArgumentException if bean is null