XLogUtils { public static Set<String> getRemainingClassNames(Set<Class<?>> classes, Set<String> classNames) { if (classes == null || classes.size() == 0 || classNames == null) { return classNames; } Set<String> nameFromClasses = new HashSet<String>(); for (Class clazz : classes) { try { if (clazz != null && clazz.getCanonicalName() != null) { nameFromClasses.add(clazz.getCanonicalName().replaceAll("\\$", ".")); } } catch (Throwable throwable) { } } nameFromClasses.retainAll(classNames); classNames.removeAll(nameFromClasses); return classNames; } private  XLogUtils(); static Set<String> getRemainingClassNames(Set<Class<?>> classes,
            Set<String> classNames); static boolean shouldLogMember(List<XLogMethod> xLogMethods, Member member); static boolean filterResult(String className, XLogSetting xLogSetting); static List<String> getPkgPrefixesForCoarseMatch(List<String> classNames,
            int pkgSectionSize); static List<String> getPkgPrefixesForCoarseMatchXLogMethods(List<XLogMethod> xLogMethods,
            int pkgSectionSize); static final int TYPE_METHOD; static final int TYPE_CONSTRUCTOR; static final String PKG_NAME; static final String CLASS_NAME; static final String FIELD_NAME_METHODS; static final String FIELD_NAME_CLASSES; }
@Test public void testGetRemainingClassNames() { Set<Class<?>> classes = new HashSet<Class<?>>(); classes.add(XLog.class); classes.add(MethodToLog.class); classes.add(Object.class); Set<String> expected = new HashSet<String>(); expected.add("com.promegu.other.class1"); expected.add("com.promegu.other.class2"); expected.add("java.lang.test.Object"); expected.add("retrofit"); expected.add("retrofit.utils"); assertThat( XLogUtils.getRemainingClassNames(classes, new HashSet<String>(CLASS_NAMES)), is(expected)); }