116 |
116 |
117 protected void writeConstantPool() { |
117 protected void writeConstantPool() { |
118 ConstantPool pool = classFile.constant_pool; |
118 ConstantPool pool = classFile.constant_pool; |
119 int size = pool.size(); |
119 int size = pool.size(); |
120 out.writeShort(size); |
120 out.writeShort(size); |
121 try { |
121 for (CPInfo cpInfo: pool.entries()) |
122 for (int i = 1; i < size; ) { |
122 constantPoolWriter.write(cpInfo, out); |
123 i += constantPoolWriter.write(pool.get(i), out); |
|
124 } |
|
125 } catch (ConstantPoolException e) { |
|
126 throw new Error(e); // ?? |
|
127 } |
|
128 } |
123 } |
129 |
124 |
130 protected void writeFields() throws IOException { |
125 protected void writeFields() throws IOException { |
131 Field[] fields = classFile.fields; |
126 Field[] fields = classFile.fields; |
132 out.writeShort(fields.length); |
127 out.writeShort(fields.length); |