code: private boolean matchesPrimitive(Class<?> targetType, Class<?> valueType) {
          if (!targetType.isPrimitive()) {
              return false;
          }
  
          try {
              // see if there is a "TYPE" field.  This is present for primitive wrappers.
              Field typeField = valueType.getField("TYPE");
              Object primitiveValueType = typeField.get(valueType);
  
              if (targetType == primitiveValueType) {
                  return true;
              }
          } catch (NoSuchFieldException e) {
              // lacking the TYPE field is a good sign that we're not working with a primitive wrapper.
              // we can't match for compatibility
          } catch (IllegalAccessException e) {
              // an inaccessible TYPE field is a good sign that we're not working with a primitive wrapper.
              // nothing to do.  we can't match for compatibility
          }
          return false;
      }
docs: Check whether a value is of the same primitive type as <code>targetType</code>.
  
  @param targetType The primitive type to target.
  @param valueType  The value to match to the primitive type.
  @return Whether <code>valueType</code> can be coerced (e.g. autoboxed) into <code>targetType</code>.