Search in sources :

Example 1 with StaticValuesParser

use of jadx.core.dex.nodes.parser.StaticValuesParser in project jadx by skylot.

the class ClassNode method loadStaticValues.

private void loadStaticValues(ClassDef cls, List<FieldNode> staticFields) throws DecodeException {
    for (FieldNode f : staticFields) {
        if (f.getAccessFlags().isFinal()) {
            f.addAttr(FieldInitAttr.NULL_VALUE);
        }
    }
    int offset = cls.getStaticValuesOffset();
    if (offset == 0) {
        return;
    }
    Dex.Section section = dex.openSection(offset);
    StaticValuesParser parser = new StaticValuesParser(dex, section);
    parser.processFields(staticFields);
    // process const fields
    root().getConstValues().processConstFields(this, staticFields);
}
Also used : Dex(com.android.dex.Dex) StaticValuesParser(jadx.core.dex.nodes.parser.StaticValuesParser)

Aggregations

Dex (com.android.dex.Dex)1 StaticValuesParser (jadx.core.dex.nodes.parser.StaticValuesParser)1