mirror of
https://github.com/revanced/smali.git
synced 2025-06-13 04:27:38 +02:00
Rename MethodIdItem.getVirtualMethodString to getShortMethodString
This commit is contained in:
@ -1248,7 +1248,7 @@ public class ClassPath {
|
||||
if ((encodedMethod.accessFlags & AccessFlags.STATIC.getValue()) != 0) {
|
||||
staticMethods[i] = true;
|
||||
}
|
||||
directMethods[i] = encodedMethod.method.getVirtualMethodString();
|
||||
directMethods[i] = encodedMethod.method.getShortMethodString();
|
||||
}
|
||||
_staticMethods[0] = staticMethods;
|
||||
return directMethods;
|
||||
@ -1261,7 +1261,7 @@ public class ClassPath {
|
||||
if (encodedMethods.size() > 0) {
|
||||
String[] virtualMethods = new String[encodedMethods.size()];
|
||||
for (int i=0; i<encodedMethods.size(); i++) {
|
||||
virtualMethods[i] = encodedMethods.get(i).method.getVirtualMethodString();
|
||||
virtualMethods[i] = encodedMethods.get(i).method.getShortMethodString();
|
||||
}
|
||||
return virtualMethods;
|
||||
}
|
||||
|
@ -3141,7 +3141,7 @@ public class MethodAnalyzer {
|
||||
encodedMethod.method.getContainingClass().getTypeDescriptor()));
|
||||
}
|
||||
|
||||
if (!currentMethodClassDef.getSuperclass().hasVirtualMethod(methodIdItem.getVirtualMethodString())) {
|
||||
if (!currentMethodClassDef.getSuperclass().hasVirtualMethod(methodIdItem.getShortMethodString())) {
|
||||
throw new ValidationException(String.format("Cannot call method %s with %s. The superclass %s has" +
|
||||
"no such method", methodIdItem.getMethodString(),
|
||||
analyzedInstruction.instruction.opcode.name, methodClassDef.getSuperclass().getClassType()));
|
||||
|
@ -175,21 +175,21 @@ public class MethodIdItem extends Item<MethodIdItem> implements Convertible<Meth
|
||||
return cachedMethodString;
|
||||
}
|
||||
|
||||
private String cachedVirtualMethodString = null;
|
||||
private String cachedShortMethodString = null;
|
||||
/**
|
||||
* @return a string formatted like methodName(TTTT..)R
|
||||
*/
|
||||
public String getVirtualMethodString() {
|
||||
if (cachedVirtualMethodString == null) {
|
||||
public String getShortMethodString() {
|
||||
if (cachedShortMethodString == null) {
|
||||
String methodName = this.methodName.getStringValue();
|
||||
String prototypeString = methodPrototype.getPrototypeString();
|
||||
|
||||
StringBuilder sb = new StringBuilder(methodName.length() + prototypeString.length());
|
||||
sb.append(methodName);
|
||||
sb.append(prototypeString);
|
||||
cachedVirtualMethodString = sb.toString();
|
||||
cachedShortMethodString = sb.toString();
|
||||
}
|
||||
return cachedVirtualMethodString;
|
||||
return cachedShortMethodString;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user