1 | class FloatCPInfo extends ConstantCPInfo {↵ | | 1 | class LongCPInfo extends ConstantCPInfo {↵
|
|
2 | /** Constructor. */↵ | | 2 | /** Constructor. */↵
|
3 | public FloatCPInfo() {↵ | | 3 | public LongCPInfo() {↵
|
4 | super(CONSTANT_FLOAT, 1);↵ | | 4 | super(CONSTANT_LONG, 2);↵
|
5 | }↵ | | 5 | }↵
|
|
6 | /**↵ | | 6 | /**↵
|
7 | * read a constant pool entry from a class stream.↵ | | 7 | * read a constant pool entry from a class stream.↵
|
8 | *↵ | | 8 | *↵
|
9 | * @param cpStream the DataInputStream which contains the constant pool↵ | | 9 | * @param cpStream the DataInputStream which contains the constant pool↵
|
10 | * entry to be read.↵ | | 10 | * entry to be read.↵
|
11 | * @exception IOException if there is a problem reading the entry from↵ | | 11 | * @exception IOException if there is a problem reading the entry from↵
|
12 | * the stream.↵ | | 12 | * the stream.↵
|
13 | */↵ | | 13 | */↵
|
14 | public void read(DataInputStream cpStream) throws IOException {↵ | | 14 | public void read(DataInputStream cpStream) throws IOException {↵
|
15 | setValue(new Float(cpStream.readFloat()));↵ | | 15 | setValue(new Long(cpStream.readLong()));↵
|
16 | }↵ | | 16 | }↵
|
|
17 | /**↵ | | 17 | /**↵
|
18 | * Print a readable version of the constant pool entry.↵ | | 18 | * Print a readable version of the constant pool entry.↵
|
19 | *↵ | | 19 | *↵
|
20 | * @return the string representation of this constant pool entry.↵ | | 20 | * @return the string representation of this constant pool entry.↵
|
21 | */↵ | | 21 | */↵
|
22 | public String toString() {↵ | | 22 | public String toString() {↵
|
23 | return "Float Constant Pool Entry: " + getValue();↵ | | 23 | return "Long Constant Pool Entry: " + getValue();↵
|
24 | } | | 24 | }
|