aspectclass interface/target idea

Steve Conover <[email protected]> Mon, 3 Mar 2003 08:03:05 -0800 (PST)
Newsgroups gmane.comp.java.nanning.devel
Message-ID <[email protected]>
About this main target problem...I think our discussion left off with
Jon saying that making it so the main target didn't have to implement
the aspectClass's interface was too EJB-ish.  

The fundamental challenge is to get people to fulfill their contracts. 
OTOH, since we have these mixins, it seems a little strange to force
the main target class to implement ALL methods of the main aspectClass
interface.  

So any methods defined by the aspectClass's interface should be
implemented by a target (and maybe you could even go further and say
"should be implemented once and only once").  Couldn't we have some
sort of static check when Nanning is first loading these classes, to
makes sure the target classes actually do implement all necessary
methods?

Of course, you could get around this and swap out your targets later on
- that is unless we test the new target class to make sure it
implements the same methods as the old one.  Does anyone think this
behaviour would be too restrictive?  I don't think it would have much
of a performance impact.  You wouldn't really catch problems at compile
time, but you'd almost certainly see them at the beginning of runtime.

Another idea - you could choose between the current behavior and the
behavior I'm proposing.  Maybe not realistic given the implications,
I'm not sure.

-Steve

__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf