[3368] in java-interest

home help back first fref pref prev next nref lref last post

Re: Overload New

daemon@ATHENA.MIT.EDU (Daniel Nofal)
Thu Nov 9 12:10:19 1995

Date: Wed, 8 Nov 1995 04:39:16 -0300
To: java-interest@java.Eng.Sun.COM
From: Daniel Nofal <daniel@nofal.publi.com>

>Hi Gang.  Porting some Sun C++ product code and need to somehow simulate or
>implement overloading of new and delete operators.
>We have a piece of code typed DataUnit that can store "all" datatypes, thus
>each simple and compound datatype has a different "new" method.
>
>How do I do this in Java?

I think that the only way to do it is the Smalltalk way :-)

Just make everything you want to handle with DataUnit a subclass of an
abstract object type.

---------------------------------------------------------------
Daniel Nofal                            Fax: 54-1 815-3149
Buenos Aires, Argentina                 daniel@nofal.publi.com

-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post