1.1 --- a/boot/src/main/java/org/apidesign/html/boot/impl/JsClassLoader.java Tue Jun 25 15:34:37 2013 +0200
1.2 +++ b/boot/src/main/java/org/apidesign/html/boot/impl/JsClassLoader.java Tue Jun 25 21:09:48 2013 +0200
1.3 @@ -39,6 +39,7 @@
1.4 import org.objectweb.asm.Type;
1.5 import org.objectweb.asm.signature.SignatureReader;
1.6 import org.objectweb.asm.signature.SignatureVisitor;
1.7 +import org.objectweb.asm.signature.SignatureWriter;
1.8
1.9 /**
1.10 *
1.11 @@ -277,16 +278,21 @@
1.12 }
1.13
1.14 @Override
1.15 + public SignatureVisitor visitArrayType() {
1.16 + if (nowReturn) {
1.17 + throw new IllegalStateException("Not supported yet");
1.18 + }
1.19 + loadObject();
1.20 + return new SignatureWriter();
1.21 + }
1.22 +
1.23 + @Override
1.24 public void visitClassType(String name) {
1.25 if (nowReturn) {
1.26 returnType = Type.getObjectType(name);
1.27 return;
1.28 }
1.29 - FindInMethod.super.visitInsn(Opcodes.DUP);
1.30 - FindInMethod.super.visitIntInsn(Opcodes.SIPUSH, index);
1.31 - FindInMethod.super.visitVarInsn(Opcodes.ALOAD, index + offset);
1.32 - FindInMethod.super.visitInsn(Opcodes.AASTORE);
1.33 - index++;
1.34 + loadObject();
1.35 }
1.36
1.37 @Override
1.38 @@ -294,7 +300,14 @@
1.39 nowReturn = true;
1.40 return this;
1.41 }
1.42 -
1.43 +
1.44 + private void loadObject() {
1.45 + FindInMethod.super.visitInsn(Opcodes.DUP);
1.46 + FindInMethod.super.visitIntInsn(Opcodes.SIPUSH, index);
1.47 + FindInMethod.super.visitVarInsn(Opcodes.ALOAD, index + offset);
1.48 + FindInMethod.super.visitInsn(Opcodes.AASTORE);
1.49 + index++;
1.50 + }
1.51
1.52 }
1.53 SV sv = new SV();