Detect the class type
348249
protected function detectClassType()
    {
        //Some classes extend the facade
        if (interface_exists($this->facade)) {
            $this->classType = 'interface';
            $this->extends = $this->facade;
        } else {
            $this->classType = 'class';
            if (class_exists($this->facade)) {
                $this->extends = $this->facade;
            }
        }
    }
690072
def _checkType(self, obj, identifier):
        """"""
        if not isinstance(obj, basestring):
            raise TypeError("expected %s '%s' to be a string (was '%s')" %
                            (identifier, obj, type(obj).__name__))
1065373
private String classForType(Type type) {

        switch (type) {
            case ERROR:
                return I_CmsLayoutBundle.INSTANCE.notificationCss().notificationError();
            case NORMAL:
                return I_CmsLayoutBundle.INSTANCE.notificationCss().notificationNormal();
            case WARNING:
                return I_CmsLayoutBundle.INSTANCE.notificationCss().notificationWarning();
            default:
                return I_CmsLayoutBundle.INSTANCE.notificationCss().notificationNormal();
        }
    }
461264
function getTypeClass(type) {
  switch (type) {
    case String:
      return types.String;
    case Number:
      return types.Number;
    case Date:
      return types.Date;
    case Boolean:
      return types.Boolean;
    case Buffer:
      return types.Buffer;
  }

  if (typeof type === 'string') return types[type];

  for (const ii in types) {
    if (types[ii] === type) return types[ii];
  }
  return null;
}
255531
function cachedTypeDetector(type) {
	if (!cache.has(type)) {
		cache.set(type, (input) => isType(type, input) || typeInAncestry(type, input));
	}

	return cache.get(type);
}
374849
def get_plugin_class(self, plugin_type, plugin_name):
        """"""
        plugin = self._get_plugin_type(plugin_type)
        return plugin.get_plugin_class(plugin_name)
1293660
def _get_css_class(self, ttype):
        """"""
        ttypeclass = _get_ttype_class(ttype)
        if ttypeclass:
            return self.classprefix + ttypeclass
        return ''
507594
def class_name(self):
    """"""
    if not self._registry_key and self._registry:
      self._GetKeyFromRegistry()

    if not self._registry_key:
      return None

    return self._registry_key.class_name
640848
def match_classes(self, el, classes):
        """"""

        current_classes = self.get_classes(el)
        found = True
        for c in classes:
            if c not in current_classes:
                found = False
                break
        return found
371326
def is_classmethod(fn):
    """"""
    # This is True for bound methods
    if not inspect.ismethod(fn):
        return False
    if not hasattr(fn, "__self__"):
        return False
    im_self = fn.__self__
    # This is None for instance methods on classes, but True
    # for instance methods on instances.
    if im_self is None:
        return False
    # This is True for class methods of new- and old-style classes, respectively
    return isinstance(im_self, six.class_types)
698385
def find_type(cls, val):
        
        mt = ""
        index = val.rfind(".")
        if index == -1:
            val = "fake.{}".format(val)
        elif index == 0:
            val = "fake{}".format(val)

        mt = mimetypes.guess_type(val)[0]
        if mt is None:
            mt = ""

        return mt
429287
def typechecked_class(cls, force = False, force_recursive = False):
    
    return _typechecked_class(cls, set(), force, force_recursive)
632518
def class_for_type(self, object_type):
        
        if object_type not in self.class_mapping:
            raise ZenpyException("Unknown object_type: " + str(object_type))
        else:
            return self.class_mapping[object_type]
1005597
function detect_class_members_from_object(cls, ast) {
  cls["members"] = []
  return each_pair_in_object_expression(ast, function(key, value, pair) {
    detect_method_or_property(cls, key, value, pair);
  });
}
851595
def type(self):
        ""
        if self._type is None and len(self):
            self._type = self.values()[0].__class__
        return self._type
1051975
def _get_type(cls, ptr):
        """"""

        # fall back to the base class if unknown
        return cls.__types.get(lib.g_base_info_get_type(ptr), cls)
434470
public static boolean isListClass(Class<?> type) {
        if (type.isPrimitive() || type.isEnum()) {
            return false;
        }
        return type.equals(List.class);
    }