AnalyzingJavaCompiler

final class AnalyzingJavaCompiler extends JavaCompiler

Define a Java compiler that reports on any discovered source dependencies or APIs found via the incremental compilation and AnalysisCallback.

Note that this compiler does not implement a CachedCompilerProvider because the Java compiler can easily be initialized via reflection.

Value parameters:
classLookup

The mechanism to map class files to classpath entries.

classpath

The classpath to be used by Javac.

classpathOptions

The classpath options for a compiler. This instance returns false always only for Java compilers.

javac

An instance of a Java compiler.

scalaInstance

The Scala instance encapsulating classpath entries for a given Scala version.

searchClasspath

The classpath used to look for binary dependencies.

trait JavaCompiler
trait JavaTool
class Object
trait Matchable
class Any

Value members

Concrete methods

def compile(sources: Seq[VirtualFile], extraClasspath: Seq[VirtualFile], converter: FileConverter, options: Seq[String], output: Output, finalJarOutput: Option[Path], callback: AnalysisCallback, incToolOptions: IncToolOptions, reporter: Reporter, log: Logger, progressOpt: Option[CompileProgress]): Unit

Compile some java code using the current configured compiler.

Compile some java code using the current configured compiler.

Value parameters:
callback

A callback to report discovered source/binary dependencies on.

finalJarOutput

The output that will be used for straight to jar compilation if javac doesn't support it.

incToolOptions

The component that manages generated class files.

log

A place where we can log debugging/error messages.

options

The options for the Java compiler

output

The output configuration for this compiler

progressOpt

An optional compilation progress reporter to report back what files are currently under compilation.

reporter

A reporter where semantic compiler failures can be reported.

sources

The sources to compile

override def run(sources: Array[VirtualFile], options: Array[String], output: Output, incToolOptions: IncToolOptions, reporter: Reporter, log: Logger): Boolean

Compile some java code using the current configured compiler. This implements a method from JavaCompiler that will not perform incremental compilation of any way.

Compile some java code using the current configured compiler. This implements a method from JavaCompiler that will not perform incremental compilation of any way.

Value parameters:
incToolOptions

The component that manages generated class files.

log

A place where we can log debugging/error messages.

options

The options for the Java compiler

reporter

A reporter where semantic compiler failures can be reported.

sources

The sources to compile

Note:

Don't use if you want incremental compilation.

Definition Classes
JavaTool
override def supportsDirectToJar: Boolean
Definition Classes
JavaCompiler

Concrete fields

val classLookup: String => Option[VirtualFile]
val classpath: Seq[VirtualFile]
val classpathOptions: ClasspathOptions
val javac: JavaCompiler
val scalaInstance: ScalaInstance
val searchClasspath: Seq[VirtualFile]