use of jadx.core.dex.attributes.nodes.MethodOverrideAttr in project jadx by skylot.
the class Deobfuscator method applyMethodAlias.
private void applyMethodAlias(MethodNode mth, String alias) {
setSingleMethodAlias(mth, alias);
MethodOverrideAttr overrideAttr = mth.get(AType.METHOD_OVERRIDE);
if (overrideAttr != null) {
for (MethodNode ovrdMth : overrideAttr.getRelatedMthNodes()) {
if (ovrdMth != mth) {
setSingleMethodAlias(ovrdMth, alias);
}
}
}
}
use of jadx.core.dex.attributes.nodes.MethodOverrideAttr in project jadx by skylot.
the class OverrideMethodVisitor method processMth.
private void processMth(MethodNode mth, SuperTypesData superData) {
if (mth.isConstructor() || mth.getAccessFlags().isStatic() || mth.getAccessFlags().isPrivate()) {
return;
}
MethodOverrideAttr attr = processOverrideMethods(mth, superData);
if (attr != null) {
if (attr.getBaseMethods().isEmpty()) {
throw new JadxRuntimeException("No base methods for override attribute: " + attr.getOverrideList());
}
mth.addAttr(attr);
IMethodDetails baseMth = Utils.getOne(attr.getBaseMethods());
if (baseMth != null) {
boolean updated = fixMethodReturnType(mth, baseMth, superData);
updated |= fixMethodArgTypes(mth, baseMth, superData);
if (updated) {
// check if new signature cause method collisions
checkMethodSignatureCollisions(mth, mth.root().getArgs().isRenameValid());
}
}
}
}
Aggregations