< prev index next >

src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/InstructionAdapter.java

Print this page




  56  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  57  * THE POSSIBILITY OF SUCH DAMAGE.
  58  */
  59 
  60 package jdk.internal.org.objectweb.asm.commons;
  61 
  62 import jdk.internal.org.objectweb.asm.Handle;
  63 import jdk.internal.org.objectweb.asm.Label;
  64 import jdk.internal.org.objectweb.asm.MethodVisitor;
  65 import jdk.internal.org.objectweb.asm.Opcodes;
  66 import jdk.internal.org.objectweb.asm.Type;
  67 
  68 /**
  69  * A {@link MethodVisitor} providing a more detailed API to generate and
  70  * transform instructions.
  71  *
  72  * @author Eric Bruneton
  73  */
  74 public class InstructionAdapter extends MethodVisitor {
  75 
  76     public static final Type OBJECT_TYPE = Type.getType("Ljava/lang/Object;");
  77 
  78     /**
  79      * Creates a new {@link InstructionAdapter}. <i>Subclasses must not use this
  80      * constructor</i>. Instead, they must use the
  81      * {@link #InstructionAdapter(int, MethodVisitor)} version.
  82      *
  83      * @param mv
  84      *            the method visitor to which this adapter delegates calls.
  85      * @throws IllegalStateException
  86      *             If a subclass calls this constructor.
  87      */
  88     public InstructionAdapter(final MethodVisitor mv) {
  89         this(Opcodes.ASM5, mv);
  90         if (getClass() != InstructionAdapter.class) {
  91             throw new IllegalStateException();
  92         }
  93     }
  94 
  95     /**
  96      * Creates a new {@link InstructionAdapter}.




  56  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  57  * THE POSSIBILITY OF SUCH DAMAGE.
  58  */
  59 
  60 package jdk.internal.org.objectweb.asm.commons;
  61 
  62 import jdk.internal.org.objectweb.asm.Handle;
  63 import jdk.internal.org.objectweb.asm.Label;
  64 import jdk.internal.org.objectweb.asm.MethodVisitor;
  65 import jdk.internal.org.objectweb.asm.Opcodes;
  66 import jdk.internal.org.objectweb.asm.Type;
  67 
  68 /**
  69  * A {@link MethodVisitor} providing a more detailed API to generate and
  70  * transform instructions.
  71  *
  72  * @author Eric Bruneton
  73  */
  74 public class InstructionAdapter extends MethodVisitor {
  75 
  76     public final static Type OBJECT_TYPE = Type.getType("Ljava/lang/Object;");
  77 
  78     /**
  79      * Creates a new {@link InstructionAdapter}. <i>Subclasses must not use this
  80      * constructor</i>. Instead, they must use the
  81      * {@link #InstructionAdapter(int, MethodVisitor)} version.
  82      *
  83      * @param mv
  84      *            the method visitor to which this adapter delegates calls.
  85      * @throws IllegalStateException
  86      *             If a subclass calls this constructor.
  87      */
  88     public InstructionAdapter(final MethodVisitor mv) {
  89         this(Opcodes.ASM5, mv);
  90         if (getClass() != InstructionAdapter.class) {
  91             throw new IllegalStateException();
  92         }
  93     }
  94 
  95     /**
  96      * Creates a new {@link InstructionAdapter}.


< prev index next >