Class InsnRange
- java.lang.Object
-
- org.spongepowered.asm.mixin.transformer.struct.InsnRange
-
public class InsnRange extends java.lang.ObjectStruct for representing a range of instructions
-
-
Constructor Summary
Constructors Constructor Description InsnRange(int start, int end, int marker)Create a range with the specified values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Deque<org.objectweb.asm.tree.AbstractInsnNode>apply(org.objectweb.asm.tree.InsnList insns, boolean inclusive)Apply this range to the specified insn listbooleancontains(int value)Returns true if the supplied value is between or equal to start and endbooleanexcludes(int value)Returns true if the supplied value is outside the rangebooleanisValid()Range is valid if both start and end are nonzero and end is after or at startjava.lang.StringtoString()
-
-
-
Method Detail
-
isValid
public boolean isValid()
Range is valid if both start and end are nonzero and end is after or at start- Returns:
- true if valid
-
contains
public boolean contains(int value)
Returns true if the supplied value is between or equal to start and end- Parameters:
value- true if the range contains value
-
excludes
public boolean excludes(int value)
Returns true if the supplied value is outside the range- Parameters:
value- true if the range does not contain value
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
apply
public java.util.Deque<org.objectweb.asm.tree.AbstractInsnNode> apply(org.objectweb.asm.tree.InsnList insns, boolean inclusive)Apply this range to the specified insn list- Parameters:
insns- insn list to filterinclusive- whether to include or exclude instructions- Returns:
- filtered list
-
-