Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How come static interfaces in GWT

 
shukla raghav
Ranch Hand
Posts: 203
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have never heard of static interfaces in java. i thought top level classes and interfaces can never be static.

i visited the google site to see the widget code and i was surprised to see static interfaces. Just browse to the following url and goto source code to check the source of the wiget CheckBox.

check this out

Is this not java
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear in mind that client-side code is compiled into JavaScript. If I have to guess (and I'm guessing) I'd say it's something that allows different behavior on the JavaScript side. It might be interesting to compare the difference in JavaScript code with and without the static modifier.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic