[jsword-devel] ActionFactory

DM Smith dmsmith555 at yahoo.com
Sun Jun 6 20:40:47 MST 2004

There are several different signatures of ActionPerformed.

I think that this method can be put in ActionFactory:
public void actionPerformed(ActionEvent e, Object caller)

I don't think that the code will have problems if the methods it calls 
via reflection are public. I had problems with the reflection before 
caller was added.

As to whether they should be public, they should not be. But, we often 
have to do otherwise to improve the code in general. (Where is C++'s 
friend mechanism to limit collaborations when you need it!)

Perhaps it would be best to put a general comment in the class files 
stating that it should be non public. I have seen many ways to do this 
on a per method basis:
/* non */ public void doit()
/* private */ public void doit()

Joe Walker wrote:

> Hi,
> Is there any reason why we shouldn't promote the actionPerformed method 
> that is implemented many times in the children of ActionFactory to 
> ActionFactory itself?
> The only implication that I can see is that the methods called by 
> ActionFactory would need to be public and not protected, but this would 
> enable us to get rid of a far bit of code by using ActionFactory directly.
> Or did I miss something?
> Joe.
> _______________________________________________
> jsword-devel mailing list
> jsword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/jsword-devel

More information about the jsword-devel mailing list