Examples of TypeOracle


Examples of com.google.gwt.core.ext.typeinfo.TypeOracle

* Java reflection on GWT client side.
*/
public class AssetEditorFactoryGenerator extends Generator {
    public String generate( TreeLogger logger, GeneratorContext context,
                            String requestedClass ) throws UnableToCompleteException {
        TypeOracle typeOracle = context.getTypeOracle();

        JClassType objectType = typeOracle.findType( requestedClass );
        if ( objectType == null ) {
            logger.log( TreeLogger.ERROR, "Could not find type: "
                    + requestedClass );
            throw new UnableToCompleteException();
        }
View Full Code Here

Examples of com.google.gwt.dev.javac.typemodel.TypeOracle

    allRootTypes.addAll(JProgram.INDEX_TYPES_SET);
    /*
     * Add all SingleJsoImpl types that we know about. It's likely that the
     * concrete types are never explicitly referenced.
     */
    TypeOracle typeOracle = rpo.getCompilationState().getTypeOracle();
    for (com.google.gwt.core.ext.typeinfo.JClassType singleJsoIntf : typeOracle
        .getSingleJsoImplInterfaces()) {
      allRootTypes.add(typeOracle.getSingleJsoImpl(singleJsoIntf).getQualifiedSourceName());
    }

    Memory.maybeDumpMemory("CompStateBuilt");

    JProgram jprogram = new JProgram();
    JsProgram jsProgram = new JsProgram();

    try {
      // (2) Assemble the Java AST.
      UnifyAst unifyAst = new UnifyAst(jprogram, jsProgram, options, rpo);
      unifyAst.addRootTypes(allRootTypes);
      // TODO: move this into UnifyAst?
      findEntryPoints(logger, rpo, declEntryPts, jprogram);
      unifyAst.exec(logger);

      List<String> finalTypeOracleTypes = Lists.create();
      if (precompilationMetrics != null) {
        for (com.google.gwt.core.ext.typeinfo.JClassType type : typeOracle.getTypes()) {
          finalTypeOracleTypes =
              Lists.add(finalTypeOracleTypes, type.getPackage().getName() + "." + type.getName());
        }
        precompilationMetrics.setFinalTypeOracleTypes(finalTypeOracleTypes);
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.