code: public static Map<String, String> mapBean(final Object bean, 
          final Set<String> excludes)
          {
          excludes.add("getClass");
          final Object[] emptyParams = new Object[0];
          final Method[] methods = bean.getClass().getMethods();
          
          final Map<String, String> fields = new HashMap<String, String>();
          for (final Method method : methods) {
              if (method.getParameterTypes().length > 0) {
                  continue;
              }
              final String name = method.getName();
              if (name.startsWith("get") && !excludes.contains(name))  {
                  LOG.debug("Calling method: {}", name);
                  try {
                      final Object returnVal = method.invoke(bean, emptyParams);
                      LOG.debug("Got: {}", returnVal);
                      final String beanValue = String.valueOf(returnVal);
                      final String beanData = 
                          StringUtils.substringAfter(name, "get");
                      fields.put(StringUtils.uncapitalize(beanData), beanValue);
                  }
                  catch (final IllegalAccessException e) {
                      LOG.debug("Could not access method: "+
                          method.toGenericString(), e);
                  }
                  catch (final InvocationTargetException e) {
                      LOG.debug("Could not invoke method: "+
                          method.toGenericString(), e);
                  }
              }
          }
          return fields;
      }
docs: Creates a {@link Map} from all bean data get methods except the ones
  specified to exclude.  Note that "getClass" is always excluded.
  
  @param bean The bean with data to extract.
  @param excludes The method names to exclude.
  @return The map of bean data.