Class InsnUtil


  • public final class InsnUtil
    extends Object
    A utility class for handling of ASM instruction lists.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static org.objectweb.asm.tree.InsnList il​(org.objectweb.asm.tree.AbstractInsnNode ain)  
      static org.objectweb.asm.tree.InsnList il​(org.objectweb.asm.tree.AbstractInsnNode... ains)  
      static org.objectweb.asm.tree.InsnList oa​(List<org.objectweb.asm.tree.InsnList> insnLists)  
      static org.objectweb.asm.tree.InsnList oa​(org.objectweb.asm.tree.InsnList... il)  
      static org.objectweb.asm.tree.AbstractInsnNode push​(Object constantValue)  
    • Method Detail

      • il

        public static org.objectweb.asm.tree.InsnList il​(org.objectweb.asm.tree.AbstractInsnNode ain)
        Returns:
        An InsnList with the single instruction ain.
      • il

        public static org.objectweb.asm.tree.InsnList il​(org.objectweb.asm.tree.AbstractInsnNode... ains)
        Returns:
        An InsnList that contains the given instruction nodes.
      • oa

        public static org.objectweb.asm.tree.InsnList oa​(org.objectweb.asm.tree.InsnList... il)
        Parameters:
        il - InsnLists that each create exactly one Object on the operand stack
        Returns:
        Code that produces an object array filled with the values produced by the ils
      • oa

        public static org.objectweb.asm.tree.InsnList oa​(List<org.objectweb.asm.tree.InsnList> insnLists)
        Parameters:
        insnLists - InsnLists that each create exactly one Object on the operand stack
        Returns:
        Code that produces an object array filled with the values produced by the insnLists
      • push

        public static org.objectweb.asm.tree.AbstractInsnNode push​(@Nullable
                                                                   Object constantValue)
        Returns:
        Code that puts the given constant value on the operand stack