This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gui] Boolean and formatting fix


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]