Class InjectionNodes
java.lang.Object
java.util.AbstractCollection<InjectionNodes.InjectionNode>
java.util.AbstractList<InjectionNodes.InjectionNode>
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,SequencedCollection<InjectionNodes.InjectionNode>
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 classA 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 existbooleancontains(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 trackedremove(org.objectweb.asm.tree.AbstractInsnNode node) Mark the specified node as removed, does not update the wrapper if no wrapper existsreplace(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, addFirst, addLast, clear, clone, contains, ensureCapacity, equals, forEach, get, getFirst, getLast, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeFirst, removeIf, removeLast, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizeMethods inherited from class java.util.AbstractCollection
containsAll, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, stream, toArrayMethods inherited from interface java.util.List
containsAll, reversed
-
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 InjectionNodes.InjectionNode 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
Mark the specified node as removed, does not update the wrapper if no wrapper exists- Parameters:
node- node being removed
-