public ClassNode getClassNodeFromFile(File file, String clsName) { JadxDecompiler d = new JadxDecompiler(getArgs()); try { d.loadFile(file); } catch (JadxException e) { e.printStackTrace(); fail(e.getMessage()); } RootNode root = JadxInternalAccess.getRoot(d); root.getResourcesNames().putAll(resMap); ClassNode cls = root.searchClassByName(clsName); assertThat("Class not found: " + clsName, cls, notNullValue()); assertThat(clsName, is(cls.getClassInfo().getFullName())); if (unloadCls) { decompile(d, cls); } else { decompileWithoutUnload(d, cls); } System.out.println("-----------------------------------------------------------"); System.out.println(cls.getCode()); System.out.println("-----------------------------------------------------------"); checkCode(cls); compile(cls); runAutoCheck(clsName); return cls; }