Juozas,

Thanks for your continued thinking on this dude.

>Hi,
>ProxyGeneratorImpl and ClientClassAltrmiFactory use diferent ClassLoaders .
>We need to call "generate" in ClientClassAltrmiFactory not in ants task.
>I see BCEL is not very useful for ARMI if we are going to support only
>interfaces.
>
<skip/>

I don't think that java.lang.reflect.Proxy is good enough for us.  Why?
1) A scripting env like the excellent BeanShell cannot query the exposed 
methods and invoke them.
2) As we are not delegating immediately to a ral impl, we cannot have a 
single catch/throws block that suits all scenarios.

If it were not for that it would be a good solution.

BCEL almost certainly is (one of) the right tools to dynamic make 
proxies, the problem is it is Brain-Surgery to use.  Anyone that can 
actually use it to make a proxy of the type we find easy via our javac 
route would be a god.

I dream of a bytecode generator that allows me some natural java-like 
construction :

  JMethod ap = new JMethod("actionPerformed");
  ap.addArg("event", ActionEvent.class);
  ap.setVoidReturn(); // maybe this a default.

  InstructionList il = ap.getInstructionList();
  Var txtVar = new NewVar(String,"txt");
  ir.add(new JInstruction(txtVar, "event","toString"));
  ir.add(new JInstruction(System.out, "println", txtVar));
  ap.generate();

Regards,

- Paul


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to