D
David N. Welton
Hello,
I have the distinct suspicion this is a FAQ, however I'm not sure what
terms to search on.
The problem: I want to have a class - let's call it HttpRequest.
However, the low level details differ in the implementation of the code
behind the class for j2me and j2se. I would like to be able to have
other code that calls a method in HttpRequest and doesn't care what is
underneath, and therefore "runs everywhere".
It seems that standard Java offers a number of fancy techniques to do
the above. Even j2me apparently lets you do stuff like this:
c = Class.forName("javax.microedition.io.HttpConnection");
However, ideally it would be nice to do everything at compile time, so
as to save space in the j2me version of the code, as well as just
keeping things simpler.
Is it possible to do so without resorting to some sort of macro system?
Thankyou,
--
David N. Welton
- http://www.dedasys.com/davidw/
Apache, Linux, Tcl Consulting
- http://www.dedasys.com/
I have the distinct suspicion this is a FAQ, however I'm not sure what
terms to search on.
The problem: I want to have a class - let's call it HttpRequest.
However, the low level details differ in the implementation of the code
behind the class for j2me and j2se. I would like to be able to have
other code that calls a method in HttpRequest and doesn't care what is
underneath, and therefore "runs everywhere".
It seems that standard Java offers a number of fancy techniques to do
the above. Even j2me apparently lets you do stuff like this:
c = Class.forName("javax.microedition.io.HttpConnection");
However, ideally it would be nice to do everything at compile time, so
as to save space in the j2me version of the code, as well as just
keeping things simpler.
Is it possible to do so without resorting to some sort of macro system?
Thankyou,
--
David N. Welton
- http://www.dedasys.com/davidw/
Apache, Linux, Tcl Consulting
- http://www.dedasys.com/