/** * Invalidates the given source type name, so the next rebind request will generate a type again. */ public void invalidateRebind(String sourceTypeName) { checkForModuleSpace(); rebindOracle.invalidateRebind(sourceTypeName); }
@Override public String rebind(TreeLogger logger, String typeName) throws UnableToCompleteException { return rebind(logger, typeName, null); }
public void onModuleReady(ModuleSpace readySpace) throws UnableToCompleteException { this.space = readySpace; Event moduleSpaceHostReadyEvent = SpeedTracerLogger.start(DevModeEventType.MODULE_SPACE_HOST_READY); try { // Establish an environment for JavaScript property providers to run. // ModuleSpacePropertyOracle propOracle = new ModuleSpacePropertyOracle( module.getProperties(), module.getActiveLinkerNames(), readySpace); // Set up the rebind oracle for the module. // It has to wait until now because we need to inject javascript. // Deque<Rule> rules = module.getRules(); PrecompileTaskOptionsImpl options = new PrecompileTaskOptionsImpl(); options.setGenDir(genDir); CompilerContext compilerContext = new CompilerContext.Builder().module(module).options( options).build(); StandardGeneratorContext genCtx = new StandardGeneratorContext(compilerContext, compilationState, new ArtifactSet(), false); // Only enable generator result caching if we have a valid rebindCache genCtx.setGeneratorResultCachingEnabled(rebindCache != null); rebindOracle = new StandardRebindOracle2(propOracle, rules, genCtx); rebindOracle.setRebindCache(rebindCache); } finally { moduleSpaceHostReadyEvent.end(); } }
public void onModuleReady(ModuleSpace readySpace) throws UnableToCompleteException { this.space = readySpace; Event moduleSpaceHostReadyEvent = SpeedTracerLogger.start(DevModeEventType.MODULE_SPACE_HOST_READY); try { // Establish an environment for JavaScript property providers to run. // ModuleSpacePropertyOracle propOracle = new ModuleSpacePropertyOracle( module.getProperties(), module.getActiveLinkerNames(), readySpace); // Set up the rebind oracle for the module. // It has to wait until now because we need to inject javascript. // Deque<Rule> rules = module.getRules(); PrecompileTaskOptionsImpl options = new PrecompileTaskOptionsImpl(); options.setGenDir(genDir); CompilerContext compilerContext = new CompilerContext.Builder().module(module).options( options).build(); StandardGeneratorContext genCtx = new StandardGeneratorContext(compilerContext, compilationState, new ArtifactSet(), false); // Only enable generator result caching if we have a valid rebindCache genCtx.setGeneratorResultCachingEnabled(rebindCache != null); rebindOracle = new StandardRebindOracle2(propOracle, rules, genCtx); rebindOracle.setRebindCache(rebindCache); } finally { moduleSpaceHostReadyEvent.end(); } }
@Override public String rebind(TreeLogger logger, String typeName) throws UnableToCompleteException { return rebind(logger, typeName, null); }
/** * Invalidates the given source type name, so the next rebind request will generate a type again. */ public void invalidateRebind(String sourceTypeName) { checkForModuleSpace(); rebindOracle.invalidateRebind(sourceTypeName); }
public String rebind(TreeLogger logger, String sourceTypeName) throws UnableToCompleteException { synchronized (rebindLock) { checkForModuleSpace(); return rebindOracle.rebind(logger, sourceTypeName, new ArtifactAcceptor() { public void accept(TreeLogger logger, ArtifactSet newlyGeneratedArtifacts) throws UnableToCompleteException { artifactAcceptor.accept(logger, newlyGeneratedArtifacts); } }); } }
public String rebind(TreeLogger logger, String sourceTypeName) throws UnableToCompleteException { synchronized (rebindLock) { checkForModuleSpace(); return rebindOracle.rebind(logger, sourceTypeName, new ArtifactAcceptor() { public void accept(TreeLogger logger, ArtifactSet newlyGeneratedArtifacts) throws UnableToCompleteException { artifactAcceptor.accept(logger, newlyGeneratedArtifacts); } }); } }