@Test public void abstractClasses_callToInterfaceMethodInAbstractClass() throws Exception { Files.write(TestClasses.AbstractClasses.myInterface(), new File(mTestPackageDir, "MyInterface.class")); Files.write(TestClasses.AbstractClasses.abstractImpl(), new File(mTestPackageDir, "AbstractImpl.class")); Files.write( TestClasses.AbstractClasses.realImpl(), new File(mTestPackageDir, "RealImpl.class")); run("RealImpl", "main:()V"); assertMembersLeft("MyInterface", "m:()V"); assertMembersLeft("RealImpl", "main:()V", "m:()V"); assertMembersLeft("AbstractImpl", "helper:()V"); }
public void run( @NonNull Collection<TransformInput> inputs, @NonNull Collection<TransformInput> referencedClasses, @NonNull TransformOutputProvider output, @NonNull ImmutableMap<CounterSet, KeepRules> keepRules, boolean saveState) throws IOException { output.deleteAll(); buildGraph(inputs, referencedClasses); Stopwatch stopwatch = Stopwatch.createStarted(); setCounters(keepRules); logTime("Set counters", stopwatch); writeOutput(inputs, output); logTime("Write output", stopwatch); if (saveState) { mGraph.saveState(); logTime("Saving state", stopwatch); } }
FullRunShrinker extends AbstractShrinker<T> { public void run( @NonNull Collection<TransformInput> inputs, @NonNull Collection<TransformInput> referencedClasses, @NonNull TransformOutputProvider output, @NonNull ImmutableMap<CounterSet, KeepRules> keepRules, boolean saveState) throws IOException { output.deleteAll(); buildGraph(inputs, referencedClasses); Stopwatch stopwatch = Stopwatch.createStarted(); setCounters(keepRules); logTime("Set counters", stopwatch); writeOutput(inputs, output); logTime("Write output", stopwatch); if (saveState) { mGraph.saveState(); logTime("Saving state", stopwatch); } } }
FullRunShrinker extends AbstractShrinker<T> { public void run( @NonNull Collection<TransformInput> inputs, @NonNull Collection<TransformInput> referencedClasses, @NonNull TransformOutputProvider output, @NonNull ImmutableMap<CounterSet, KeepRules> keepRules, boolean saveState) throws IOException { output.deleteAll(); buildGraph(inputs, referencedClasses); Stopwatch stopwatch = Stopwatch.createStarted(); setCounters(keepRules); logTime("Set counters", stopwatch); writeOutput(inputs, output); logTime("Write output", stopwatch); if (saveState) { mGraph.saveState(); logTime("Saving state", stopwatch); } } FullRunShrinker(
            WaitableExecutor<Void> executor,
            ShrinkerGraph<T> graph,
            Set<File> platformJars,
            ShrinkerLogger shrinkerLogger); }
FullRunShrinker extends AbstractShrinker<T> { public void run( @NonNull Collection<TransformInput> inputs, @NonNull Collection<TransformInput> referencedClasses, @NonNull TransformOutputProvider output, @NonNull ImmutableMap<CounterSet, KeepRules> keepRules, boolean saveState) throws IOException { output.deleteAll(); buildGraph(inputs, referencedClasses); Stopwatch stopwatch = Stopwatch.createStarted(); setCounters(keepRules); logTime("Set counters", stopwatch); writeOutput(inputs, output); logTime("Write output", stopwatch); if (saveState) { mGraph.saveState(); logTime("Saving state", stopwatch); } } FullRunShrinker(
            WaitableExecutor<Void> executor,
            ShrinkerGraph<T> graph,
            Set<File> platformJars,
            ShrinkerLogger shrinkerLogger); void run(
            @NonNull Collection<TransformInput> inputs,
            @NonNull Collection<TransformInput> referencedClasses,
            @NonNull TransformOutputProvider output,
            @NonNull ImmutableMap<CounterSet, KeepRules> keepRules,
            boolean saveState); }
FullRunShrinker extends AbstractShrinker<T> { public void run( @NonNull Collection<TransformInput> inputs, @NonNull Collection<TransformInput> referencedClasses, @NonNull TransformOutputProvider output, @NonNull ImmutableMap<CounterSet, KeepRules> keepRules, boolean saveState) throws IOException { output.deleteAll(); buildGraph(inputs, referencedClasses); Stopwatch stopwatch = Stopwatch.createStarted(); setCounters(keepRules); logTime("Set counters", stopwatch); writeOutput(inputs, output); logTime("Write output", stopwatch); if (saveState) { mGraph.saveState(); logTime("Saving state", stopwatch); } } FullRunShrinker(
            WaitableExecutor<Void> executor,
            ShrinkerGraph<T> graph,
            Set<File> platformJars,
            ShrinkerLogger shrinkerLogger); void run(
            @NonNull Collection<TransformInput> inputs,
            @NonNull Collection<TransformInput> referencedClasses,
            @NonNull TransformOutputProvider output,
            @NonNull ImmutableMap<CounterSet, KeepRules> keepRules,
            boolean saveState);  }