KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > quilt > bytecode > LabeledNOP


1 /* LabeledNOP */
2
3 package org.quilt.bytecode;
4
5 import org.apache.bcel.generic.*;
6
7 /**
8  * An extension of the NOP which provides a label. To ease debugging.
9  */

10
11 public class LabeledNOP extends NOP {
12     private String JavaDoc label = null;
13
14     public LabeledNOP(String JavaDoc pos) {
15         label = pos;
16     }
17
18     public String JavaDoc toString(boolean verbose) {
19         if (verbose) {
20             return super.toString(true) + "\t{" + label + "}";
21         } else {
22             return super.toString(false);
23         }
24     }
25 }
26
Popular Tags