lopezio / wosaic

Automatically exported from code.google.com/p/wosaic
GNU General Public License v2.0
2 stars 0 forks source link

Enforce encapsulation through public/private members #3

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I was going through the code (to add javadoc comments for public members),
and saw a few public data members that don't neccessarily need to be
public.  These are data members that shouldn't be changed by any other
entity, so we should probably make them private.

The example I first came across was "imagesReceived" in the Controller
class.  Actually, this particular member is initialized, but then never
used by any other source.  It may be a relic of some previous implementation.

I'll post more "encapsulation candidates" as I come across them.

Original issue reported on code.google.com by swegn...@gmail.com on 21 Nov 2007 at 5:33

GoogleCodeExporter commented 9 years ago
Another "breach of encapsulation" I've come across is direct references to
Wosaic.TARGET field in some of the source plugins.

First of all, this should be an option that can be set by the user, so we 
shouldn't
have a defined constant.  Secondly, if a plugin needs a reference to it, then 
the
reference should be passed in the constructor-- not directly.

Original comment by swegn...@gmail.com on 28 Feb 2008 at 6:15

GoogleCodeExporter commented 9 years ago
As this is on-going, I'm changing the status to "Started".  At this point,
encapsulation is pretty good.

Original comment by swegn...@gmail.com on 12 Mar 2008 at 6:03