Search in sources :

Example 1 with DeclareVariablesAttr

use of jadx.core.dex.attributes.nodes.DeclareVariablesAttr in project jadx by skylot.

the class ProcessVariables method declareVar.

private static void declareVar(IContainer region, RegisterArg arg) {
    DeclareVariablesAttr dv = region.get(AType.DECLARE_VARIABLES);
    if (dv == null) {
        dv = new DeclareVariablesAttr();
        region.addAttr(dv);
    }
    dv.addVar(arg);
}
Also used : DeclareVariablesAttr(jadx.core.dex.attributes.nodes.DeclareVariablesAttr)

Example 2 with DeclareVariablesAttr

use of jadx.core.dex.attributes.nodes.DeclareVariablesAttr in project jadx by skylot.

the class RegionGen method declareVars.

private void declareVars(CodeWriter code, IContainer cont) {
    DeclareVariablesAttr declVars = cont.get(AType.DECLARE_VARIABLES);
    if (declVars != null) {
        for (RegisterArg v : declVars.getVars()) {
            code.startLine();
            declareVar(code, v);
            code.add(';');
        }
    }
}
Also used : DeclareVariablesAttr(jadx.core.dex.attributes.nodes.DeclareVariablesAttr) RegisterArg(jadx.core.dex.instructions.args.RegisterArg)

Aggregations

DeclareVariablesAttr (jadx.core.dex.attributes.nodes.DeclareVariablesAttr)2 RegisterArg (jadx.core.dex.instructions.args.RegisterArg)1