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.
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.
![]() |
and suggestions to improve this page to Roedy Green : | ||
| Canadian Mind Products | |||
| 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 | ||