mirror of
https://github.com/revanced/smali.git
synced 2025-06-12 12:17:37 +02:00
Changed parent of CodeItem to EncodedMethod instead of MethodIdItem
git-svn-id: https://smali.googlecode.com/svn/trunk@375 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
This commit is contained in:
@ -389,7 +389,7 @@ public class ClassDataItem extends Item<ClassDataItem> {
|
||||
this.accessFlags = accessFlags;
|
||||
this.codeItem = codeItem;
|
||||
if (codeItem != null) {
|
||||
codeItem.setParent(method);
|
||||
codeItem.setParent(this);
|
||||
}
|
||||
}
|
||||
|
||||
@ -408,7 +408,7 @@ public class ClassDataItem extends Item<ClassDataItem> {
|
||||
accessFlags = in.readUnsignedLeb128();
|
||||
codeItem = (CodeItem)readContext.getOffsettedItemByOffset(ItemType.TYPE_CODE_ITEM, in.readUnsignedLeb128());
|
||||
if (codeItem != null) {
|
||||
codeItem.setParent(method);
|
||||
codeItem.setParent(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -47,7 +47,7 @@ public class CodeItem extends Item<CodeItem> {
|
||||
private TryItem[] tries;
|
||||
private EncodedCatchHandler[] encodedCatchHandlers;
|
||||
|
||||
private MethodIdItem parent;
|
||||
private ClassDataItem.EncodedMethod parent;
|
||||
|
||||
/**
|
||||
* Creates a new uninitialized <code>CodeItem</code>
|
||||
@ -274,7 +274,7 @@ public class CodeItem extends Item<CodeItem> {
|
||||
if (other.parent == null) {
|
||||
return 1;
|
||||
}
|
||||
return parent.compareTo(other.parent);
|
||||
return parent.method.compareTo(other.parent.method);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -307,17 +307,17 @@ public class CodeItem extends Item<CodeItem> {
|
||||
|
||||
/**
|
||||
* Sets the <code>MethodIdItem</code> of the method that this <code>CodeItem</code> is associated with
|
||||
* @param methodIdItem the <code>MethodIdItem</code> of the method that this <code>CodeItem</code> is associated
|
||||
* @param encodedMethod the <code>EncodedMethod</code> of the method that this <code>CodeItem</code> is associated
|
||||
* with
|
||||
*/
|
||||
protected void setParent(MethodIdItem methodIdItem) {
|
||||
this.parent = methodIdItem;
|
||||
protected void setParent(ClassDataItem.EncodedMethod encodedMethod) {
|
||||
this.parent = encodedMethod;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the MethodIdItem of the method that this CodeItem belongs to
|
||||
*/
|
||||
public MethodIdItem getParent() {
|
||||
public ClassDataItem.EncodedMethod getParent() {
|
||||
return parent;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user