mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-28 02:30:42 +00:00
AS3: ignore return void at the end of the method
AS3: ABC - find by class & method
This commit is contained in:
@@ -861,5 +861,32 @@ public class ABC {
|
||||
for (int i = 0; i < bodies.length; i++) {
|
||||
bodies[i].autoFillStats(this);
|
||||
}
|
||||
}
|
||||
|
||||
public int findMethodBodyByName(int classId,String methodName){
|
||||
if(classId>-1){
|
||||
for(Trait t:instance_info[classId].instance_traits.traits){
|
||||
if(t instanceof TraitMethodGetterSetter){
|
||||
if(t.getName(this).getName(constants, new ArrayList<String>()).equals(methodName)){
|
||||
return findBodyIndex(((TraitMethodGetterSetter)t).method_info);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
public int findMethodBodyByName(String className,String methodName){
|
||||
int classId=findClassByName(className);
|
||||
return findMethodBodyByName(classId,methodName);
|
||||
}
|
||||
|
||||
public int findClassByName(String name){
|
||||
for(int c=0;c<instance_info.length;c++){
|
||||
String s=constants.constant_multiname[instance_info[c].name_index].getNameWithNamespace(constants);
|
||||
if(name.equals(s)){
|
||||
return c;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user