[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ms-java-com
Subject:    Re: can you extends class defined as final?
From:       Alessandro Angeli <xml () IOL ! IT>
Date:       2000-07-21 10:06:21
[Download RAW message or body]


I don't know whether the following will work:

- create a non-final dummy SafeArray (same package, same
members, same ancestors...) and drop it earlier in the
classpath than the system classes
- compile your class that extends it
- delete the dummy class

In an applet, the code checker should refuse to load a class
that extends a final class, but in an application it might
work.

Also, you can compile your class using JDK's javac, which
won't look in MS's Java packages but only in your.

Last, you can open the SafeArray class file in an hex editor
and set the final flag off.

One of those hacks might work.


----- Original Message -----
From: "Koua Xiong" <kxiong@SARK.COM>
To: <Java-COM@DISCUSS.MICROSOFT.COM>
Sent: Thursday, July 20, 2000 11:33 PM
Subject: Re: can you extends class defined as final?


> I have a COM object that passes a safearray of structs.
Unfortunately,
> there is noway of getting the data back thru methods of
the safearray.
> Thus, with the help of Ed, I was able to do so and want to
have a class,
> which in term extends SafeArray. In additional, be able to
create a
> safearray of structs and pass it back to COM.
>
>
> Koua
>
> On Thu, 20 Jul 2000 13:57:53 -0700, Giles Douglas
<giles@QUOTE.COM> wrote:
>
> >The point of final is.. that you can't extend it, so no.
> >
> >The only thing you can do is aggregate it and expose the
functionality, but
> >this isn't really (I suspect) going to help you.
> >
> >The reason it is final is for security purposes.
> >
> >What exactly are you trying to do, and why?
> >
> >Thanks,
> >
> >        Giles
> >
> >-----Original Message-----
> >From: Java and COM
[mailto:Java-COM@DISCUSS.MICROSOFT.COM]On Behalf Of
> >Koua Xiong
> >Sent: Thursday, July 20, 2000 1:56 PM
> >To: Java-COM@DISCUSS.MICROSOFT.COM
> >Subject: can you extends class defined as final?
> >
> >
> >Hi
> >
> >Is there another way to extend a class defined as FINAL?
> >
> >I try to extend SafeArray and it says that cannot extend
final class.
> >
> >thanks
> >
>
>-----------------------------------------------------------
-----
> >Users Guide
http://msdn.microsoft.com/workshop/essentials/mail.asp
> >contains important info including how to unsubscribe.
Save time, search
> >the archives at
http://discuss.microsoft.com/archives/index.html
> >
>
>-----------------------------------------------------------
-----
> >Users Guide
http://msdn.microsoft.com/workshop/essentials/mail.asp
> >contains important info including how to unsubscribe.
Save time, search
> >the archives at
http://discuss.microsoft.com/archives/index.html
>
> ----------------------------------------------------------
------
> Users Guide
http://msdn.microsoft.com/workshop/essentials/mail.asp
> contains important info including how to unsubscribe.
Save time, search
> the archives at
http://discuss.microsoft.com/archives/index.html

----------------------------------------------------------------
Users Guide http://msdn.microsoft.com/workshop/essentials/mail.asp
contains important info including how to unsubscribe.  Save time, search
the archives at http://discuss.microsoft.com/archives/index.html

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic