ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frank Endriss <>
Subject Re: Multiple classes in a single file (was: Re: Can someone tell me what is so great about Ant?)
Date Wed, 07 Feb 2001 18:50:47 GMT
"Richard S. Hall" wrote:
> Frank Endriss wrote:
> > Given these facts, why not make those classes inner classes of class Foo
> > ?
> > If you would, everything would work, and from view of OO design it would
> > be "nicer".
> I think this is a matter of subjective opinion.  What did you do before java supported
> inner classes?

I would have placed them into Files, one per class, package scope, since
there was
no way to give them class scope.

mfg Frank

> > If you dont make them inner classes, they have package access, what you
> > dont
> > want and and dont need, as you describe above.
> That is perhaps the best argument.
> > However, you are right in doing what you do since javac compiles it.
> > BUT: Not every compilable source is good source.
> Gee, thanks for enlightening me.  I am forever indebted.
> > Obviously it is javac. Ant calls javac telling it: compile
> > Javac does this, and produces parts of the expected results.
> > Maybe there is some lack of definition what should happen if one .java
> > produces more than one .class.
> > This leads us back to the beginning: It is bad style to....
> Blah, blah, blah.  Just because a tool works in some potentially bad and/or broken way,
> does not mean that the style is bad.  

Bad styple is if you do something what makes something less easy to use,
or work with it. Putting class Bar into does exactly this.

mfg Frank

View raw message