code: static Class resolveObjectClass(Type objectType) {
          final Class type = PRIMITIVE_PARAMETER_TYPES.get(objectType);
          if (type != null) {
              return type;
          }
          if (isOptionalType(objectType)) {
              return resolveObjectClass(extractTypeFromOptional(objectType));
          }
          try {
              return (Class) objectType;
          } catch (ClassCastException e) {
              throw new IllegalStateException("Cannot resolve object class from type: " + objectType, e);
          }
      }
docs: Resolves the {@link Class} that corresponds with a {@link Type}.
  <p>
  {@code Class} is an implementation of {@code Type} but, of course, not every {@code Type} is a {@code Class}.
  Case in point here are primitive types. These can appear as method parameters.
  
  @param objectType Type to resolve.
  @return Corresponding class.