boolean (final String baseClassName, final Class clazz) { try { final ClassLoader loader = clazz.getClassLoader(); if (loader != null) { final Class<?> baseClass = loader.loadClass(baseClassName); return baseClass.isAssignableFrom(clazz); } } catch (ClassNotFoundException ignored) { } return false; }