< prev index next >

src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/CheckMethodAdapter.java

Print this page




 420      * @param mv
 421      *            the method visitor to which this adapter must delegate calls.
 422      * @param labels
 423      *            a map of already visited labels (in other methods).
 424      * @throws IllegalStateException
 425      *             If a subclass calls this constructor.
 426      */
 427     public CheckMethodAdapter(final MethodVisitor mv,
 428             final Map<Label, Integer> labels) {
 429         this(Opcodes.ASM5, mv, labels);
 430         if (getClass() != CheckMethodAdapter.class) {
 431             throw new IllegalStateException();
 432         }
 433     }
 434 
 435     /**
 436      * Constructs a new {@link CheckMethodAdapter} object. This method adapter
 437      * will not perform any data flow check (see
 438      * {@link #CheckMethodAdapter(int,String,String,MethodVisitor,Map)}).
 439      *



 440      * @param mv
 441      *            the method visitor to which this adapter must delegate calls.
 442      * @param labels
 443      *            a map of already visited labels (in other methods).
 444      */
 445     protected CheckMethodAdapter(final int api, final MethodVisitor mv,
 446             final Map<Label, Integer> labels) {
 447         super(api, mv);
 448         this.labels = labels;
 449         this.usedLabels = new HashSet<Label>();
 450         this.handlers = new ArrayList<Label>();
 451     }
 452 
 453     /**
 454      * Constructs a new {@link CheckMethodAdapter} object. This method adapter
 455      * will perform basic data flow checks. For instance in a method whose
 456      * signature is <tt>void m ()</tt>, the invalid instruction IRETURN, or the
 457      * invalid sequence IADD L2I will be detected.
 458      *
 459      * @param access




 420      * @param mv
 421      *            the method visitor to which this adapter must delegate calls.
 422      * @param labels
 423      *            a map of already visited labels (in other methods).
 424      * @throws IllegalStateException
 425      *             If a subclass calls this constructor.
 426      */
 427     public CheckMethodAdapter(final MethodVisitor mv,
 428             final Map<Label, Integer> labels) {
 429         this(Opcodes.ASM5, mv, labels);
 430         if (getClass() != CheckMethodAdapter.class) {
 431             throw new IllegalStateException();
 432         }
 433     }
 434 
 435     /**
 436      * Constructs a new {@link CheckMethodAdapter} object. This method adapter
 437      * will not perform any data flow check (see
 438      * {@link #CheckMethodAdapter(int,String,String,MethodVisitor,Map)}).
 439      *
 440      * @param api
 441      *            the ASM API version implemented by this CheckMethodAdapter.
 442      *            Must be one of {@link Opcodes#ASM4} or {@link Opcodes#ASM5}.
 443      * @param mv
 444      *            the method visitor to which this adapter must delegate calls.
 445      * @param labels
 446      *            a map of already visited labels (in other methods).
 447      */
 448     protected CheckMethodAdapter(final int api, final MethodVisitor mv,
 449             final Map<Label, Integer> labels) {
 450         super(api, mv);
 451         this.labels = labels;
 452         this.usedLabels = new HashSet<Label>();
 453         this.handlers = new ArrayList<Label>();
 454     }
 455 
 456     /**
 457      * Constructs a new {@link CheckMethodAdapter} object. This method adapter
 458      * will perform basic data flow checks. For instance in a method whose
 459      * signature is <tt>void m ()</tt>, the invalid instruction IRETURN, or the
 460      * invalid sequence IADD L2I will be detected.
 461      *
 462      * @param access


< prev index next >