Helper classes (original) (raw)
Per Bothner per at bothner.com
Mon Apr 15 10:41:05 PDT 2013
- Previous message: Helper classes
- Next message: Helper classes
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 04/15/2013 10:13 AM, Zhong Yu wrote:
But in the two examples provided by you, there are a too many factory methods, maybe they do belong to a separate class. Just from the javadoc point of view, it doesn't feel right to say "this is an interface of something; and by the way, a dozen of factory methods are defined here too"
OTOH, a traditional factory method is basically a "smart constructor", and it is reasonable to document factory methods in the same place we document constructors - i.e. with the class or interface being constructed.
--Per Bothner
per at bothner.com http://per.bothner.com/
- Previous message: Helper classes
- Next message: Helper classes
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]