Class InsnListEx

java.lang.Object
org.objectweb.asm.tree.InsnList
org.spongepowered.asm.mixin.injection.code.InsnListReadOnly
org.spongepowered.asm.mixin.injection.code.InsnListEx
All Implemented Interfaces:
Iterable<org.objectweb.asm.tree.AbstractInsnNode>, IInsnListEx

public class InsnListEx extends InsnListReadOnly implements IInsnListEx
InsnList with extensions, see IInsnListEx
  • Field Details

    • target

      protected final Target target
      The target method
  • Constructor Details

    • InsnListEx

      public InsnListEx(Target target)
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getTargetName

      public String getTargetName()
      Description copied from interface: IInsnListEx
      Get the name of the target method
      Specified by:
      getTargetName in interface IInsnListEx
    • getTargetDesc

      public String getTargetDesc()
      Description copied from interface: IInsnListEx
      Get the descriptor of the target method
      Specified by:
      getTargetDesc in interface IInsnListEx
    • getTargetSignature

      public String getTargetSignature()
      Description copied from interface: IInsnListEx
      Get the signature of the target method
      Specified by:
      getTargetSignature in interface IInsnListEx
    • getTargetAccess

      public int getTargetAccess()
      Description copied from interface: IInsnListEx
      Get the access flags from the target method
      Specified by:
      getTargetAccess in interface IInsnListEx
    • isTargetStatic

      public boolean isTargetStatic()
      Description copied from interface: IInsnListEx
      Get whether the target method is static
      Specified by:
      isTargetStatic in interface IInsnListEx
    • isTargetConstructor

      public boolean isTargetConstructor()
      Description copied from interface: IInsnListEx
      Get whether the target method is a constructor
      Specified by:
      isTargetConstructor in interface IInsnListEx
    • isTargetStaticInitialiser

      public boolean isTargetStaticInitialiser()
      Description copied from interface: IInsnListEx
      Get whether the target method is a static initialiser
      Specified by:
      isTargetStaticInitialiser in interface IInsnListEx
    • getSpecialNode

      public org.objectweb.asm.tree.AbstractInsnNode getSpecialNode(IInsnListEx.SpecialNodeType type)
      Description copied from interface: IInsnListEx
      Get - if available - the specified special node from the target. The returned node is not guaranteed to be non-null.
      Specified by:
      getSpecialNode in interface IInsnListEx
      Parameters:
      type - type of special node to fetch
      Returns:
      the special node or null if not available
    • decorate

      public <V> InsnListEx decorate(String key, V value)
      Decorate this insn list with arbitrary metadata for use by context-specific injection points
      Type Parameters:
      V - value type
      Parameters:
      key - meta key
      value - meta value
      Returns:
      fluent
    • undecorate

      public InsnListEx undecorate(String key)
      Strip a specific decoration from this list if the decoration exists
      Parameters:
      key - meta key
      Returns:
      fluent
    • undecorate

      public InsnListEx undecorate()
      Strip all decorations from this list
      Returns:
      fluent
    • hasDecoration

      public boolean hasDecoration(String key)
      Get whether this list is decorated with the specified key
      Specified by:
      hasDecoration in interface IInsnListEx
      Parameters:
      key - meta key
      Returns:
      true if the specified decoration exists
    • getDecoration

      public <V> V getDecoration(String key)
      Get the specified decoration
      Specified by:
      getDecoration in interface IInsnListEx
      Type Parameters:
      V - value type
      Parameters:
      key - meta key
      Returns:
      decoration value or null if absent
    • getDecoration

      public <V> V getDecoration(String key, V defaultValue)
      Get the specified decoration or default value
      Specified by:
      getDecoration in interface IInsnListEx
      Type Parameters:
      V - value type
      Parameters:
      key - meta key
      defaultValue - default value to return
      Returns:
      decoration value or null if absent