Class name validation method
@param {String} className class name to validate - e.g. 'TestSuite'
@param {String} context additional context information
@return {Boolean} true if class path is OK
972757
function (className, context) {
        context = context || '';
        if (!className || !className.match(/^[_A-Z]\w*$/)) {
            Aria.$logError(Aria.INVALID_CLASSNAME_FORMAT, [className, context]);
            return false;
        }
        if (Aria.isJsReservedWord(className)) {
            Aria.$logError(Aria.INVALID_CLASSNAME_RESERVED, [className, context]);
            return false;
        }
        return true;
    }
1017247
function (element, className) {
		var elemClassName;
		while (element) {
			elemClassName = attr(element, 'class');
			if (elemClassName) {
				if (elemClassName.indexOf(className) !== -1) {
					return true;
				} else if (elemClassName.indexOf(PREFIX + 'container') !== -1) {
					return false;
				}
			}
			element = element.parentNode;
		}		
	}
112082
private static boolean isValidJavaClassFile(String file) {
        if (!file.endsWith(".class")) return false;
        String clazzName = file.substring(0, file.length() - ".class".length());
        return isValidClassName(clazzName);
    }
452855
def qualify_class_name(klass_name)
    unless @namespace.nil? || @namespace.blank? || klass_name.include?('::')
      namespaces = @namespace.split(/\.|::/)
      namespaces << klass_name
      klass_name = namespaces.join '::'
    end
    klass_name.camelize
  end
763490
private void validateClassLevelJsDoc(Node n, JSDocInfo info) {
    if (info != null && n.isMemberFunctionDef()
        && hasClassLevelJsDoc(info)) {
      report(n, DISALLOWED_MEMBER_JSDOC);
    }
  }
24564
function(node) {

        var valid = true;
        // var n = (node.nodeName == "#text") ? node.parentNode : node;
        var nodeName;
        try {
            nodeName = node.nodeName.toUpperCase();
        } catch(e) {
            nodeName = node.nodeName;
        }
        valid = valid && !this.invalidHandleTypes[nodeName];
        valid = valid && !this.invalidHandleIds[node.id];

        for (var i=0, len=this.invalidHandleClasses.length; valid && i<len; ++i) {
            valid = !Dom.hasClass(node, this.invalidHandleClasses[i]);
        }

        this.logger.log("Valid handle? ... " + valid);

        return valid;

    }
210087
def _validate_class_definition(meta, classname, bases, dict_):
        
        # let the BaseMatcher class be created without hassle
        if meta._is_base_matcher_class_definition(classname, dict_):
            return

        # ensure that no important magic methods are being overridden
        for name, member in dict_.items():
            if not (name.startswith('__') and name.endswith('__')):
                continue

            # check if it's not a whitelisted magic method name
            name = name[2:-2]
            if not name:
                continue  # unlikely case of a ``____`` function
            if name not in meta._list_magic_methods(BaseMatcher):
                continue
            if name in meta.USER_OVERRIDABLE_MAGIC_METHODS:
                continue

            # non-function attributes, like __slots__, are harmless
            if not inspect.isfunction(member):
                continue

            # classes in this very module are exempt, since they define
            # the very behavior of matchers we want to protect
            if member.__module__ == __name__:
                continue

            raise RuntimeError(
                "matcher class %s cannot override the __%s__ method" % (
                    classname, name))
452649
function (el, className) {
        if (className && isElement(el)) {
            return el.classList.contains(className)
        }

        return false
    }
789156
function toClassName(name) {
  var result = '';
  var upNext = false;
  for (var i = 0; i < name.length; i++) {
    var c = name.charAt(i);
    var valid = /[\w]/.test(c);
    if (!valid) {
      upNext = true;
    } else if (upNext) {
      result += c.toUpperCase();
      upNext = false;
    } else if (result === '') {
      result = c.toUpperCase();
    } else {
      result += c;
    }
  }
  if (/[0-9]/.test(result.charAt(0))) {
    result = '_' + result;
  }
  return result;
}
342434
function(node, className) {
        var re = Y.DOM._getRegExp('(?:^|\\s+)' + className + '(?:\\s+|$)');
        return re.test(node.className);
    }
518075
function hasClass(element, className) {
    var hasClass = true;
    nodesToArray(element).forEach(function (node) {
        if (!node.classList.contains(className)) {
            hasClass = false;
        }
    });
    return hasClass;
}
294368
function (className) {
            var loggingLevel = this._loggingLevels[className];
            if (!!loggingLevel) {
                // If there is a logging level stored for the exact classname passed in parameter
                return loggingLevel;
            } else {
                // Else, look for package names
                var str = className;

                while (str.indexOf(".") != -1) {
                    str = str.substring(0, str.lastIndexOf("."));
                    if (this._loggingLevels[str]) {
                        return this._loggingLevels[str];
                    } else if (this._loggingLevels[str + ".*"]) {
                        return this._loggingLevels[str + ".*"];
                    }
                }

                return this._loggingLevels["*"] || false;
            }
        }
358558
function validateNumber(context, name, def) {
  var value = context[name]

  if (value == null) {
    value = def
  }

  if (isNaN(value)) {
    raise(value, 'options.' + name)
  }

  context[name] = value
}
824383
function isValidContext() {
            if (e.target && e.target.nodeName) {
                var name = e.target.nodeName.toLowerCase();
                return [
                    'input'    === name,
                    'textarea' === name,
                    'select'   === name
                ].indexOf(true) === -1;
            }
            return true;
        }
1056617
function (className) {
            var classes = this.getClassName().split(" ");
            for (var i = 0, ii = classes.length; i < ii; i++) {
                if (classes[i] == className) {
                    return true;
                }
            }
            return false;
        }
643970
public boolean hasClass(String className) {
        for (Element element : this) {
            if (element.hasClass(className))
                return true;
        }
        return false;
    }
871315
function hasClass(element, className) {
    !!/\s/.test(className) ? "development" !== 'production' ? invariant(false, 'CSS.hasClass takes only a single class name.') : invariant(false) : void 0;
    if (element.classList) {
      return !!className && element.classList.contains(className);
    }
    return (' ' + element.className + ' ').indexOf(' ' + className + ' ') > -1;
  }