public class InsnNode extends LineAttrNode
| Modifier and Type | Field and Description |
|---|---|
protected InsnType |
insnType |
protected int |
offset |
| Constructor and Description |
|---|
InsnNode(InsnType type,
int argsCount) |
InsnNode(InsnType type,
java.util.List<InsnArg> args) |
| Modifier and Type | Method and Description |
|---|---|
void |
addArg(InsnArg arg) |
protected void |
addLit(jadx.api.plugins.input.insns.InsnData insn,
ArgType type) |
protected void |
addLit(long literal,
ArgType type) |
protected void |
addReg(jadx.api.plugins.input.insns.InsnData insn,
int i,
ArgType type) |
protected void |
addReg(int regNum,
ArgType type) |
protected void |
appendArgs(java.lang.StringBuilder sb) |
protected void |
attachArg(InsnArg arg) |
boolean |
canRemoveResult() |
boolean |
canReorder() |
boolean |
canThrowException() |
boolean |
containsArg(InsnArg arg) |
boolean |
containsVar(RegisterArg arg) |
boolean |
containsWrappedInsn() |
InsnNode |
copy()
Make copy of InsnNode object.
|
InsnNode |
copy(RegisterArg newReturnArg)
See
copy() |
void |
copyAttributesFrom(InsnNode attrNode) |
protected <T extends InsnNode> |
copyCommonParams(T copy) |
InsnNode |
copyWithNewSsaVar(MethodNode mth)
See
copy() |
<T extends InsnNode> |
copyWithoutResult()
See
copy() |
InsnNode |
copyWithoutSsa() |
boolean |
equals(java.lang.Object obj)
Compare instruction only by identity.
|
InsnArg |
getArg(int n) |
int |
getArgIndex(InsnArg arg) |
int |
getArgsCount() |
java.lang.Iterable<InsnArg> |
getArguments() |
int |
getOffset() |
void |
getRegisterArgs(java.util.Collection<RegisterArg> collection) |
RegisterArg |
getResult() |
InsnType |
getType() |
int |
hashCode()
Compare instruction only by identity.
|
void |
inheritMetadata(InsnNode sourceInsn) |
boolean |
isConstInsn() |
boolean |
isDeepEquals(InsnNode other)
'Hard' equals, compare all arguments
|
boolean |
isSame(InsnNode other)
'Soft' equals, don't compare arguments, only instruction specific parameters.
|
void |
rebindArgs()
Fix SSAVar info in register arguments.
|
protected boolean |
removeArg(InsnArg arg) |
InsnArg |
removeArg(int index) |
boolean |
replaceArg(InsnArg from,
InsnArg to)
Replace instruction arg with another using recursive search.
|
void |
setArg(int n,
InsnArg arg) |
void |
setOffset(int offset) |
void |
setResult(@Nullable RegisterArg res) |
java.lang.String |
toString() |
void |
visitArgs(java.util.function.Consumer<InsnArg> visitor)
Visit all args recursively (including inner instructions), but excluding wrapped args
|
<R> R |
visitArgs(java.util.function.Function<InsnArg,R> visitor)
Visit all args recursively (including inner instructions), but excluding wrapped args.
|
void |
visitInsns(java.util.function.Consumer<InsnNode> visitor)
Visit this instruction and all inner (wrapped) instructions
|
<R> R |
visitInsns(java.util.function.Function<InsnNode,R> visitor)
Visit this instruction and all inner (wrapped) instructions
To terminate visiting return non-null value
|
static InsnNode |
wrapArg(InsnArg arg) |
addSourceLineFrom, copyLines, getDefPosition, getSourceLine, setDefPosition, setSourceLineadd, addAttr, addAttr, addAttr, addAttrs, clearAttributes, contains, contains, copyAttributeFrom, copyAttributesFrom, get, getAll, getAnnotation, getAttributesString, getAttributesStringsList, isAttrStorageEmpty, remove, remove, removeAttr, rewriteAttributeFrom, unloadAttributesprotected final InsnType insnType
protected int offset
public InsnNode(InsnType type, int argsCount)
public void setResult(@Nullable
@Nullable RegisterArg res)
public void addArg(InsnArg arg)
public void setArg(int n,
InsnArg arg)
protected void attachArg(InsnArg arg)
public InsnType getType()
public RegisterArg getResult()
public java.lang.Iterable<InsnArg> getArguments()
public int getArgsCount()
public InsnArg getArg(int n)
public boolean containsArg(InsnArg arg)
public boolean containsVar(RegisterArg arg)
public boolean replaceArg(InsnArg from, InsnArg to)
protected boolean removeArg(InsnArg arg)
public InsnArg removeArg(int index)
public int getArgIndex(InsnArg arg)
protected void addReg(jadx.api.plugins.input.insns.InsnData insn,
int i,
ArgType type)
protected void addReg(int regNum,
ArgType type)
protected void addLit(long literal,
ArgType type)
protected void addLit(jadx.api.plugins.input.insns.InsnData insn,
ArgType type)
public int getOffset()
public void setOffset(int offset)
public void getRegisterArgs(java.util.Collection<RegisterArg> collection)
public boolean isConstInsn()
public boolean canRemoveResult()
public boolean canReorder()
public boolean containsWrappedInsn()
public void visitInsns(java.util.function.Consumer<InsnNode> visitor)
@Nullable public <R> R visitInsns(java.util.function.Function<InsnNode,R> visitor)
public void visitArgs(java.util.function.Consumer<InsnArg> visitor)
@Nullable public <R> R visitArgs(java.util.function.Function<InsnArg,R> visitor)
public boolean isSame(InsnNode other)
public boolean isDeepEquals(InsnNode other)
protected final <T extends InsnNode> T copyCommonParams(T copy)
public void copyAttributesFrom(InsnNode attrNode)
public InsnNode copy()
copyWithoutResult() to explicitly state that result not needed
copy(RegisterArg) to provide new result arg
copyWithNewSsaVar(MethodNode) to make new SSA variable for result arg
public InsnNode copyWithoutSsa()
public InsnNode copy(RegisterArg newReturnArg)
copy()public InsnNode copyWithNewSsaVar(MethodNode mth)
copy()public void rebindArgs()
public boolean canThrowException()
public void inheritMetadata(InsnNode sourceInsn)
public final int hashCode()
hashCode in class java.lang.Objectpublic final boolean equals(java.lang.Object obj)
equals in class java.lang.Objectprotected void appendArgs(java.lang.StringBuilder sb)
public java.lang.String toString()
toString in class java.lang.Object