On Tue, Nov 16, 1999 at 09:25:22AM -0600, Moses DeJong wrote:
>
> Well, Jacl 1.2.5 already includes a java::import command
> so your java::import command would conflict.
Sorry, I didn't make this clear -- this is implemented as an
extra option for the existing java::import. The current behaviour
is retained, but if the '-statics' flag is used, an extra command
is created for each class.
The per-class command is actually implemented in Java. It checks
if it has been invoked with one argument and, if so, if this
argument refers to a reflected java object. If so, it implements
casting behaviour, otherwise it attempts to call a static method.
> Could you provide some more info about what additional
> features your changes will provide and the pros and cons
> of your modifications?
The main feature is a (potentially substantial) improvement in
the tidyness of TclJava code which uses large numbers of casts
and static methods. It's possible that there could also be a
speed improvement given a clever implementation, but this would
be minor -- code clarity is the main aim.
Against, it means creating more commands in the Tcl interpretter
(although any serious TclJava application will have quite a few
object-reflection commands anyway). You might also argue that
having a single command which can be used both for casting and
calling static methods is a little confusing (but it seems to work
quite well in practice).
Thomas.
----------------------------------------------------------------
The TclJava mailing list is sponsored by Scriptics Corporation.
To subscribe: send mail to [EMAIL PROTECTED]
with the word SUBSCRIBE as the subject.
To unsubscribe: send mail to [EMAIL PROTECTED]
with the word UNSUBSCRIBE as the subject.
To send to the list, send email to '[EMAIL PROTECTED]'.