MCPcopy Create free account
hub / github.com/ReadyTalk/avian / makeConstructorCode

Method makeConstructorCode

classpath/java/lang/reflect/Proxy.java:329–355  ·  view source on GitHub ↗
(List<PoolEntry> pool)

Source from the content-addressed store, hash-verified

327 }
328
329 private static byte[] makeConstructorCode(List<PoolEntry> pool)
330 throws IOException
331 {
332 ByteArrayOutputStream out = new ByteArrayOutputStream();
333 write2(out, 2); // max stack
334 write2(out, 2); // max locals
335 write4(out, 10); // length
336
337 write1(out, aload_0);
338 write1(out, invokespecial);
339 write2(out, ConstantPool.addMethodRef
340 (pool, "java/lang/reflect/Proxy",
341 "<init>", "()V") + 1);
342
343 write1(out, aload_0);
344 write1(out, aload_1);
345 write1(out, putfield);
346 write2(out, ConstantPool.addFieldRef
347 (pool, "java/lang/reflect/Proxy",
348 "h", "Ljava/lang/reflect/InvocationHandler;") + 1);
349 write1(out, return_);
350
351 write2(out, 0); // exception handler table length
352 write2(out, 0); // attribute count
353
354 return out.toByteArray();
355 }
356
357 private static Class makeClass(ClassLoader loader,
358 Class[] interfaces,

Callers 1

makeClassMethod · 0.95

Calls 6

addMethodRefMethod · 0.95
addFieldRefMethod · 0.95
toByteArrayMethod · 0.95
write2Method · 0.80
write4Method · 0.80
write1Method · 0.80

Tested by

no test coverage detected