code: public void setUpToClass(final Class<?> clazz) {
          if (clazz != null) {
              final Object object = getObject();
              if (object != null && !clazz.isInstance(object)) {
                  throw new IllegalArgumentException("Specified class is not a superclass of the object");
              }
          }
          this.upToClass = clazz;
      }
docs: <p>
  Sets the last super class to stop appending fields for.
  </p>
  
  @param clazz
  The last super class to stop appending fields for.