Ah...some confusion....

I meant an operation in an interface. We could not generate a useful method
body, becuase the generator don't know anything about the semantic of this
operation. For instance a generated method looks like:

public void operation1(){

}

To force the developer to implement this method with a useful body we can
mark this method as abstract in the abstract implementation. This class
should not manually changed.

The compiler is not amused if the abstract class is not implemented in the
base class. This class is marked as red.
This is one solution. So in the abstract class is only an empty method .

The solution Istvan posted is to ignore such operations in the abstract
class. The compiler fails too, and force the developer to implement this
method.
Here no empty method is generated in the abstract implementation class. But
the developer must look into the interface to see the full api of this
class, because the abstract class is incomplete.

Both solution are pragmatic. We should only decide how we handle this. This
behaviour would be implented in the JavaBasic Cartridge.

Thorsten

On 5/18/07, Istvan Boscha <[EMAIL PROTECTED]> wrote:


Hi,

having the default impl in the abstract class will be in my opinion
confusing for the user, because he will not see what operations should be
implemented only if he looks at the abstract class......by default he
should
only open/work with the base class in my understanding. And what happens
if
somebody extends the generated abstract class manually and all the methods
have def impl already?


thanx,
istvan

>From: Darius Jockel <[EMAIL PROTECTED]>
>Reply-To: [email protected]
>To: [email protected]
>Subject: Re: [Fornax-developer] [Cartridges: JavaBasic] Should methods
>defindedin an Inte
>Date: Fri, 18 May 2007 02:06:46 -0700 (PDT)
>
>
>
>
>dhol68 wrote:
> >
> > Hi,
> > ...maybe i'm missing something, but why define the interface ops in
the
> > abstract class? Just do nothing with them in the abstract class and
>create
> > a
> > default implementation in the baseclass.....the interface def will
>enforce
> > an implementation anyway in the base class and the defualt imple we
need
> > it
> > to be able to compile the stuff...
> >
>
>Yes, this is a good point. We need a default impl to be able to compile.
>But
>why
>we generate the default implementation not in the abstract class?
>If you want you can overwrite them in the manual-base class.
>This keeps the manual-base class as small as possible.
>On the other hand, with this approach, the manual-base class contains
only
>manuall writen (customized) code.
>
>But, in fact, I can live with bouth solutions ;-)
>
>Regards
>Darius
>--
>View this message in context:
>
http://www.nabble.com/-Cartridges%3A-JavaBasic--Should-methods-definded-in-an-Interface-be-abstract-in-the-AbstractClass--tf3768454s17564.html#a10678701
>Sent from the Fornax-Platform mailing list archive at Nabble.com.
>
>
>-------------------------------------------------------------------------
>This SF.net email is sponsored by DB2 Express
>Download DB2 Express C - the FREE version of DB2 express and take
>control of your XML. No limits. Just data. Click to get it now.
>http://sourceforge.net/powerbar/db2/
>_______________________________________________
>Fornax-developer mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/fornax-developer

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Fornax-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fornax-developer




--
Thorsten Kamann
Software-Architect, Consultant, Coaching
Germany, NRW

Business:
itemis products and solutions GmbH & Co. KG
Heinrichstraße 51
44536 Lünen

Rechtlicher Hinweis:
Amtsgericht Dortmund, HRA 15841
P.h.G.:
Komplementär: itemis management GmbH, Amtsgericht Dortmund HRB 18939
Geschäftsführer Jürgen Rödl

Personal:
[EMAIL PROTECTED]
http://www.thorsten-kamann.de/
callto://thorque

Fornax-Platform - Platform for developing MDSD-related Tools and components
http://www.fornax-platform.org/
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Fornax-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fornax-developer

Reply via email to