Class InjectionNodes
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<InjectionNodes.InjectionNode>
org.spongepowered.asm.mixin.injection.struct.InjectionNodes
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<InjectionNodes.InjectionNode>
,Collection<InjectionNodes.InjectionNode>
,List<InjectionNodes.InjectionNode>
,RandomAccess
Used to keep track of instruction nodes in a
Target
method which are
targetted by various types of injector. This collection is populated during
the first injector pass and allows injectors to keep track of their targets
even when the target method is being manipulated by other injectors.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
A node targetted by one or more injectors. -
Field Summary
Fields inherited from class java.util.AbstractList
modCount
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd
(org.objectweb.asm.tree.AbstractInsnNode node) Add a tracked node to this collection if it does not already existboolean
contains
(org.objectweb.asm.tree.AbstractInsnNode node) Get whether this collection contains a mapping for the specified insnget
(org.objectweb.asm.tree.AbstractInsnNode node) Get a tracked node from this collection if it already exists, returns null if the node is not trackedvoid
remove
(org.objectweb.asm.tree.AbstractInsnNode node) Mark the specified node as removed, does not update the wrapper if no wrapper existsvoid
replace
(org.objectweb.asm.tree.AbstractInsnNode oldNode, org.objectweb.asm.tree.AbstractInsnNode newNode) Replace the specified node with the new node, does not update the wrapper if no wrapper exists for oldNodeMethods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
Methods inherited from class java.util.AbstractCollection
containsAll, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, stream, toArray
Methods inherited from interface java.util.List
containsAll
-
Constructor Details
-
InjectionNodes
public InjectionNodes()
-
-
Method Details
-
add
Add a tracked node to this collection if it does not already exist- Parameters:
node
- Instruction node to add- Returns:
- wrapper for the specified node
-
get
Get a tracked node from this collection if it already exists, returns null if the node is not tracked- Parameters:
node
- instruction node- Returns:
- wrapper node or null if not tracked
-
contains
public boolean contains(org.objectweb.asm.tree.AbstractInsnNode node) Get whether this collection contains a mapping for the specified insn- Parameters:
node
- instruction node to check- Returns:
- true if a wrapper exists for the node
-
replace
public void replace(org.objectweb.asm.tree.AbstractInsnNode oldNode, org.objectweb.asm.tree.AbstractInsnNode newNode) Replace the specified node with the new node, does not update the wrapper if no wrapper exists for oldNode- Parameters:
oldNode
- node being replacednewNode
- node to replace with
-
remove
public void remove(org.objectweb.asm.tree.AbstractInsnNode node) Mark the specified node as removed, does not update the wrapper if no wrapper exists- Parameters:
node
- node being removed
-