Returns true if the class is assignable from the argument.
7948
public boolean isAssignableFrom(Class cl)
  {
    if (getName().equals(cl.getName()))
      return true;

    Class []ifc = cl.getInterfaces();

    for (int i = 0; i < ifc.length; i++) {
      if (isAssignableFrom(ifc[i]))
        return true;
    }

    if (cl.getSuperclass() != null)
      return isAssignableFrom(cl.getSuperclass());
    else
      return false;
  }
916732
private static boolean isOverridable(Method method, Class<?> targetClass) {
        if (Modifier.isPrivate(method.getModifiers())) {
            return false;
        }
        if (Modifier.isPublic(method.getModifiers()) || Modifier.isProtected(method.getModifiers())) {
            return true;
        }
        return (targetClass == null ||
                getPackageName(method.getDeclaringClass()).equals(getPackageName(targetClass)));
    }
740457
def looks_like_issubclass(obj, classname):
    
    t = obj
    if t.__name__ == classname:
        return True
    for klass in t.__mro__:
        if klass.__name__ == classname:
            return True
    return False
396650
def is_class(data):
    

    try:
        with unpack(data) as up:
            magic = up.unpack_struct(_BBBB)

        return magic == JAVA_CLASS_MAGIC

    except UnpackException:
        return False
34020
def _is_reference(arg):
    '''
    
    '''
    return isinstance(arg, dict) and len(arg) == 1 and isinstance(next(six.itervalues(arg)), six.string_types)
694971
public boolean canPersist(Class<?> cls) {
		Object mapper = OBJECT_MAPPERS.get(cls);
		if (mapper == null) {
			// The only way the mapper wouldn't already be loaded into
			// OBJECT_MAPPERS is if it was compiled separately, but let's handle
			// it anyway
			String beanClassName = cls.getName();
			String mapperClassName = cls.getName() + KriptonBinder.MAPPER_CLASS_SUFFIX;
			try {
				Class<?> mapperClass = (Class<?>) Class.forName(mapperClassName);
				mapper = mapperClass.newInstance();
				// mapper.

				return true;
			} catch (ClassNotFoundException e) {
				e.printStackTrace();
				throw new KriptonRuntimeException(String.format("Class '%s' does not exist. Does '%s' have @BindType annotation?", mapperClassName, beanClassName));
			} catch (InstantiationException e) {
				e.printStackTrace();
			} catch (IllegalAccessException e) {
				e.printStackTrace();
			}
		}
		return false;

	}
564269
public boolean supported(Object element) {
      for (Class c : getSupportedClasses()) {
         if (c.isAssignableFrom(element.getClass())) {
            if (log.isLoggable(Level.FINE)) {
               log.fine(element.getClass().getName() + " will be styled, it is assignable from " + c.getName());
            }
            return true;
         }
      }
      return false;
   }
923802
private static boolean isCompatibleClasses(final Class<?> one, final Class<?> two) {
        return one.isAssignableFrom(two) || two.isAssignableFrom(one);
    }
1162825
def isinstance(self, class_or_string):
        
        if class_or_string is None:
            return False
        import inspect
        if inspect.isclass(class_or_string):
            return isinstance(self, class_or_string)
        else:
            return self.__class__.__name__.lower() == class_or_string.lower()
1005686
public static boolean isClassAvailable(String s)
    {
        final ClassLoader classLoader = Thread.currentThread().getContextClassLoader();

        try
        {
            classLoader.loadClass(s);
            return true;
        }
        catch (ClassNotFoundException e)
        {
            return false;
        }
    }
709927
static boolean isInstanceOfType(Object instance, Class<?> clazz) {
    if (clazz.isInterface()) {
      throw new UnsupportedOperationException(
          "Under GWT, we can't determine whether an object is an instance of an interface Class");
    }

    for (Class<?> current = instance.getClass();
        current != null;
        current = current.getSuperclass()) {
      if (current.equals(clazz)) {
        return true;
      }
    }
    return false;
  }
610701
public boolean canConvert(Class<?> fromClass, String syntax, Class<?> toClass) {
        Class<?> fixedToClass = toClass;
        if (toClass.isPrimitive()) {
            fixedToClass = primitiveTypeMap.get(toClass);
        }
        Class<?> fixedFromClass = fromClass;
        if (fromClass.isPrimitive()) {
            fixedFromClass = primitiveTypeMap.get(fromClass);
        }
        return fixedToClass.isAssignableFrom(fixedFromClass) ||
                (converters.get(makeConverterKey(fixedFromClass, syntax, fixedToClass)) != null) ||
                (converters.get(makeConverterKey(fixedFromClass, null, fixedToClass)) != null);
    }
205116
static boolean isSignatureAssignable( Class[] from, Class[] to, int round )
    {
        if ( round != JAVA_VARARGS_ASSIGNABLE && from.length != to.length )
            return false;

        switch ( round )
        {
            case JAVA_BASE_ASSIGNABLE:
                for( int i=0; i<from.length; i++ )
                    if ( !isJavaBaseAssignable( to[i], from[i] ) )
                        return false;
                return true;
            case JAVA_BOX_TYPES_ASSIGABLE:
                for( int i=0; i<from.length; i++ )
                    if ( !isJavaBoxTypesAssignable( to[i], from[i] ) )
                        return false;
                return true;
            case JAVA_VARARGS_ASSIGNABLE:
                return isSignatureVarargsAssignable( from, to );
            case BSH_ASSIGNABLE:
                for( int i=0; i<from.length; i++ )
                    if ( !isBshAssignable( to[i], from[i] ) )
                        return false;
                return true;
            default:
                throw new InterpreterError("bad case");
        }
    }
672436
public static boolean isBindable(Class<?> subClass) {
        return !subClass.isInterface() && !Modifier.isAbstract(
                subClass.getModifiers()) && subClass.getTypeParameters().length == 0;
    }
944374
def is_commentable(obj_or_class):
    
    if isinstance(obj_or_class, type):
        return issubclass(obj_or_class, Commentable)

    if not isinstance(obj_or_class, Commentable):
        return False

    if obj_or_class.id is None:
        return False

    return True
419806
def is_type(value):
        """"""
        if isinstance(value, type):
            return issubclass(value, Type)
        return isinstance(value, Type)
1325148
public static boolean isAssignableToOrFrom(Class<?> classToCheck, Class<?> anotherClass) {
    return classToCheck.isAssignableFrom(anotherClass)
        || anotherClass.isAssignableFrom(classToCheck);
  }