[gui] Boolean and formatting fix

David Daney ddaney@avtrex.com
Fri Oct 29 16:18:00 GMT 2004


Jerry Quinn wrote:
> Michael Koch wrote:
> 
> 
> 
> The getConstructor call doesn't have any comments about mapping Boolean.class 
> to boolean args, so I used boolean.class.  However, when calling newInstance, 
> you do have to wrap a boolean in a Boolean.  The sun docs never really talk 
> about how ambiguity between boolean and Boolean are called.
> 
Use Boolean.class when you pass Boolean.  Use Boolean.TYPE for boolean.
Presumably Boolean.TYPE == boolean.class.

I was unaware that boolean.class was even valid syntax.  You learn
something new every day.

David Daney



More information about the Java-patches mailing list