public class ImplementClassLiteralsAsFields extends Object
ControlFlowAnalyzer
depends on this.
Class literals are implemented as static field references. The static fields are all put into the special com.google.gwt.lang.ClassLiteralHolder class. Ordinarily, accessing one of these fields would trigger a clinit to run, but we've special-cased class literal fields to evaluate as top-level code before the application starts running to avoid the clinit. Class literal factory methods are responsible for installing references to themselves on the Object.clazz field of their JS runtime prototype since getClass() is no longer an overridden method. Prototypes can be looked up via 'seedId' from the global seedTable object, and so each class literal factory method is passed the seedId of its type.
Modifier and Type | Method and Description |
---|---|
static void |
exec(JProgram program) |
public static void exec(JProgram program)
Copyright © 2018. All rights reserved.