public static class InjectionNodes.InjectionNode extends java.lang.Object implements java.lang.Comparable<InjectionNodes.InjectionNode>
| Constructor and Description |
|---|
InjectionNode(org.objectweb.asm.tree.AbstractInsnNode node)
Create a new node wrapper for the specified target node
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(InjectionNodes.InjectionNode other) |
<V> InjectionNodes.InjectionNode |
decorate(java.lang.String key,
V value)
Decorate this node with arbitrary metadata for injector arbitration
|
org.objectweb.asm.tree.AbstractInsnNode |
getCurrentTarget()
Get the current target of this node, can be null if the node was
replaced
|
<V> V |
getDecoration(java.lang.String key)
Get the specified decoration
|
int |
getId()
Get the unique id for this injector
|
org.objectweb.asm.tree.AbstractInsnNode |
getOriginalTarget()
Get the original target of this node
|
boolean |
hasDecoration(java.lang.String key)
Get whether this node is decorated with the specified key
|
boolean |
isRemoved()
Get whether this node has been removed
|
boolean |
isReplaced()
Get whether this node has been replaced
|
boolean |
matches(org.objectweb.asm.tree.AbstractInsnNode node)
Checks whether the original or current target of this node match the
specified node
|
InjectionNodes.InjectionNode |
remove()
Remove the node
|
InjectionNodes.InjectionNode |
replace(org.objectweb.asm.tree.AbstractInsnNode target)
Replace this node with the specified target
|
java.lang.String |
toString() |
public InjectionNode(org.objectweb.asm.tree.AbstractInsnNode node)
node - target nodepublic int getId()
public org.objectweb.asm.tree.AbstractInsnNode getOriginalTarget()
public org.objectweb.asm.tree.AbstractInsnNode getCurrentTarget()
public InjectionNodes.InjectionNode replace(org.objectweb.asm.tree.AbstractInsnNode target)
target - new nodepublic InjectionNodes.InjectionNode remove()
public boolean matches(org.objectweb.asm.tree.AbstractInsnNode node)
node - node to checkpublic boolean isReplaced()
public boolean isRemoved()
public <V> InjectionNodes.InjectionNode decorate(java.lang.String key, V value)
V - value typekey - meta keyvalue - meta valuepublic boolean hasDecoration(java.lang.String key)
key - meta keypublic <V> V getDecoration(java.lang.String key)
V - value typekey - meta keypublic int compareTo(InjectionNodes.InjectionNode other)
compareTo in interface java.lang.Comparable<InjectionNodes.InjectionNode>public java.lang.String toString()
toString in class java.lang.Object