[3358] in java-interest

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

Re: Overload New

daemon@ATHENA.MIT.EDU (Arthur van Hoff)
Wed Nov 8 23:45:06 1995

From: Arthur.Vanhoff@Eng.Sun.COM (Arthur van Hoff)
To: Joseph.Wishner@West.Sun.COM (Joseph Wishner SunSoft ENP 206-889-1343)
Date: Wed, 8 Nov 1995 18:23:47 -0800 (PST)
Cc: java-interest@webrunner.neato.org (java)
In-Reply-To: <9511081640.AA07077@orca.West.Sun.COM> from "Joseph Wishner SunSoft ENP 206-889-1343" at Nov 8, 95 08:40:22 am


Hi Jospeph,

> 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'm not exactly sure whether I understand the question. You can overload
the new operator in Java so that should not be the problem. You can
always declare several static method that do the right thing can call
the directly. Does that answer your question?

Have fun,

	Arthur van Hoff (avh@eng.sun.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