Lists Home |
Date Index |
On Wednesday 23 October 2002 09:47, email@example.com wrote:
> OTOH, more dynamic languages will allow you to simply query the class
> and you can dispense with the IDL as its information can be
> automatically generated by interrogation.
With Java, as long as you have a Java interface declared, you can at least
dispense with the stubs by using a Proxy.
The Proxy stuff in Java rocks my world. I used it to define my own RMI-like
protocol, for example.
But it's a shame I can't use Java reflection to dynamically *make* an
interface, I have to write out Java source then compile it then put it in the
classpath then Class.forName () it to do that. A bit clunky. I could probably
learn the format of bytecode and write a class that directly generates the
bytecode in a byte array and uses the classloader to turn that into a class,
but it'd be nice if it was just there because then I could dynamically
However, only code that used reflection to call methods could actually use
those interfaces since any other code would need to have been compiled
against the interface. But then again that does kind of make sense.
A city is like a large, complex, rabbit