Search in sources :

Example 21 with ClassInfo

use of jadx.core.dex.info.ClassInfo in project jadx by skylot.

the class Deobfuscator method processClass.

private void processClass(DexNode dex, ClassNode cls) {
    ClassInfo clsInfo = cls.getClassInfo();
    String fullName = getClassFullName(clsInfo);
    if (!fullName.equals(clsInfo.getFullName())) {
        clsInfo.rename(dex, fullName);
    }
    for (FieldNode field : cls.getFields()) {
        FieldInfo fieldInfo = field.getFieldInfo();
        String alias = getFieldAlias(field);
        if (alias != null) {
            fieldInfo.setAlias(alias);
        }
    }
    for (MethodNode mth : cls.getMethods()) {
        MethodInfo methodInfo = mth.getMethodInfo();
        String alias = getMethodAlias(mth);
        if (alias != null) {
            methodInfo.setAlias(alias);
        }
        if (mth.isVirtual()) {
            resolveOverriding(dex, cls, mth);
        }
    }
}
Also used : FieldNode(jadx.core.dex.nodes.FieldNode) MethodNode(jadx.core.dex.nodes.MethodNode) MethodInfo(jadx.core.dex.info.MethodInfo) FieldInfo(jadx.core.dex.info.FieldInfo) ClassInfo(jadx.core.dex.info.ClassInfo)

Aggregations

ClassInfo (jadx.core.dex.info.ClassInfo)21 ClassNode (jadx.core.dex.nodes.ClassNode)6 FieldNode (jadx.core.dex.nodes.FieldNode)5 MethodNode (jadx.core.dex.nodes.MethodNode)5 MethodInfo (jadx.core.dex.info.MethodInfo)4 ArrayList (java.util.ArrayList)4 FieldReplaceAttr (jadx.core.dex.attributes.nodes.FieldReplaceAttr)2 FieldInfo (jadx.core.dex.info.FieldInfo)2 InsnArg (jadx.core.dex.instructions.args.InsnArg)2 HashSet (java.util.HashSet)2 CatchHandler (com.android.dex.Code.CatchHandler)1 Try (com.android.dex.Code.Try)1 EnumClassAttr (jadx.core.dex.attributes.nodes.EnumClassAttr)1 EnumField (jadx.core.dex.attributes.nodes.EnumClassAttr.EnumField)1 SourceFileAttr (jadx.core.dex.attributes.nodes.SourceFileAttr)1 ConstClassNode (jadx.core.dex.instructions.ConstClassNode)1 IndexInsnNode (jadx.core.dex.instructions.IndexInsnNode)1 InvokeType (jadx.core.dex.instructions.InvokeType)1 ArgType (jadx.core.dex.instructions.args.ArgType)1 RegisterArg (jadx.core.dex.instructions.args.RegisterArg)1