boolean (@NotNull String className, @NotNull String packageName) { if (!className.startsWith(packageName)) return false; if (className.length() == packageName.length()) return false; if (!packageName.isEmpty() && className.charAt(packageName.length()) != '.') return false; return className.indexOf('.', packageName.length() + 1) < 0; }