Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Pages: [1]
Print
Author Topic: Redundant Implements directive  (Read 9715 times)
jimrobson
Courseware Beta
Newbie
***
Posts: 7


View Profile Email
« on: January 16, 2008, 05:07:18 »

In the framework code and sample applications, there seem to be some redundant "implements" directives.

For example, in the Architecture sample, the RolePanelMediator class is declared like so:

:
public class RolePanelMediator extends Mediator implements IMediator
However, Mediator implements IMediator; therefore, as I understand it, any subclass of Mediator implicitly implements IMediator. That being the case, the explicit "implements" in the subclass appears redundant. What is the rationale for including it?
Logged
Rhysyngsun
Courseware Beta
Sr. Member
***
Posts: 51

Nathan Levesque

 - rhysyngsun@gmail.com  - rhysyngsun
View Profile WWW Email
« Reply #1 on: January 16, 2008, 07:53:25 »

I think mostly for the benefit of code generation in Flex Builder, because when you have the Generate functions inherited from interface checked in the New ActionScript Class dialog it generates function that you would typically override in that class. Take, for instance, ICommand, it generates the execute method. Other than that, as you mentioned, there's no absolute need to implement the relevant interface.
Logged

puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #2 on: January 16, 2008, 08:41:22 »

Just so.

-Cliff>
Logged
Pages: [1]
Print