Search in sources :

Example 1 with TypeImmutableArg

use of jadx.core.dex.instructions.args.TypeImmutableArg in project jadx by skylot.

the class MethodNode method initArguments.

private void initArguments(List<ArgType> args) {
    int pos;
    if (noCode) {
        pos = 1;
    } else {
        pos = regsCount;
        for (ArgType arg : args) {
            pos -= arg.getRegCount();
        }
    }
    if (accFlags.isStatic()) {
        thisArg = null;
    } else {
        TypeImmutableArg arg = InsnArg.typeImmutableReg(pos - 1, parentClass.getClassInfo().getType());
        arg.markAsThis();
        thisArg = arg;
    }
    if (args.isEmpty()) {
        argsList = Collections.emptyList();
        return;
    }
    argsList = new ArrayList<RegisterArg>(args.size());
    for (ArgType arg : args) {
        argsList.add(InsnArg.typeImmutableReg(pos, arg));
        pos += arg.getRegCount();
    }
}
Also used : ArgType(jadx.core.dex.instructions.args.ArgType) RegisterArg(jadx.core.dex.instructions.args.RegisterArg) TypeImmutableArg(jadx.core.dex.instructions.args.TypeImmutableArg)

Aggregations

ArgType (jadx.core.dex.instructions.args.ArgType)1 RegisterArg (jadx.core.dex.instructions.args.RegisterArg)1 TypeImmutableArg (jadx.core.dex.instructions.args.TypeImmutableArg)1