Puts the bytecode of this method in the given byte vector. @param out the byte vector into which the bytecode of this method must be copied.
(final ByteVector out)
| 1192 | */ |
| 1193 | |
| 1194 | final void put (final ByteVector out) { |
| 1195 | out.put2(access).put2(name.index).put2(desc.index); |
| 1196 | int attributeCount = 0; |
| 1197 | if (code.length > 0) { |
| 1198 | ++attributeCount; |
| 1199 | } |
| 1200 | if (exceptionCount > 0) { |
| 1201 | ++attributeCount; |
| 1202 | } |
| 1203 | if ((access & Constants.ACC_SYNTHETIC) != 0) { |
| 1204 | ++attributeCount; |
| 1205 | } |
| 1206 | if ((access & Constants.ACC_DEPRECATED) != 0) { |
| 1207 | ++attributeCount; |
| 1208 | } |
| 1209 | out.put2(attributeCount); |
| 1210 | if (code.length > 0) { |
| 1211 | int size = 12 + code.length + 8 * catchCount; |
| 1212 | if (localVar != null) { |
| 1213 | size += 8 + localVar.length; |
| 1214 | } |
| 1215 | if (lineNumber != null) { |
| 1216 | size += 8 + lineNumber.length; |
| 1217 | } |
| 1218 | out.put2(cw.newUTF8("Code").index).put4(size); |
| 1219 | out.put2(maxStack).put2(maxLocals); |
| 1220 | out.put4(code.length).putByteArray(code.data, 0, code.length); |
| 1221 | out.put2(catchCount); |
| 1222 | if (catchCount > 0) { |
| 1223 | out.putByteArray(catchTable.data, 0, catchTable.length); |
| 1224 | } |
| 1225 | attributeCount = 0; |
| 1226 | if (localVar != null) { |
| 1227 | ++attributeCount; |
| 1228 | } |
| 1229 | if (lineNumber != null) { |
| 1230 | ++attributeCount; |
| 1231 | } |
| 1232 | out.put2(attributeCount); |
| 1233 | if (localVar != null) { |
| 1234 | out.put2(cw.newUTF8("LocalVariableTable").index); |
| 1235 | out.put4(localVar.length + 2).put2(localVarCount); |
| 1236 | out.putByteArray(localVar.data, 0, localVar.length); |
| 1237 | } |
| 1238 | if (lineNumber != null) { |
| 1239 | out.put2(cw.newUTF8("LineNumberTable").index); |
| 1240 | out.put4(lineNumber.length + 2).put2(lineNumberCount); |
| 1241 | out.putByteArray(lineNumber.data, 0, lineNumber.length); |
| 1242 | } |
| 1243 | } |
| 1244 | if (exceptionCount > 0) { |
| 1245 | out.put2(cw.newUTF8("Exceptions").index).put4(2 * exceptionCount + 2); |
| 1246 | out.put2(exceptionCount); |
| 1247 | for (int i = 0; i < exceptionCount; ++i) { |
| 1248 | out.put2(exceptions[i]); |
| 1249 | } |
| 1250 | } |
| 1251 | if ((access & Constants.ACC_SYNTHETIC) != 0) { |
no test coverage detected