code: public static <T extends XMLObject> T createAttributeValueObject(Class<T> clazz) {
      try {
        QName schemaType = (QName) clazz.getDeclaredField("TYPE_NAME").get(null);
        return createAttributeValueObject(schemaType, clazz);
      }
      catch (NoSuchFieldException | IllegalArgumentException | IllegalAccessException | SecurityException e) {
        throw new RuntimeException(e);
      }
    }
docs: Creates an {@code AttributeValue} object of the given class. The type of the attribute value will be the field that
  is declared as {@code TYPE_NAME} of the given class.
  <p>
  After the object has been constructed, its setter methods should be called to setup the value object before adding
  it to the attribute itself.
  </p>
  
  @param <T>
  the type
  @param clazz
  the type of attribute value
  @return the attribute value
  @see #createAttributeValueObject(QName, Class)