How many types in Eclipse [message #290996] |
Mon, 05 September 2005 18:11  |
Eclipse User |
|
|
|
Originally posted by: michael.pacione.cis.strath.ac.uk
Hi,
Can anyone tell me how many types (i.e. interfaces and classes) there are
in Eclipse, either in the full SDK or just the platform. I'm a software
engineering researcher, and would like to give some quantifiable idea of
what constitututes a big real-world system.
http://www.eclipse.org/eclipse/development/eclipse_3_1_stats .html says
there are 11,548 Java source files and 2,425,709 lines of Java code, but
the number of types would really be most useful.
Thanks,
Michael
|
|
|
|
|
|
|
Re: How many types in Eclipse [message #291165 is a reply to message #291130] |
Fri, 09 September 2005 11:20  |
Eclipse User |
|
|
|
Originally posted by: eclipse3.rizzoweb.com
Michael Pacione wrote:
> Eric Rizzo wrote:
>
>> Depending on the research context, it may be more appropriate to only
>> count top-level classes. Imagine the GUI code, which is likely to have
>> lots of anonymous and small nested classes for event handling. Does
>> the research really want to treat an anonymous mouse click handler
>> class as separate from the larger class that contains it? I can
>> imagine that there is some kinds of research that would, but seems
>> like most times you'd want such classes lumped in with their
>> containing top-level class.
>
>
> That's a good point. I guess the key is consistency when comparing such
> measurements. It's certainly easier to count only classes at the top of
> the containment hierarchy, as this is simply the number of source files
> (~12,000 for Eclipse 3.1).
>
Actually, strictly speaking that is not correct. It is possible for a
single source file to contain more than one top-level class. The only
restriction is that a single source file can only contain one public
top-level class.
Having said that, it is probably an academic point because it is
extremely rare (and recommended against as a best practice) to see more
than one top-level class in a single source file. I don't think I've
seen it done since the JDK 1.0 days when people were just figuring out
best practices for Java coding.
HTH,
Eric
|
|
|
Powered by
FUDForum. Page generated in 0.02621 seconds