Package jadx.core.dex.visitors
Class ConstructorVisitor
java.lang.Object
jadx.core.dex.visitors.AbstractVisitor
jadx.core.dex.visitors.ConstructorVisitor
- All Implemented Interfaces:
IDexTreeVisitor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static booleanallArgsNull(ConstructorInsn insn) private static booleanprivate static RegisterArginsertPhiInsn(MethodNode mth, BlockNode curBlock, RegisterArg instArg, ConstructorInsn otherCtr) private static @Nullable ConstructorInsnprocessConstructor(MethodNode mth, ConstructorInsn co) Replace call of synthetic constructor with all 'null' args to a non-synthetic or default constructor if possible.private static booleanprocessInvoke(MethodNode mth, BlockNode block, int indexInBlock, InsnRemover remover) private static InsnNoderemoveAssignChain(MethodNode mth, InsnNode insn, InsnRemover remover, InsnType insnType) Remove instructions on 'move' chain until instruction with type 'insnType'private static booleanreplaceInvoke(MethodNode mth) private static @Nullable ArgTypevoidvisit(MethodNode mth) Visit methodMethods inherited from class jadx.core.dex.visitors.AbstractVisitor
getName, init, toString, visit
-
Constructor Details
-
ConstructorVisitor
public ConstructorVisitor()
-
-
Method Details
-
visit
Description copied from interface:IDexTreeVisitorVisit method- Specified by:
visitin interfaceIDexTreeVisitor- Overrides:
visitin classAbstractVisitor
-
replaceInvoke
-
processInvoke
private static boolean processInvoke(MethodNode mth, BlockNode block, int indexInBlock, InsnRemover remover) -
searchInstanceType
-
insertPhiInsn
private static RegisterArg insertPhiInsn(MethodNode mth, BlockNode curBlock, RegisterArg instArg, ConstructorInsn otherCtr) -
canRemoveConstructor
-
processConstructor
@Nullable private static @Nullable ConstructorInsn processConstructor(MethodNode mth, ConstructorInsn co) Replace call of synthetic constructor with all 'null' args to a non-synthetic or default constructor if possible.- Returns:
- insn for replacement or null if replace not needed or not possible.
-
allArgsNull
-
removeAssignChain
private static InsnNode removeAssignChain(MethodNode mth, InsnNode insn, InsnRemover remover, InsnType insnType) Remove instructions on 'move' chain until instruction with type 'insnType'
-