@Override public String makeLongString() { return cls.getFullName(); } }
@Override public String toString() { return getFullName(); } }
public String getFullName() { return cls.getFullName(); }
@Override public String getFullName() { return parent.getFullName() + "." + getName(); }
/** * Get all classes that are not excluded by the excluded packages settings */ public List<JavaClass> getIncludedClasses() { List<JavaClass> classList = decompiler.getClasses(); String excludedPackages = settings.getExcludedPackages().trim(); if (excludedPackages.length() == 0) { return classList; } String[] excluded = excludedPackages.split("[ ]+"); return classList.stream().filter(cls -> { for (String exclude : excluded) { if (cls.getFullName().startsWith(exclude)) { return false; } } return true; }).collect(Collectors.toList()); }
@Override public String makeLongString() { String name = mth.getDeclaringClass().getFullName() + "." + makeBaseString(); return Utils.typeFormat(name, getReturnType()); }
private void appendSourcesSave(ExecutorService executor, File outDir) { for (JavaClass cls : getClasses()) { if (cls.getClassNode().contains(AFlag.DONT_GENERATE)) { continue; } executor.execute(() -> { try { cls.decompile(); SaveCode.save(outDir, args, cls.getClassNode()); } catch (Exception e) { LOG.error("Error saving class: {}", cls.getFullName(), e); } }); } }
@Override public void run() { try { index.indexNames(cls); CodeLinesInfo linesInfo = new CodeLinesInfo(cls); List<StringRef> lines = splitLines(cls); usageInfo.processClass(cls, linesInfo, lines); if (Utils.isFreeMemoryAvailable()) { index.indexCode(cls, linesInfo, lines); } else { index.classCodeIndexSkipped(cls); } } catch (Exception e) { LOG.error("Index error in class: {}", cls.getFullName(), e); } } });
public void indexNames(JavaClass cls) { clsNamesIndex.put(cls.getFullName(), nodeCache.makeFrom(cls)); for (JavaMethod mth : cls.getMethods()) { mthNamesIndex.put(mth.getFullName(), nodeCache.makeFrom(mth)); } for (JavaField fld : cls.getFields()) { fldNamesIndex.put(fld.getFullName(), nodeCache.makeFrom(fld)); } for (JavaClass innerCls : cls.getInnerClasses()) { indexNames(innerCls); } }