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
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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<V> InsnListExDecorate this insn list with arbitrary metadata for use by context-specific injection points<V> VgetDecoration(String key) Get the specified decoration<V> VgetDecoration(String key, V defaultValue) Get the specified decoration or default valueorg.objectweb.asm.tree.AbstractInsnNodeGet - if available - the specified special node from the target.intGet the access flags from the target methodGet the descriptor of the target methodGet the name of the target methodGet the signature of the target methodbooleanhasDecoration(String key) Get whether this list is decorated with the specified keybooleanGet whether the target method is a constructorbooleanGet whether the target method is staticbooleanGet whether the target method is a static initialisertoString()Strip all decorations from this listundecorate(String key) Strip a specific decoration from this list if the decoration existsMethods 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, toArrayMethods inherited from class org.objectweb.asm.tree.InsnList
accept, clearMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
target
The target method
-
-
Constructor Details
-
InsnListEx
-
-
Method Details
-
toString
-
getTargetName
Description copied from interface:IInsnListExGet the name of the target method- Specified by:
getTargetNamein interfaceIInsnListEx
-
getTargetDesc
Description copied from interface:IInsnListExGet the descriptor of the target method- Specified by:
getTargetDescin interfaceIInsnListEx
-
getTargetSignature
Description copied from interface:IInsnListExGet the signature of the target method- Specified by:
getTargetSignaturein interfaceIInsnListEx
-
getTargetAccess
public int getTargetAccess()Description copied from interface:IInsnListExGet the access flags from the target method- Specified by:
getTargetAccessin interfaceIInsnListEx
-
isTargetStatic
public boolean isTargetStatic()Description copied from interface:IInsnListExGet whether the target method is static- Specified by:
isTargetStaticin interfaceIInsnListEx
-
isTargetConstructor
public boolean isTargetConstructor()Description copied from interface:IInsnListExGet whether the target method is a constructor- Specified by:
isTargetConstructorin interfaceIInsnListEx
-
isTargetStaticInitialiser
public boolean isTargetStaticInitialiser()Description copied from interface:IInsnListExGet whether the target method is a static initialiser- Specified by:
isTargetStaticInitialiserin interfaceIInsnListEx
-
getSpecialNode
Description copied from interface:IInsnListExGet - if available - the specified special node from the target. The returned node is not guaranteed to be non-null.- Specified by:
getSpecialNodein interfaceIInsnListEx- Parameters:
type- type of special node to fetch- Returns:
- the special node or null if not available
-
decorate
Decorate this insn list with arbitrary metadata for use by context-specific injection points- Type Parameters:
V- value type- Parameters:
key- meta keyvalue- meta value- Returns:
- fluent
-
undecorate
Strip a specific decoration from this list if the decoration exists- Parameters:
key- meta key- Returns:
- fluent
-
undecorate
Strip all decorations from this list- Returns:
- fluent
-
hasDecoration
Get whether this list is decorated with the specified key- Specified by:
hasDecorationin interfaceIInsnListEx- Parameters:
key- meta key- Returns:
- true if the specified decoration exists
-
getDecoration
Get the specified decoration- Specified by:
getDecorationin interfaceIInsnListEx- Type Parameters:
V- value type- Parameters:
key- meta key- Returns:
- decoration value or null if absent
-
getDecoration
Get the specified decoration or default value- Specified by:
getDecorationin interfaceIInsnListEx- Type Parameters:
V- value type- Parameters:
key- meta keydefaultValue- default value to return- Returns:
- decoration value or null if absent
-