Check whether a class (or some classes) are in the inheritance chain of a given class
@function
@param {Class} x - The class to test
@param type - Either a {@link Class} or an array of classes tha should be in the class x.
325930
function hasClass(x, type) {
  const types = _.isArray(type) ? type : [type]
  return _.some(x.conformsTo().getInheritanceChain(), c => _.includes(types, c))
}
68378
function isInternalComponentType(type) {
  return (
    typeof type === 'function' &&
    typeof type.prototype !== 'undefined' &&
    typeof type.prototype.mountComponent === 'function' &&
    typeof type.prototype.receiveComponent === 'function'
  );
}
830789
private static boolean checkCollectionMembers(Collection<?> c, Class<?> type) {
        for (Object element : c) {
            if (element != null && !type.isInstance(element)) {
                return false;
            }
        }
        return true;
    }
583178
function(type, checks) {
		var result = false;
		var list = this._trackedtypes[type];
		if (list) {
			var index = this._checksindex(list, checks);
			if (index > -1) {
				result = true;
				// TODO: this seems to not run when checks is none (undefined)!
				if (gui.Array.remove(list, index) === 0) {
					delete this._trackedtypes[type];
				}
			}
		}
		return result;
	}
933326
public boolean hasAncestorOfType( Set<Type> types ) {
        PlanNode node = this.parent;
        while (node != null) {
            if (types.contains(node.getType())) return true;
            node = node.getParent();
        }
        return false;
    }
467637
function(cls,superClass) {
    var super_;
    while (lib.type.isFunction(cls.super_)) {
      if (cls.super_ === superClass) {
        super_ = cls.super_;
        break;
      }
      cls = cls.super_;
    }
    return super_;
  }
299988
public final static boolean isClassType(final Type type) {
        if (type instanceof Class) return true;
        if (type instanceof WildcardType) return false;
        if (type instanceof TypeVariable) return false;
        if (type instanceof GenericArrayType) return isClassType(((GenericArrayType) type).getGenericComponentType());
        if (!(type instanceof ParameterizedType)) return false; //只能是null了
        final ParameterizedType ptype = (ParameterizedType) type;
        if (ptype.getOwnerType() != null && !isClassType(ptype.getOwnerType())) return false;
        if (!isClassType(ptype.getRawType())) return false;
        for (Type t : ptype.getActualTypeArguments()) {
            if (!isClassType(t)) return false;
        }
        return true;
    }
831262
function checkType(value, type) {
  if (typeof type === 'string') {
    switch (type) {
      case 'string':
      case 'object':
      case 'number':
      case 'boolean':
      case 'function':
        return typeof value === type;
      case 'class':
        return typeof value === 'function';
      case 'array':
        return value.constructor === Array;
      default:
        return false;
    }
  }
  else {
    return value instanceof type;
  }
}
226217
function isClass(clazz) {
    return isFunction(clazz) && (clazz.prototype && clazz === clazz.prototype.constructor);
  }
915786
public static boolean isAssignableTo(String classInternalName, Class<?> type) {
        checkArgNotNull(classInternalName, "classInternalName");
        checkArgNotNull(type, "type");
        return type.isAssignableFrom(getClassForInternalName(classInternalName));
    }
913456
private function isType($type) {

    	if(false === is_string($type)) {
			return false;
		}

		$class = $this -> getTypeClass($type);

		return true === class_exists($class);
    }
1019630
public static boolean isSingleValueType(Class<?> type) {

        LettuceAssert.notNull(type, "Class must not be null!");

        return findDescriptor(type).map((descriptor) -> !descriptor.isMultiValue() && !descriptor.isNoValue()).orElse(false);
    }
33954
protected boolean shouldExcludeType(Class<?> type) {
        for (Class<?> t : excludedFieldTypes) {
            if (t.isAssignableFrom(type)) {
                return true;
            }
        }
        return false;
    }
683772
public static boolean isInstaneOf(Class src, Class trg) {
	if (src.isArray() && trg.isArray()) {
	    return isInstaneOf(src.getComponentType(), trg.getComponentType());
	}

	if (src == trg) return true;

	// Interface
	if (trg.isInterface()) {
	    return _checkInterfaces(src, trg);
	}
	// Extends

	while (src != null) {
	    if (src == trg) return true;
	    src = src.getSuperclass();
	}
	return trg == Object.class;
    }
793720
@Check
	@Override
	public void checkDefaultSuperConstructor(XtendClass xtendClass) {
		checkSuperConstructor(
				xtendClass,
				XTEND_TYPE_DECLARATION__NAME,
				doGetConstructorParameterTypes(Object.class, xtendClass));
	}
325128
def is_type(x, types, full=False):
    
    types = types if isinstance(types, tuple) else (types,)
    ins = isinstance(x, types)
    sub = False
    try:
        sub = issubclass(x, types)
    except Exception:
        pass
    res = ins or sub
    return res if not full else (res, ins)
995548
function(o) {
		return gui.Type.isConstructor(o) &&
			gui.Class.ancestorsAndSelf(o).indexOf(edb.Array) > -1;
	}