Package jadx.core.dex.visitors
Class MethodInvokeVisitor
java.lang.Object
jadx.core.dex.visitors.AbstractVisitor
jadx.core.dex.visitors.MethodInvokeVisitor
- All Implemented Interfaces:
IDexTreeVisitor
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidapplyArgsCast(BaseInvokeNode invokeInsn, int argsOffset, List<ArgType> compilerVarTypes, List<ArgType> castTypes) collectCompilerVarTypes(BaseInvokeNode insn, int argOffset) expandTypes(MethodNode parentMth, IMethodDetails methodDetails, List<ArgType> castTypes) Use generified types if availableprivate List<IMethodDetails> filterApplicableMethods(List<IMethodDetails> methods, List<ArgType> types, Function<TypeCompareEnum, Boolean> acceptFunction) private ArgTypegetCallClassFromInvoke(MethodNode parentMth, BaseInvokeNode invokeInsn, MethodInfo callMth) private ArgTypegetClsCallType(BaseInvokeNode invokeInsn, ArgType declClsType) private ArgTypeReturn type as seen by compilerprivate static ArgTypegetInsnCompilerType(InsnArg arg, InsnNode insn) getTypeVarsMapping(BaseInvokeNode invokeInsn) voidCalled after loading dex tree, but before visitor traversal.private booleanisMethodAcceptable(IMethodDetails methodDetails, List<ArgType> types, Function<TypeCompareEnum, Boolean> acceptFunction) private booleanisOverloadResolved(IMethodDetails expectedMthDetails, List<IMethodDetails> overloadedMethods, List<ArgType> castTypes) private static booleanisStrictTypes(TypeCompareEnum result) private static booleanisTypeApplicable(TypeCompareEnum result) private voidprocessInvoke(MethodNode parentMth, BaseInvokeNode invokeInsn) private voidprocessOverloaded(MethodNode parentMth, BaseInvokeNode invokeInsn, IMethodDetails mthDetails) private voidprocessUnknown(BaseInvokeNode invokeInsn) Method details not found => add cast for 'null' argsprivate booleanreplaceUnknownTypes(List<ArgType> castTypes, List<ArgType> mthArgTypes) private IMethodDetailsresolveTypeVars(IMethodDetails mthDetails, Map<ArgType, ArgType> typeVarsMapping) searchCastTypes(MethodNode parentMth, IMethodDetails mthDetails, List<IMethodDetails> overloadedMethods, List<ArgType> compilerVarTypes) voidvisit(MethodNode mth) Visit methodMethods inherited from class jadx.core.dex.visitors.AbstractVisitor
getName, toString, visit
-
Field Details
-
LOG
private static final org.slf4j.Logger LOG -
root
-
-
Constructor Details
-
MethodInvokeVisitor
public MethodInvokeVisitor()
-
-
Method Details
-
init
Description copied from interface:IDexTreeVisitorCalled after loading dex tree, but before visitor traversal.- Specified by:
initin interfaceIDexTreeVisitor- Overrides:
initin classAbstractVisitor
-
visit
Description copied from interface:IDexTreeVisitorVisit method- Specified by:
visitin interfaceIDexTreeVisitor- Overrides:
visitin classAbstractVisitor
-
processInvoke
-
processOverloaded
private void processOverloaded(MethodNode parentMth, BaseInvokeNode invokeInsn, IMethodDetails mthDetails) -
processUnknown
Method details not found => add cast for 'null' args -
getCallClassFromInvoke
private ArgType getCallClassFromInvoke(MethodNode parentMth, BaseInvokeNode invokeInsn, MethodInfo callMth) -
getTypeVarsMapping
-
getClsCallType
-
applyArgsCast
private void applyArgsCast(BaseInvokeNode invokeInsn, int argsOffset, List<ArgType> compilerVarTypes, List<ArgType> castTypes) -
resolveTypeVars
private IMethodDetails resolveTypeVars(IMethodDetails mthDetails, Map<ArgType, ArgType> typeVarsMapping) -
searchCastTypes
private List<ArgType> searchCastTypes(MethodNode parentMth, IMethodDetails mthDetails, List<IMethodDetails> overloadedMethods, List<ArgType> compilerVarTypes) -
replaceUnknownTypes
-
expandTypes
private List<ArgType> expandTypes(MethodNode parentMth, IMethodDetails methodDetails, List<ArgType> castTypes) Use generified types if available -
isOverloadResolved
private boolean isOverloadResolved(IMethodDetails expectedMthDetails, List<IMethodDetails> overloadedMethods, List<ArgType> castTypes) -
isStrictTypes
-
isTypeApplicable
-
filterApplicableMethods
private List<IMethodDetails> filterApplicableMethods(List<IMethodDetails> methods, List<ArgType> types, Function<TypeCompareEnum, Boolean> acceptFunction) -
isMethodAcceptable
private boolean isMethodAcceptable(IMethodDetails methodDetails, List<ArgType> types, Function<TypeCompareEnum, Boolean> acceptFunction) -
collectCompilerVarTypes
-
getCompilerVarType
Return type as seen by compiler -
getInsnCompilerType
-