Constructor Docs, Factory Finder Constructor Docs, Factory Finder
home Student Projects no local find frame, full screen Google search web for topic jump to footer translate with Babelfish by Roedy Green ©1996-2008 Canadian Mind Products
This essay is about a suggested student project in Java programming. This essay gives a rough overview of how it might work. It does not describe an actual complete program. I have no source, object, specifications, file layouts or anything else useful to implementing this project. Everything I have to say to help you with this project is written below. I am not prepared to help you implement it; I have too many other projects of my own.

I do contract work for a living, which could include writing a program such as this. However, I don’t do people’s homework for them. That just robs them of an education.

You have my full permission to implement this project any way you please.

This project is less pressing now the that Sun’s Javadoc has a USE button.

In theory, you could tackle this project without even writing any Java code. The problem is private constructors. If a constructor is private, how are you supposed to create such an object? There will be a factory method somewhere. Unfortunately Sun usually fails to document this on the private constructor.

For all private constructors in the Java core classes, compose a list of factory methods for creating such an object.

If you want to tackle something even bigger, also add all the public constructors, and write a viewer so you can browse the classes and instantly see all the ways to create such an object.

If you want to tackle something bigger still, create a list so that you can look up a class, and see immediately all the possible methods that might take such an object as a parameter.

Obviously maintaining such a list would be an enormous amount of work. You would be best to write a Doclet to extract the necessary information automatically for your viewers.


CMP_homejump to top
CMP logo
feedback Please email your feedback for publication, errors, omissions, broken/redirected link reports
and suggestions to improve this page to Roedy Green : feedback email
made with CSS
HTML Checked!
ICRA ratings logo
mindprod.com IP:[65.110.21.43]
Your face IP:[38.103.63.17] The information on this page is for non-military use only.
You are visitor number 3,602. Military use includes use by defence contractors.
You can get a fresh copy of this page from: or possibly from your local J: drive (Java virtual drive/Mindprod website mirror)
http://mindprod.com/project/constructordocs.html J:\mindprod\project\constructordocs.html