code: public static Class<?> getTypeForProperty(Method getter)
      {
          Class<?> returnType = getter.getReturnType();
          if (returnType.equals(Void.TYPE))
              throw new IllegalArgumentException("Getter " + getter.toString() + " does not have a returntype.");
          else if (returnType.isPrimitive())
              return MethodUtils.getPrimitiveWrapper(returnType);
          return returnType;
      }
docs: Returns the type of the property checking if it actually does return something and wrapping primitives
  if needed.
  
  @param getter
  the method to access the property.
  @return the type of the property.
  @throws IllegalArgumentException
  if the method has a {@link Void} return type.