mirror of
https://github.com/revanced/ARSCLib.git
synced 2025-05-01 14:44:27 +02:00
create instance parent getter
This commit is contained in:
parent
a40b086f9e
commit
9c17fbbdb7
@ -100,6 +100,16 @@ public abstract class Block {
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
public final <T> T getParentInstance(Class<T> parentClass){
|
||||||
|
Block parent = getParent();
|
||||||
|
while (parent!=null){
|
||||||
|
if(parentClass.isInstance(parent)){
|
||||||
|
return (T) parent;
|
||||||
|
}
|
||||||
|
parent = parent.getParent();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
protected static byte[] addBytes(byte[] bts1, byte[] bts2){
|
protected static byte[] addBytes(byte[] bts1, byte[] bts2){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user