JDK-4030374 - Java Issue Tracker
Feb 5, 1997 ... ... constructor, you use an accessor method to read ... method may fail if the method happens to be executed by the superclass constructor.
Feb 5, 1997 ... ... constructor, you use an accessor method to read ... method may fail if the method happens to be executed by the superclass constructor.
The following is an example of a user starting a server with the specified credentials class names: Map<string, object ... error message is displayed to user).
That way the benefits of using such methods would be encouraged. Maybe have the static factory methods grouped after the constructors in the javadoc.For example, "static Integer Integer.valueOf(String)" fits this pattern and is indeed a static factory.
If a method calling AClass.giveMeANumber() was expecting a Number object, I see no objection to giving it an Integer object.ADVANTAGE IN THE java.text.Format.parseObject(String) METHOD: The java.text.NumberFormat.parse(String) method is implemented as below