Adds the given class to the {@code class} property of this element.

@param clazz HTML class to add
@return This element
553616
public AbstractHTMLElement addClass(String clazz) {
        String currentClass = this.getProperty("class");
        if (currentClass != null) {
            currentClass += " " + clazz;
        } else {
            currentClass = clazz;
        }
        this.setProperty("class", currentClass);

        return this;
    }
206697
function (el, cls) {
        cls = getString(cls);
        if (!cls) return;
        if (Array.isArray(cls)) {
            cls.forEach(function(c) {
                dom.addClass(el, c);
            });
        } else if (el.classList) {
            el.classList.add(cls);
        } else {
            if (!hasClass(el, cls)) {
                if (el.classList) {
                    el.classList.add(cls);
                } else {
                    el.className += ' ' + cls;
                }
            }
        }
    }
876252
public <T> ClassController<T> on(final Class<T> clazz) {
		return new DefaultClassController<T>(provider, clazz);
	}
156362
@PublicAPI(usage = ACCESS)
    public JavaClass importClass(Class<?> clazz) {
        return getOnlyElement(importClasses(clazz));
    }
470309
public void addAnnotation(final Class<? extends Annotation> clazz) {
        if (field.isAnnotationPresent(clazz)) {
            addAnnotation(clazz, field.getAnnotation(clazz));
        }
    }
1060777
@SuppressWarnings("unchecked")
    public <P> P createBean(final Class<P> clazz) {
        return (P) beanFactory.create(clazz);
    }
1366422
public static Stack<Class<?>> getClassHierarchy(final Class<?> clazz) {
        final Stack<Class<?>> classHierarchy = new Stack<Class<?>>();
        Class<?> c = clazz;
        while (c != null) {
            classHierarchy.push(c);
            c = (isStatic(c.getModifiers())) ? null : c.getEnclosingClass();
        }
        return classHierarchy;
    }
1330221
def add_class(self, cssclass):
        """"""
        if self.has_class(cssclass):
            return self
        return self.toggle_class(cssclass)
919028
function addClass (el, cls) {
	  /* istanbul ignore else */
	  if (el.classList) {
	    if (cls.indexOf(' ') > -1) {
	      cls.split(/\s+/).forEach(function (c) { return el.classList.add(c); });
	    } else {
	      el.classList.add(cls);
	    }
	  } else {
	    var cur = ' ' + el.getAttribute('class') + ' ';
	    if (cur.indexOf(' ' + cls + ' ') < 0) {
	      el.setAttribute('class', (cur + cls).trim());
	    }
	  }
	}
1098234
public C createObject(String className, Class clazz) throws ClassNotFoundException {
        return createObject(className, clazz, /* no dynamic init */ null);
    }
285807
public <T extends Extension> T getExtension(Class<T> clazz) {
        if (clazz != null) {
            Extension extension = extensionsMap.get(clazz);
            if (extension != null) {
                return clazz.cast(extension);
            }
        }
        return null;
    }
1364896
public static ClassLoader getClassLoader(Class clazz){
        ClassLoader classLoader = clazz.getClassLoader();
        return classLoader==null ? ClassLoader.getSystemClassLoader() : classLoader;
    }
1060241
public static Class<?>[] getAllSuperClasses(Class<?> clz) {
    List<Class<?>> list = new ArrayList<>();
    while ((clz = clz.getSuperclass()) != null) {
      list.add(clz);
    }
    return list.toArray(new Class<?>[list.size()]);
  }
635864
def add_class(self, className):
        
        if className not in self._dom_classes:
            self._dom_classes = list(self._dom_classes) + [className]
        return self
1259590
public void putClass(String key, Class<?> clazz) {
		checkNotNull(key);
		checkNotNull(clazz);
		final String error = InstantiationUtil.checkForInstantiationError(clazz);
		if (error != null) {
			throw new ValidationException("Class '" + clazz.getName() + "' is not supported: " + error);
		}
		put(key, clazz.getName());
	}
1297573
public static Builder forClass(Class clazz) {
        if (clazz == null) {
            throw new IllegalArgumentException("class can not be null");
        }
        return new Builder(Collections.singletonList(clazz));
    }
313939
@Override
    public <TYPE extends Assignable> TYPE as(final Class<TYPE> clazz) {
        Validate.notNull(clazz, "Class must be specified");

        return this.configuration.getExtensionLoader().load(clazz, this);
    }