Class TypeUpdate
java.lang.Object
jadx.core.dex.visitors.typeinference.TypeUpdate
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final JadxArgsprivate final TypeCompareprivate final Map<InsnType, ITypeListener> private static final org.slf4j.Loggerprivate final RootNode -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate TypeUpdateResultallSameListener(TypeUpdateInfo updateInfo, InsnNode insn, InsnArg arg, ArgType candidateType) All args must have same typesapply(MethodNode mth, SSAVar ssaVar, ArgType candidateType) Perform type checking and type propagation for all related variablesprivate TypeUpdateResultapply(MethodNode mth, SSAVar ssaVar, ArgType candidateType, TypeUpdateFlags flags) applyDebugInfo(MethodNode mth, SSAVar ssaVar, ArgType candidateType) applyWithWiderAllow(MethodNode mth, SSAVar ssaVar, ArgType candidateType) Allow wider types for apply from debug info and some special casesapplyWithWiderIgnSame(MethodNode mth, SSAVar ssaVar, ArgType candidateType) Force type settingprivate TypeUpdateResultarithListener(TypeUpdateInfo updateInfo, InsnNode insn, InsnArg arg, ArgType candidateType) private TypeUpdateResultarrayGetListener(TypeUpdateInfo updateInfo, InsnNode insn, InsnArg arg, ArgType candidateType) private TypeUpdateResultarrayPutListener(TypeUpdateInfo updateInfo, InsnNode insn, InsnArg arg, ArgType candidateType) private booleancheckAssignForUnknown(ArgType boundType, ArgType candidateType) private booleancheckBound(ArgType candidateType, ITypeBound bound, ArgType boundType) private TypeUpdateResultcheckCastListener(TypeUpdateInfo updateInfo, InsnNode insn, InsnArg arg, ArgType candidateType) private TypeUpdateResultifListener(TypeUpdateInfo updateInfo, InsnNode insn, InsnArg arg, ArgType candidateType) private booleaninBounds(TypeUpdateInfo updateInfo, SSAVar ssaVar, Set<ITypeBound> bounds, ArgType candidateType) (package private) booleaninBounds(Set<ITypeBound> bounds, ArgType candidateType) private Map<InsnType, ITypeListener> private TypeUpdateResultinvokeListener(TypeUpdateInfo updateInfo, InsnNode insn, InsnArg arg, ArgType candidateType) private static booleanprivate booleanisInterfaces(ArgType firstType, ArgType secondType) private TypeUpdateResultmoveListener(TypeUpdateInfo updateInfo, InsnNode insn, InsnArg arg, ArgType candidateType) private static TypeUpdateResultprocessCallbacks(TypeUpdateInfo updateInfo, TypeUpdateResult result) @Nullable TypeUpdateResultqueueDirectTypeUpdate(TypeUpdateInfo updateInfo, InsnArg arg, ArgType candidateType, @Nullable ITypeUpdateCallback callback) @Nullable TypeUpdateResultqueueTypeUpdate(TypeUpdateInfo updateInfo, InsnArg arg, ArgType candidateType, @Nullable ITypeUpdateCallback callback) Queue type update for InsnArg.private TypeUpdateResultrequestUpdate(TypeUpdateInfo updateInfo, InsnArg arg, ArgType candidateType) private TypeUpdateResultrunUpdate(TypeUpdateInfo updateInfo) private TypeUpdateResultsameFirstArgListener(TypeUpdateInfo updateInfo, InsnNode insn, InsnArg arg, ArgType candidateType) private TypeUpdateResultsuggestAllSameListener(TypeUpdateInfo updateInfo, InsnNode insn, InsnArg arg, ArgType candidateType) Try to set candidate type to all args, don't fail on rejectprivate TypeUpdateResultupdateTypeForArg(TypeUpdateInfo updateInfo, InsnArg arg, ArgType candidateType) private TypeUpdateResultupdateTypeForSsaVar(TypeUpdateInfo updateInfo, SSAVar ssaVar, ArgType candidateType) private @Nullable TypeUpdateResultverifyType(TypeUpdateInfo updateInfo, InsnArg arg, ArgType candidateType)
-
Field Details
-
LOG
private static final org.slf4j.Logger LOG -
root
-
listenerRegistry
-
comparator
-
args
-
-
Constructor Details
-
TypeUpdate
-
-
Method Details
-
apply
Perform type checking and type propagation for all related variables -
applyWithWiderAllow
Allow wider types for apply from debug info and some special cases -
applyWithWiderIgnSame
Force type setting -
applyDebugInfo
-
apply
private TypeUpdateResult apply(MethodNode mth, SSAVar ssaVar, ArgType candidateType, TypeUpdateFlags flags) -
runUpdate
-
processCallbacks
private static TypeUpdateResult processCallbacks(TypeUpdateInfo updateInfo, TypeUpdateResult result) -
queueTypeUpdate
@Nullable public @Nullable TypeUpdateResult queueTypeUpdate(TypeUpdateInfo updateInfo, InsnArg arg, ArgType candidateType, @Nullable @Nullable ITypeUpdateCallback callback) Queue type update for InsnArg.- Parameters:
callback- - will be executed when result for this update is calculated, can be null - callback will pass result without change- Returns:
- null if update added into queue, non-null result if not queued (verify failed)
-
queueDirectTypeUpdate
@Nullable public @Nullable TypeUpdateResult queueDirectTypeUpdate(TypeUpdateInfo updateInfo, InsnArg arg, ArgType candidateType, @Nullable @Nullable ITypeUpdateCallback callback) -
updateTypeForArg
private TypeUpdateResult updateTypeForArg(TypeUpdateInfo updateInfo, InsnArg arg, ArgType candidateType) -
verifyType
@Nullable private @Nullable TypeUpdateResult verifyType(TypeUpdateInfo updateInfo, InsnArg arg, ArgType candidateType) -
updateTypeForSsaVar
private TypeUpdateResult updateTypeForSsaVar(TypeUpdateInfo updateInfo, SSAVar ssaVar, ArgType candidateType) -
requestUpdate
private TypeUpdateResult requestUpdate(TypeUpdateInfo updateInfo, InsnArg arg, ArgType candidateType) -
inBounds
-
inBounds
private boolean inBounds(TypeUpdateInfo updateInfo, SSAVar ssaVar, Set<ITypeBound> bounds, ArgType candidateType) -
checkBound
-
checkAssignForUnknown
-
initListenerRegistry
-
invokeListener
private TypeUpdateResult invokeListener(TypeUpdateInfo updateInfo, InsnNode insn, InsnArg arg, ArgType candidateType) -
sameFirstArgListener
private TypeUpdateResult sameFirstArgListener(TypeUpdateInfo updateInfo, InsnNode insn, InsnArg arg, ArgType candidateType) -
moveListener
private TypeUpdateResult moveListener(TypeUpdateInfo updateInfo, InsnNode insn, InsnArg arg, ArgType candidateType) -
allSameListener
private TypeUpdateResult allSameListener(TypeUpdateInfo updateInfo, InsnNode insn, InsnArg arg, ArgType candidateType) All args must have same types -
arithListener
private TypeUpdateResult arithListener(TypeUpdateInfo updateInfo, InsnNode insn, InsnArg arg, ArgType candidateType) -
suggestAllSameListener
private TypeUpdateResult suggestAllSameListener(TypeUpdateInfo updateInfo, InsnNode insn, InsnArg arg, ArgType candidateType) Try to set candidate type to all args, don't fail on reject -
checkCastListener
private TypeUpdateResult checkCastListener(TypeUpdateInfo updateInfo, InsnNode insn, InsnArg arg, ArgType candidateType) -
isInterfaces
-
arrayGetListener
private TypeUpdateResult arrayGetListener(TypeUpdateInfo updateInfo, InsnNode insn, InsnArg arg, ArgType candidateType) -
arrayPutListener
private TypeUpdateResult arrayPutListener(TypeUpdateInfo updateInfo, InsnNode insn, InsnArg arg, ArgType candidateType) -
ifListener
private TypeUpdateResult ifListener(TypeUpdateInfo updateInfo, InsnNode insn, InsnArg arg, ArgType candidateType) -
isAssign
-
getTypeCompare
-