The GWT compiler models the Java type hierarchy using JavaScript prototype chains. The _
symbol is used as a global temporary variable by the compiler and short JSNI methods. In the top scope of the generated script, you should see something like
// Define the JS constructor(s) for the type
function com___GwtEvent() {}
// Inherit methods from the supertype by prototype chain
_ = com___GwtEvent.prototype = new java_lang_Object;
// Attach polymorphically-dispatched methods to the new type
_.someInstanceMethod = function(a,b,c){.....}
// Static-dispatch methods
function $someOtherMethod(this$static, d, e) {...}
Where you see methods that have a this$static
parameter, the compiler has deduced that the Java expression instance.someOtherMethod()
is not polymorphic (possibly via type-tightening) and avoids the overhead of the intermediate symbol lookup at runtime.