Checks if one class is assignable from at least one of the others.

@param main the canonical name of class to check.
@param classes the other classes.
@return true if at least one of the other classes match.
165006
private boolean isAtLeastOneAssignable( String main, Class< ? >... classes ) {
        for( Class< ? > clazz : classes ) {
            if (clazz.getCanonicalName().equals(main)) {
                return true;
            }
        }
        return false;
    }
735325
private boolean hasInterface(Class c, String targetClassName)
   {
      for (Class face : c.getInterfaces())
      {
         if (face.getName().equals(targetClassName))
         {
            return true;
         }
         else
         {
            for (Class face2 : face.getInterfaces())
            {
               if (face2.getName().equals(targetClassName))
               {
                  return true;
               }
               else if (hasInterface(face2, targetClassName))
               {
                  return true;
               }
            }
         }
      }
      if (null != c.getSuperclass())
      {
         return hasInterface(c.getSuperclass(), targetClassName);
      }
      return false;
   }
1243906
public boolean hasClass(String className) {
        final String classAttr = attributes().getIgnoreCase("class");
        final int len = classAttr.length();
        final int wantLen = className.length();

        if (len == 0 || len < wantLen) {
            return false;
        }

        // if both lengths are equal, only need compare the className with the attribute
        if (len == wantLen) {
            return className.equalsIgnoreCase(classAttr);
        }

        // otherwise, scan for whitespace and compare regions (with no string or arraylist allocations)
        boolean inClass = false;
        int start = 0;
        for (int i = 0; i < len; i++) {
            if (Character.isWhitespace(classAttr.charAt(i))) {
                if (inClass) {
                    // white space ends a class name, compare it with the requested one, ignore case
                    if (i - start == wantLen && classAttr.regionMatches(true, start, className, 0, wantLen)) {
                        return true;
                    }
                    inClass = false;
                }
            } else {
                if (!inClass) {
                    // we're in a class name : keep the start of the substring
                    inClass = true;
                    start = i;
                }
            }
        }

        // check the last entry
        if (inClass && len - start == wantLen) {
            return classAttr.regionMatches(true, start, className, 0, wantLen);
        }

        return false;
    }
301030
public ScanningModuleBuilder excludeClasses(Set<Class<?>> classes) {
        final Set<Class<?>> toTest = new HashSet<>(classes);
        return excludeClassesWhen(cls -> toTest.contains(cls));
    }
1335628
def has_public_assign(class_):
    """"""
    class_ = class_traits.get_declaration(class_)
    decls = class_.member_operators(
        lambda o: o.symbol == '=' and o.access_type == 'public',
        recursive=False,
        allow_empty=True)
    return bool(decls)
982250
private boolean isJavaSystemClassName(String className) {
        if (className == null) {
            return false;
        }

        if (className.startsWith("java/") || className.startsWith("javax/")) {
            return true;
        }
        return false;
    }
1060065
private static boolean checkAnnoExist(Object targetClass, Class<?> annoClass) {
		Annotation[] anno = getAnnotations(targetClass);
		for (Annotation annotation : anno) {
			Class<? extends Annotation> type = annotation.annotationType();
			if (annoClass.equals(type))
				return true;
		}
		return false;
	}
677904
static boolean isIn(TypeName value, Class<?>... classes) {
		for (Class<?> item : classes) {
			if (value.toString().equals(TypeName.get(item).toString())) {
				return true;
			}
		}

		return false;
	}
594055
protected boolean isMain(Thread thread) {
		return thread.getName().equals("main") && thread.getContextClassLoader()
				.getClass().getName().contains("AppClassLoader");
	}
1200162
private boolean isAssociatedClass(@DottedClassName String calledClass) {
        if (calledClass.equals(parentClassName)) {
            return true;
        }

        if (calledClass.length() <= clsName.length()) {
            return false;
        }
        int innerMarkPos = calledClass.indexOf('$', clsName.length());
        if (innerMarkPos < 0) {
            innerMarkPos = calledClass.indexOf('.', clsName.length());
            if (innerMarkPos < 0) {
                return false;
            }
        }

        String topClass = calledClass.substring(0, innerMarkPos);
        return topClass.equals(clsName) || calledClass.substring(innerMarkPos + 1).startsWith("access");
    }
115915
public void throwIn(@SuppressWarnings("unchecked") Class<? extends Throwable>... classes) {
                for (Class<? extends Throwable> cls : classes) {
                        if (cls.isInstance(super.getCause())) {
                                throw this;
                        }
                }
        }
966867
public static boolean hasMethod(Class<?> targetClass, String methodName, Class... parameterTypes) {
        try {
            targetClass.getMethod(methodName, parameterTypes);
            return true;
        } catch (NoSuchMethodException e) {
            return false;
        }
    }
972235
boolean processSelf(Collection<String> classes) throws IOException {
        options.add("--add-modules");
        options.add("java.se.ee,jdk.xml.bind"); // TODO why jdk.xml.bind?

        if (classes.isEmpty()) {
            Path modules = FileSystems.getFileSystem(URI.create("jrt:/"))
                                      .getPath("/modules");

            // names are /modules/<modulename>/pkg/.../Classname.class
            try (Stream<Path> paths = Files.walk(modules)) {
                Stream<String> files =
                    paths.filter(p -> p.getNameCount() > 2)
                         .map(p -> p.subpath(1, p.getNameCount()))
                         .map(Path::toString);
                return doModularFileNames(files);
            }
        } else {
            return doClassNames(classes);
        }
    }
1286065
public static boolean isAssignableFrom(Class<?> dest, Class<?> src)
   {
      if (dest == null || src == null)
         throw MESSAGES.cannotCheckClassIsAssignableFrom(dest, src);

      boolean isAssignable = dest.isAssignableFrom(src);
      if (isAssignable == false && dest.getName().equals(src.getName()))
      {
         ClassLoader destLoader = dest.getClassLoader();
         ClassLoader srcLoader = src.getClassLoader();
         if (ROOT_LOGGER.isTraceEnabled()) ROOT_LOGGER.notAssignableDueToConflictingClassLoaders(dest, src, destLoader, srcLoader);
      }

      if (isAssignable == false && isPrimitive(dest))
      {
         dest = getWrapperType(dest);
         isAssignable = dest.isAssignableFrom(src);
      }
      if (isAssignable == false && isPrimitive(src))
      {
         src = getWrapperType(src);
         isAssignable = dest.isAssignableFrom(src);
      }
      return isAssignable;
   }
434470
public static boolean isListClass(Class<?> type) {
        if (type.isPrimitive() || type.isEnum()) {
            return false;
        }
        return type.equals(List.class);
    }
1005686
public static boolean isClassAvailable(String s)
    {
        final ClassLoader classLoader = Thread.currentThread().getContextClassLoader();

        try
        {
            classLoader.loadClass(s);
            return true;
        }
        catch (ClassNotFoundException e)
        {
            return false;
        }
    }
915786
public static boolean isAssignableTo(String classInternalName, Class<?> type) {
        checkArgNotNull(classInternalName, "classInternalName");
        checkArgNotNull(type, "type");
        return type.isAssignableFrom(getClassForInternalName(classInternalName));
    }