Class InjectionNodes

All Implemented Interfaces:
Serializable, Cloneable, Iterable<InjectionNodes.InjectionNode>, Collection<InjectionNodes.InjectionNode>, List<InjectionNodes.InjectionNode>, RandomAccess

public class InjectionNodes extends ArrayList<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:
  • Constructor Details

    • InjectionNodes

      public InjectionNodes()
  • Method Details

    • add

      public InjectionNodes.InjectionNode add(org.objectweb.asm.tree.AbstractInsnNode node)
      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

      public InjectionNodes.InjectionNode get(org.objectweb.asm.tree.AbstractInsnNode node)
      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 replaced
      newNode - 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