2009-08-17 16:51:43 +02:00
|
|
|
/* sbt -- Simple Build Tool
|
|
|
|
|
* Copyright 2008, 2009 Mark Harrah
|
|
|
|
|
*/
|
|
|
|
|
package xsbti;
|
|
|
|
|
|
|
|
|
|
import java.io.File;
|
|
|
|
|
|
|
|
|
|
public interface AnalysisCallback
|
|
|
|
|
{
|
|
|
|
|
/** The names of classes that the analyzer should find subclasses of.*/
|
|
|
|
|
public String[] superclassNames();
|
2010-03-28 06:05:40 +02:00
|
|
|
/** The names of annotations that the analyzer should look for on methods and classes.*/
|
|
|
|
|
public String[] annotationNames();
|
2009-08-17 16:51:43 +02:00
|
|
|
/** Called when the the given superclass could not be found on the classpath by the compiler.*/
|
|
|
|
|
public void superclassNotFound(String superclassName);
|
|
|
|
|
/** Called before the source at the given location is processed. */
|
|
|
|
|
public void beginSource(File source);
|
|
|
|
|
/** Called when the a subclass of one of the classes given in <code>superclassNames</code> is
|
|
|
|
|
* discovered.*/
|
|
|
|
|
public void foundSubclass(File source, String subclassName, String superclassName, boolean isModule);
|
2010-03-28 06:05:40 +02:00
|
|
|
/** Called when an annotation with name <code>annotationName</code> is found on a class or one of its methods.*/
|
|
|
|
|
public void foundAnnotated(File source, String className, String annotationName, boolean isModule);
|
2009-08-17 16:51:43 +02:00
|
|
|
/** Called to indicate that the source file <code>source</code> depends on the source file
|
2009-08-19 05:25:34 +02:00
|
|
|
* <code>dependsOn</code>. Note that only source files included in the current compilation will
|
|
|
|
|
* passed to this method. Dependencies on classes generated by sources not in the current compilation will
|
|
|
|
|
* be passed as class dependencies to the classDependency method.*/
|
2009-08-17 16:51:43 +02:00
|
|
|
public void sourceDependency(File dependsOn, File source);
|
|
|
|
|
/** Called to indicate that the source file <code>source</code> depends on the jar
|
|
|
|
|
* <code>jar</code>.*/
|
|
|
|
|
public void jarDependency(File jar, File source);
|
|
|
|
|
/** Called to indicate that the source file <code>source</code> depends on the class file
|
|
|
|
|
* <code>clazz</code>.*/
|
|
|
|
|
public void classDependency(File clazz, File source);
|
2010-06-14 04:59:29 +02:00
|
|
|
/** Called to indicate that the source file <code>sourcePath</code> depends on the class file
|
|
|
|
|
* <code>classFile</code> that is a product of some source. This differs from classDependency
|
|
|
|
|
* because it is really a sourceDependency. The source corresponding to <code>classFile</code>
|
|
|
|
|
* was not incuded in the compilation so the plugin doesn't know what the source is though. It
|
|
|
|
|
* only knows that the class file came from the output directory.*/
|
|
|
|
|
public void productDependency(File classFile, File sourcePath);
|
2009-08-17 16:51:43 +02:00
|
|
|
/** Called to indicate that the source file <code>source</code> produces a class file at
|
|
|
|
|
* <code>module</code>.*/
|
|
|
|
|
public void generatedClass(File source, File module);
|
|
|
|
|
/** Called after the source at the given location has been processed. */
|
|
|
|
|
public void endSource(File sourcePath);
|
|
|
|
|
/** Called when a module with a public 'main' method with the right signature is found.*/
|
|
|
|
|
public void foundApplication(File source, String className);
|
2009-11-23 04:54:17 +01:00
|
|
|
/** Called when the public API of a source file is extracted. */
|
2009-11-16 14:46:47 +01:00
|
|
|
public void api(File sourceFile, xsbti.api.Source source);
|
2009-08-17 16:51:43 +02:00
|
|
|
}
|