fix: add methods and fields types into usage info (#729)

This commit is contained in:
Skylot
2020-05-27 20:55:32 +01:00
parent 7d29c5d766
commit e7b00cc76e
@@ -64,11 +64,16 @@ public class UsageInfo {
public void methodUse(MethodNode mth, MethodNode useMth) {
clsUse(mth, useMth.getParentClass());
mthUsage.add(useMth, mth);
// implicit usage
clsUse(mth, useMth.getReturnType());
useMth.getMethodInfo().getArgumentsTypes().forEach(argType -> clsUse(mth, argType));
}
public void fieldUse(MethodNode mth, FieldNode useFld) {
clsUse(mth, useFld.getParentClass());
fieldUsage.add(useFld, mth);
// implicit usage
clsUse(mth, useFld.getType());
}
private void processType(ArgType type, Consumer<ClassNode> consumer) {