org.apache.sling.commons.compiler.impl
Class EclipseJavaCompiler

java.lang.Object
  extended by org.apache.sling.commons.compiler.impl.EclipseJavaCompiler
All Implemented Interfaces:
JavaCompiler

@Service(value=JavaCompiler.class)
public class EclipseJavaCompiler
extends java.lang.Object
implements JavaCompiler

The EclipseJavaCompiler provides platform independant Java compilation support using the Eclipse Java Compiler (org.eclipse.jdt).


Constructor Summary
EclipseJavaCompiler()
           
 
Method Summary
 CompilationResult compile(CompilationUnit[] units, Options compileOptions)
          Compile the compilation units.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EclipseJavaCompiler

public EclipseJavaCompiler()
Method Detail

compile

public CompilationResult compile(CompilationUnit[] units,
                                 Options compileOptions)
Description copied from interface: JavaCompiler
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!

Specified by:
compile in interface JavaCompiler
Parameters:
units - The compilation units.
compileOptions - The compilation options - this object is optional
Returns:
The compilation result with more information.
See Also:
JavaCompiler.compile(org.apache.sling.commons.compiler.CompilationUnit[], org.apache.sling.commons.compiler.Options)


Copyright © 2007-2012 The Apache Software Foundation. All Rights Reserved.