Set<String> allRootTypes = Sets.newHashSet();
compiler.jprogram = new JProgram(new MinimalRebuildCache());
Map<String, String> runtimeRebindRuleSourcesByShortName =
RuntimeRebindRuleGenerator.RUNTIME_REBIND_RULE_SOURCES_BY_SHORT_NAME;
Rules rules = new Rules();
RuleFail ruleFail = new RuleFail();
ruleFail.getRootCondition().getConditions().add(new ConditionWhenPropertyIs("foo", "bar"));
rules.prepend(ruleFail);
rules.prepend(new RuleGenerateWith(Generator.class));
RuleReplaceWith ruleReplaceCanvas = new RuleReplaceWith("WebkitCanvasElement");
ruleReplaceCanvas.getRootCondition()
.getConditions().add(new ConditionWhenTypeIs("CanvasElement"));