> The original proposal goes further. Besides the String and > primitive types, any class that has a String-constructor > is acceptable (Like File and StringReader to name a few), so > the following setters are acceptable:
Yep.. That's the nice ting about using the String parameter constructor of the object. > 1. setFoo(String) -> use String value > 2. setFoo(primitive) -> cast String value to primitive and > use it > 3. setFoo(SomeObject) -> See below > > SomeObject is allowed under the following conditions: > 1. it has a single-argument String-constructor or, > 2. it has a single-argument primitive-constructor or, Actually, we could just support first class objects with this as there are object wrappers for primitives that have String constructors.. :) Simplifies life. > 3. it has a single-argument constructor with the type > File or URL (Which is constructed using the String > value) Covered by 1, no?
