301 } |
301 } |
302 |
302 |
303 case JVM_CONSTANT_MethodHandle: { |
303 case JVM_CONSTANT_MethodHandle: { |
304 dos.writeByte(cpConstType); |
304 dos.writeByte(cpConstType); |
305 int value = cpool.getIntAt(ci); |
305 int value = cpool.getIntAt(ci); |
306 short refIndex = (short) extractHighShortFromInt(value); |
306 short bootstrapMethodIndex = (short) extractLowShortFromInt(value); |
307 byte refKind = (byte) extractLowShortFromInt(value); |
307 short nameAndTypeIndex = (short) extractHighShortFromInt(value); |
308 dos.writeByte(refKind); |
308 dos.writeShort(bootstrapMethodIndex); |
|
309 dos.writeShort(nameAndTypeIndex); |
|
310 if (DEBUG) debugMessage("CP[" + ci + "] = indy BSM = " + |
|
311 bootstrapMethodIndex + ", N&T = " + nameAndTypeIndex); |
|
312 break; |
|
313 } |
|
314 |
|
315 case JVM_CONSTANT_MethodType: { |
|
316 dos.writeByte(cpConstType); |
|
317 int value = cpool.getIntAt(ci); |
|
318 short refIndex = (short) value; |
309 dos.writeShort(refIndex); |
319 dos.writeShort(refIndex); |
310 if (DEBUG) debugMessage("CP[" + ci + "] = MH index = " + refIndex |
320 if (DEBUG) debugMessage("CP[" + ci + "] = MT index = " + refIndex); |
311 + ", kind = " + refKind); |
321 break; |
312 break; |
322 } |
313 } |
323 |
314 |
324 case JVM_CONSTANT_InvokeDynamic: { |
315 case JVM_CONSTANT_MethodType: { |
|
316 dos.writeByte(cpConstType); |
325 dos.writeByte(cpConstType); |
317 int value = cpool.getIntAt(ci); |
326 int value = cpool.getIntAt(ci); |
318 short refIndex = (short) value; |
327 short refIndex = (short) value; |
319 dos.writeShort(refIndex); |
328 dos.writeShort(refIndex); |
320 if (DEBUG) debugMessage("CP[" + ci + "] = MT index = " + refIndex); |
329 if (DEBUG) debugMessage("CP[" + ci + "] = MT index = " + refIndex); |