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