Search in sources :

Example 1 with ICodeCache

use of jadx.api.ICodeCache in project jadx by skylot.

the class ClassNode method getCodeFromCache.

@Nullable
public ICodeInfo getCodeFromCache() {
    ICodeCache codeCache = root().getCodeCache();
    String clsRawName = getRawName();
    ICodeInfo codeInfo = codeCache.get(clsRawName);
    if (codeInfo == ICodeInfo.EMPTY) {
        return null;
    }
    return codeInfo;
}
Also used : ICodeInfo(jadx.api.ICodeInfo) ICodeCache(jadx.api.ICodeCache) Nullable(org.jetbrains.annotations.Nullable)

Example 2 with ICodeCache

use of jadx.api.ICodeCache in project jadx by skylot.

the class ClassNode method decompile.

private synchronized ICodeInfo decompile(boolean searchInCache) {
    if (isInner()) {
        return ICodeInfo.EMPTY;
    }
    ICodeCache codeCache = root().getCodeCache();
    String clsRawName = getRawName();
    if (searchInCache) {
        ICodeInfo code = codeCache.get(clsRawName);
        if (code != null && code != ICodeInfo.EMPTY) {
            return code;
        }
    }
    ICodeInfo codeInfo = ProcessClass.generateCode(this);
    codeCache.add(clsRawName, codeInfo);
    return codeInfo;
}
Also used : ICodeInfo(jadx.api.ICodeInfo) ICodeCache(jadx.api.ICodeCache)

Example 3 with ICodeCache

use of jadx.api.ICodeCache in project jadx by skylot.

the class ClassNode method unloadFromCache.

private void unloadFromCache() {
    if (isInner()) {
        return;
    }
    ICodeCache codeCache = root().getCodeCache();
    codeCache.remove(getRawName());
}
Also used : ICodeCache(jadx.api.ICodeCache)

Aggregations

ICodeCache (jadx.api.ICodeCache)3 ICodeInfo (jadx.api.ICodeInfo)2 Nullable (org.jetbrains.annotations.Nullable)1