Package org.apache.sling.commons.compiler

## Interface JavaCompiler

    @ProviderType
    public interface JavaCompiler

The `JavaCompiler` provides platform independant Java compilation support.

### Method Summary

All Methods Instance Methods Abstract Methods
`CompilationResult` `compile​(CompilationUnit[] units, Options options)` Compile the compilation units.

### Method Detail

#### compile

    CompilationResult compile​(CompilationUnit[] units,
                              Options options)

Compile the compilation units. This method checks if the compilation is necessary by using last modified check of the source to compile and the class file (if available). The compiler compiles all sources if at least one of the class files is out dated!

Parameters:
  `units` - The compilation units.
  `options` - The compilation options - this object is optional
Returns:
  The compilation result with more information.
Since:
  2.0