ImmutableMap<String, String> generateParseInfo(String javaPackage, String javaClassNameSource) {
    resetErrorReporter();
    // TODO(lukes): see if we can enforce that globals are provided at compile time here. given that
    // types have to be, this should be possible.  Currently it is disabled for backwards
    // compatibility
    // N.B. we do not run the optimizer here for 2 reasons:
    // 1. it would just waste time, since we are not running code generation the optimization work
    //    doesn't help anything
    // 2. it potentially removes metadata from the tree by precalculating expressions. For example,
    //    trivial print nodes are evaluated, which can remove globals from the tree, but the
    ParseResult result = parse(passManagerBuilder().allowUnknownGlobals().optimize(false));
    throwIfErrorsPresent();

    SoyFileSetNode soyTree = result.fileSet();
    TemplateRegistry registry = result.registry();

    // Do renaming of package-relative class names.
    ImmutableMap<String, String> parseInfo =
        new GenerateParseInfoVisitor(javaPackage, javaClassNameSource, registry, typeRegistry)
            .exec(soyTree);
    throwIfErrorsPresent();
    reportWarnings();
    return parseInfo;
  }
ImmutableMap < String , String > generateParseInfo ( String javaPackage , String javaClassNameSource ) { resetErrorReporter ( ) ; ParseResult result = parse ( passManagerBuilder ( ) . allowUnknownGlobals ( ) . optimize ( false ) ) ; throwIfErrorsPresent ( ) ; SoyFileSetNode soyTree = result . fileSet ( ) ; TemplateRegistry registry = result . registry ( ) ; ImmutableMap < String , String > parseInfo = new GenerateParseInfoVisitor ( javaPackage , javaClassNameSource , registry , typeRegistry ) . exec ( soyTree ) ; throwIfErrorsPresent ( ) ; reportWarnings ( ) ; return parseInfo ; }
Generates Java classes containing parse info (param names, template names, meta info). There
will be one Java class per Soy file.

@param javaPackage The Java package for the generated classes.
@param javaClassNameSource Source of the generated class names. Must be one of "filename",
"namespace", or "generic".
@return A map from generated file name (of the form "<*>SoyInfo.java") to generated file
content.
@throws SoyCompilationException If compilation fails.