Map < String , ProvidedName > collectProvidedNames ( Node externs , Node root ) { if ( this . providedNames . isEmpty ( ) ) { // goog is special-cased because it is provided in Closure's base library. providedNames . put ( GOOG , new ProvidedName ( GOOG , null , null , false /* implicit */ , false ) ) ; NodeTraversal . traverseRoots ( compiler , new CollectDefinitions ( ) , externs , root ) ; } return this . providedNames ; }
Collects all goog . provides in the given namespace and warns on invalid code