code: public static Map<String, Object> introspect(Object obj) throws IntrospectionException, InvocationTargetException, IllegalAccessException {
  		Map<String, Object> result = new HashMap<>();
  		BeanInfo info = Introspector.getBeanInfo( obj.getClass() );
  		for ( PropertyDescriptor pd : info.getPropertyDescriptors() ) {
  			Method reader = pd.getReadMethod();
  			String name = pd.getName();
  			if ( reader != null && !"class".equals( name ) ) {
  				result.put( name, reader.invoke( obj ) );
  			}
  		}
  		return result;
  	}
docs: Introspect the given object.
  
  @param obj object for introspection.
  
  @return a map containing object's field values.
  
  @throws IntrospectionException if an exception occurs during introspection
  @throws InvocationTargetException if property getter throws an exception
  @throws IllegalAccessException if property getter is inaccessible