org.sonar.api.batch
Class AbstractSourceImporter

java.lang.Object
  extended by org.sonar.api.batch.AbstractSourceImporter
All Implemented Interfaces:
CheckProject, Sensor, BatchExtension, Extension

public abstract class AbstractSourceImporter
extends java.lang.Object
implements Sensor

Do not forget to declare the phase @Phase when extending this class.


Field Summary
static boolean DEFAULT_IMPORT_SOURCES
           
static java.lang.String KEY_IMPORT_SOURCES
           
 
Constructor Summary
AbstractSourceImporter()
           
 
Method Summary
 void analyse(Project project, SensorContext context)
           
protected abstract  java.lang.String getLanguage()
           
protected abstract  Resource getResource(java.io.File file, java.util.List<java.io.File> sourceDirs, boolean unitTest)
           
protected  boolean isEnabled(Project project)
           
 boolean shouldExecuteOnProject(Project project)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KEY_IMPORT_SOURCES

public static final java.lang.String KEY_IMPORT_SOURCES
See Also:
Constant Field Values

DEFAULT_IMPORT_SOURCES

public static final boolean DEFAULT_IMPORT_SOURCES
See Also:
Constant Field Values
Constructor Detail

AbstractSourceImporter

public AbstractSourceImporter()
Method Detail

shouldExecuteOnProject

public boolean shouldExecuteOnProject(Project project)
Specified by:
shouldExecuteOnProject in interface CheckProject

analyse

public void analyse(Project project,
                    SensorContext context)
Specified by:
analyse in interface Sensor

getResource

protected abstract Resource getResource(java.io.File file,
                                        java.util.List<java.io.File> sourceDirs,
                                        boolean unitTest)

getLanguage

protected abstract java.lang.String getLanguage()

isEnabled

protected boolean isEnabled(Project project)


Copyright © 2009 SonarSource SA. All Rights Reserved.