Hi,
of course you can not instantantiate a class with abstract methods.
You can and should provide a constructor, however.
Cheers
Markus
> Von: Stephen Colebourne [mailto:[EMAIL PROTECTED]]
> Gesendet: Freitag, 29. M�rz 2002 19:20
> An: [EMAIL PROTECTED]
> Betreff: Instantiating an abstract class
>
>
> Hi,
> I would like to be able to define a class as abstract so I
> only have to
> define the method signatures. (BCEL would then be used to generate the
> implementations). However, I would also like to be able to
> instantiate the
> class using the standard new operator (This must work in a
> standard IDE,
> like Eclipse). From what I have seen so far its impossible (I
> will have to
> use a factory), but have I missed something? Any other bright ideas?
Hi,
I think it is nothing bad to use factory, and in the most cases it is
better.
Factory design pattern very useful for refactoring, in situation like you
have desktop application and need to make it distributed. Change
factory method and it become distributed or persistent.
I use factory then possible.
You can review code from simplestore and add it to BCEL utils. I think this
code is more useful
in BCEL project, not for persistence framework. It is some kind of
alternatyve for standard Proxy
generator, but it can extend user defined class, implement abstract methods
or override super methods.
this code is in commons-sandbox/simplestore tools package.
It can define class in any classloader and it is no problems to use it in
IDE.
>
> Stephen
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>