mirror of
https://github.com/revanced/smali.git
synced 2025-06-13 12:37: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.accessFlags = accessFlags;
|
||||||
this.codeItem = codeItem;
|
this.codeItem = codeItem;
|
||||||
if (codeItem != null) {
|
if (codeItem != null) {
|
||||||
codeItem.setParent(method);
|
codeItem.setParent(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -408,7 +408,7 @@ public class ClassDataItem extends Item<ClassDataItem> {
|
|||||||
accessFlags = in.readUnsignedLeb128();
|
accessFlags = in.readUnsignedLeb128();
|
||||||
codeItem = (CodeItem)readContext.getOffsettedItemByOffset(ItemType.TYPE_CODE_ITEM, in.readUnsignedLeb128());
|
codeItem = (CodeItem)readContext.getOffsettedItemByOffset(ItemType.TYPE_CODE_ITEM, in.readUnsignedLeb128());
|
||||||
if (codeItem != null) {
|
if (codeItem != null) {
|
||||||
codeItem.setParent(method);
|
codeItem.setParent(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ public class CodeItem extends Item<CodeItem> {
|
|||||||
private TryItem[] tries;
|
private TryItem[] tries;
|
||||||
private EncodedCatchHandler[] encodedCatchHandlers;
|
private EncodedCatchHandler[] encodedCatchHandlers;
|
||||||
|
|
||||||
private MethodIdItem parent;
|
private ClassDataItem.EncodedMethod parent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new uninitialized <code>CodeItem</code>
|
* Creates a new uninitialized <code>CodeItem</code>
|
||||||
@ -274,7 +274,7 @@ public class CodeItem extends Item<CodeItem> {
|
|||||||
if (other.parent == null) {
|
if (other.parent == null) {
|
||||||
return 1;
|
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
|
* 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
|
* with
|
||||||
*/
|
*/
|
||||||
protected void setParent(MethodIdItem methodIdItem) {
|
protected void setParent(ClassDataItem.EncodedMethod encodedMethod) {
|
||||||
this.parent = methodIdItem;
|
this.parent = encodedMethod;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the MethodIdItem of the method that this CodeItem belongs to
|
* @return the MethodIdItem of the method that this CodeItem belongs to
|
||||||
*/
|
*/
|
||||||
public MethodIdItem getParent() {
|
public ClassDataItem.EncodedMethod getParent() {
|
||||||
return parent;
|
return parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user