Package org.spongepowered.asm.mixin.injection.code

## 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:
  `java.lang.Iterable<org.objectweb.asm.tree.AbstractInsnNode>`, `IInsnListEx`

    public class InsnListEx
    extends InsnListReadOnly
    implements IInsnListEx

InsnList with extensions, see `IInsnListEx`

### Nested Class Summary

### Nested classes/interfaces inherited from interface org.spongepowered.asm.mixin.injection.code.IInsnListEx

`IInsnListEx.SpecialNodeType`

### Field Summary

Fields
`protected Target` `target` The target method

### Constructor Summary

Constructors
`InsnListEx​(Target target)`

### Method Summary

All Methods Instance Methods Concrete Methods
`<V> InsnListEx` `decorate​(java.lang.String key, V value)` Decorate this insn list with arbitrary metadata for use by context-specific injection points
`<V> V` `getDecoration​(java.lang.String key)` Get the specified decoration
`<V> V` `getDecoration​(java.lang.String key, V defaultValue)` Get the specified decoration or default value
`org.objectweb.asm.tree.AbstractInsnNode` `getSpecialNode​(IInsnListEx.SpecialNodeType type)` Get - if available - the specified special node from the target.
`int` `getTargetAccess()` Get the access flags from the target method
`java.lang.String` `getTargetDesc()` Get the descriptor of the target method
`java.lang.String` `getTargetName()` Get the name of the target method
`java.lang.String` `getTargetSignature()` Get the signature of the target method
`boolean` `hasDecoration​(java.lang.String key)` Get whether this list is decorated with the specified key
`boolean` `isTargetConstructor()` Get whether the target method is a constructor
`boolean` `isTargetStatic()` Get whether the target method is static
`boolean` `isTargetStaticInitialiser()` Get whether the target method is a static initialiser
`java.lang.String` `toString()`
`InsnListEx` `undecorate()` Strip all decorations from this list
`InsnListEx` `undecorate​(java.lang.String key)` Strip a specific decoration from this list if the decoration exists

### Methods inherited from class org.spongepowered.asm.mixin.injection.code.InsnListReadOnly

`add, add, contains, get, getFirst, getLast, indexOf, insert, insert, insert, insert, insertBefore, insertBefore, iterator, iterator, remove, resetLabels, set, size, toArray`

### Methods inherited from class org.objectweb.asm.tree.InsnList

`accept, clear`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface java.lang.Iterable

`forEach, spliterator`

### Field Detail

#### target

    protected final Target target

The target method

### Constructor Detail

#### InsnListEx

    public InsnListEx​(Target target)

### Method Detail

#### toString

    public java.lang.String toString()

Overrides:
  `toString` in class `java.lang.Object`

#### getTargetName

    public java.lang.String getTargetName()

Description copied from interface: `IInsnListEx`
Get the name of the target method

Specified by:
  `getTargetName` in interface `IInsnListEx`

#### getTargetDesc

    public java.lang.String getTargetDesc()

Description copied from interface: `IInsnListEx`
Get the descriptor of the target method

Specified by:
  `getTargetDesc` in interface `IInsnListEx`

#### getTargetSignature

    public java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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