You're pretty well limited to File.
http://docs.oracle.com/javase/6/docs/api/javax/tools/StandardJavaFileManager.html
If we wanted to deal with something else, we'd be dealing with temp
files
and deleteOnExit and all that.


On Thu, May 30, 2013 at 11:18 PM, Christian Edward Gruber <
notifications@github.com> wrote:

> In
> src-subject/src/main/java/com/google/auto/factory/gentest/JavaSourceSubject.java:
>
> > +import org.truth0.FailureStrategy;
> > +import org.truth0.subjects.Subject;
> > +
> > +import com.google.common.collect.ImmutableList;
> > +import com.google.common.collect.ImmutableSet;
> > +import com.sun.source.tree.CompilationUnitTree;
> > +import com.sun.source.util.JavacTask;
> > +import com.sun.tools.javac.api.JavacTool;
> > +
> > +/**
> > + * A <a href="https://github.com/truth0/truth">Truth</a> {@link Subject} that evaluates Java source
> > + * {@linkplain File files} and compares them for equality based on the AST.
> > + *
> > + * @author Gregory Kick
> > + */
> > +public final class JavaSourceSubject extends Subject<JavaSourceSubject, File> {
>
> Hmm. File. Did you want to make this take a file, or take a string, or
> some sort of other indicator, and move the file access outside of the
> subject? Or are the Javac APIs so restricted that it must be files? Is
> there something more abstract that can keep it off the filesystem?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/google/autofactory/pull/5/files#r4471873>
> .
>