com.togethersoft.sca.core
Interface IStaticAnalyzer


public interface IStaticAnalyzer

Interface to the framework core. The framework comprises a set of extensions and code inspectors. An extension is a library made available for other framework components. A code inspector is a tool that performs some kind of source code analysis. A code inspector is a specialized kind of extension.

See Also:
IExtension, ICodeInspector

Method Summary
 ICodeInspector getCodeInspector(java.lang.String id)
          Returns the descriptor of the registered code inspector with the specified identifier or null if there is no such code inspector.
 ICodeInspector[] getCodeInspectors()
          Returns an array of descriptors of all the registered code inspectors.
 IExtension getExtension(java.lang.String id)
          Returns the descriptor of the registered extension with the specified identifier or null if there is no such extension.
 IExtension[] getExtensions()
          Returns an array of descriptors of all the registered extensions.
 ILog getLog()
          Returns the log object for the framework.
 boolean init(java.lang.String[] pluginPath, java.net.URL[] pluginPropPath, java.lang.ClassLoader[] loaders)
          Initializes the framework.
 void run(IProject project, java.util.List analyzers, JobControl jobControl)
          Executes the specified code analyzers.
 void shutdown()
          Shuts down all the activated plug-ins and saves persistent plug-in data.
 

Method Detail

getCodeInspector

public ICodeInspector getCodeInspector(java.lang.String id)
Returns the descriptor of the registered code inspector with the specified identifier or null if there is no such code inspector.
Parameters:
id - the unique identifier of the code inspector.
Returns:
the code inspector descriptor.

getCodeInspectors

public ICodeInspector[] getCodeInspectors()
Returns an array of descriptors of all the registered code inspectors.
Returns:
descriptors of the regsitered code inspectors.

getExtension

public IExtension getExtension(java.lang.String id)
Returns the descriptor of the registered extension with the specified identifier or null if there is no such extension.
Parameters:
id - the unique identifier of the extension.
Returns:
the extension descriptor.

getExtensions

public IExtension[] getExtensions()
Returns an array of descriptors of all the registered extensions. This includes the code inspectors.
Returns:
descriptors of the regsitered extensions.

getLog

public ILog getLog()
Returns the log object for the framework. Messages produced during framework operations such as plug-in registry configuration or code inspector activation are sent to the framework log.

init

public boolean init(java.lang.String[] pluginPath,
                    java.net.URL[] pluginPropPath,
                    java.lang.ClassLoader[] loaders)
Initializes the framework. The framework searches for the plugin manifest files in the specified path, creates and configures the plugin registry. If the plugin path is not specified, the plugins are loaded from the default location.

The errors that occur during initialization are reported via the log. The return value indicates whether normal framework operation is possible.

Parameters:
pluginPath - specifies a list of URL's from which the plugins will be loaded, for example /D:/sapient/plugins/audit. If pluginPath is null, the plugins are loaded from the default location.
pluginPropPath - specifies a list of URL's from which the plugins properties will be loaded, for example /D:/sapient/plugins/audit. If pluginPropPath is null, the plugins properties are loaded from the default location.
loaders - a list of class loader to use with the corresponding plugins.
Returns:
true if the framework initialized successfully, false if a critical error has occurred.

run

public void run(IProject project,
                java.util.List analyzers,
                JobControl jobControl)
Executes the specified code analyzers.
Parameters:
project - a set of source files to process.
analyzers - a list code analyzer descriptors to execute. Code analyzers may belong to different inspectors.
jobControl - a job control object, or null.

shutdown

public void shutdown()
Shuts down all the activated plug-ins and saves persistent plug-in data.