com.togethersoft.sca.plugin.audit
Class AuditRule

java.lang.Object
  |
  +--com.togethersoft.sca.plugin.audit.AuditRule
All Implemented Interfaces:
IAuditRule

public class AuditRule
extends java.lang.Object
implements IAuditRule


Fields inherited from interface com.togethersoft.sca.plugin.audit.IAuditRule
ALL_GRP, DECLARATION_GRP, EXPRESSION_GRP, STATEMENT_GRP, TUPLE_GRP
 
Constructor Summary
AuditRule(int group)
           
 
Method Summary
 void checkArrayCreationExpression(com.togethersoft.sca.plugin.audit.AstArrayCreationExpression expr)
          Examines an array creation expression.
 void checkArrayInitializer(com.togethersoft.sca.plugin.audit.AstArrayInitializer expr)
          Examines an array initializer expression.
 void checkArrayReference(com.togethersoft.sca.plugin.audit.AstArrayReference expr)
          Examines an array reference expression.
 void checkAssertStatement(com.togethersoft.sca.plugin.audit.AstAssertStatement stmt)
          Examines an assertion statement.
 void checkAssignmentExpression(com.togethersoft.sca.plugin.audit.AstAssignmentExpression expr)
          Examines an assignment expression.
 void checkBasicBlock(com.togethersoft.sca.plugin.audit.IBasicBlock block)
          Examines the results of control flow analysis.
 void checkBinaryExpression(com.togethersoft.sca.plugin.audit.AstBinaryExpression expr)
          Examines a binary expression.
 void checkBreakStatement(com.togethersoft.sca.plugin.audit.AstBreakStatement stmt)
          Examines a break statement.
 void checkCastExpression(com.togethersoft.sca.plugin.audit.AstCastExpression expr)
          Examines a type cast expression.
 void checkCompilationUnit(com.togethersoft.sca.plugin.audit.AstCompilationUnit decl)
          Examines a compilation unit (source file).
 void checkCompoundStatement(com.togethersoft.sca.plugin.audit.AstCompoundStatement stmt)
          Examines a compound statement.
 void checkConditionalExpression(com.togethersoft.sca.plugin.audit.AstConditionalExpression expr)
          Examines a conditional expression.
 void checkConstructorInvocation(com.togethersoft.sca.plugin.audit.AstConstructorInvocation expr)
          Examines an explicit constructor invocation.
 void checkContinueStatement(com.togethersoft.sca.plugin.audit.AstContinueStatement stmt)
          Examines a continue statement.
 void checkDeclaration(com.togethersoft.sca.plugin.audit.AstDeclaration decl)
          The AuditImpl default implementation calls checkDeclaration for each declaration that is not handled specifically by the corresponding checkXXX method.
 void checkDeclarationStatement(com.togethersoft.sca.plugin.audit.AstDeclarationStatement stmt)
          Examines a declaration statement.
 void checkDoStatement(com.togethersoft.sca.plugin.audit.AstDoStatement stmt)
          Examines a do loop statement.
 void checkEmptyStatement(com.togethersoft.sca.plugin.audit.AstEmptyStatement stmt)
          Examines an empty statement.
 void checkExpression(com.togethersoft.sca.plugin.audit.AstExpression expr)
          The AuditImpl default implementation calls checkExpression for each expression that is not handled specifically by the corresponding checkXXX method.
 void checkExpressionStatement(com.togethersoft.sca.plugin.audit.AstExpressionStatement stmt)
          Examines an expression statement.
 void checkField(com.togethersoft.sca.plugin.audit.AstField field)
          Examines a field.
 void checkField(com.togethersoft.sca.dataflow.IField field, com.togethersoft.sca.plugin.audit.AstField ast)
          Examines a field.
 void checkFieldReference(com.togethersoft.sca.plugin.audit.AstFieldReference expr)
          Examines a field reference expression.
 void checkForStatement(com.togethersoft.sca.plugin.audit.AstForStatement stmt)
          Examines a for loop statement.
 void checkIfStatement(com.togethersoft.sca.plugin.audit.AstIfStatement stmt)
          Examines an if statement.
 void checkInitializer(com.togethersoft.sca.plugin.audit.AstInitializer init)
          Examines a class initializer.
 void checkLifetime(com.togethersoft.sca.plugin.audit.ITupleSet[][] webs)
          Examined lifetime of a local variable.
 void checkLiteral(com.togethersoft.sca.plugin.audit.AstLiteral expr)
          Examines a literal.
 void checkLoop(com.togethersoft.sca.plugin.audit.IJavaLoop loop)
          Examines a loop.
 void checkMethod(com.togethersoft.sca.plugin.audit.AstMethod method)
          Examines a method.
 void checkMethod(com.togethersoft.sca.dataflow.IMethod method, com.togethersoft.sca.plugin.audit.AstMethod ast)
          Examines a method.
 void checkMethodCallExpression(com.togethersoft.sca.plugin.audit.AstMethodCallExpression expr)
          Examines a method call expression.
 void checkModel(com.togethersoft.sca.plugin.audit.AstModel model)
          Examines a model (whole project).
 void checkObjectCreationExpression(com.togethersoft.sca.plugin.audit.AstObjectCreationExpression expr)
          Examines an object creation expression.
 void checkParenthesizedExpression(com.togethersoft.sca.plugin.audit.AstParenthesizedExpression expr)
          Examines a parenthesized expression.
 void checkReturnStatement(com.togethersoft.sca.plugin.audit.AstReturnStatement stmt)
          Examines a return statement.
 void checkSimpleReference(com.togethersoft.sca.plugin.audit.AstSimpleReference expr)
          Examines a simple name expression.
 void checkStatement(com.togethersoft.sca.plugin.audit.AstStatement stmt)
           
 void checkSuperExpression(com.togethersoft.sca.plugin.audit.AstSuperExpression expr)
          Examines super expression.
 void checkSwitchStatement(com.togethersoft.sca.plugin.audit.AstSwitchStatement stmt)
          Examines a switch statement.
 void checkSynchronizedStatement(com.togethersoft.sca.plugin.audit.AstSynchronizedStatement stmt)
          Examines a synchronized statement.
 void checkThisExpression(com.togethersoft.sca.plugin.audit.AstThisExpression expr)
          Examines a this expression.
 void checkThrowStatement(com.togethersoft.sca.plugin.audit.AstThrowStatement stmt)
          Examines a throw statement.
 void checkTryStatement(com.togethersoft.sca.plugin.audit.AstTryStatement stmt)
          Examines a try statement.
 void checkTuple(com.togethersoft.sca.plugin.audit.ITuple tuple, com.togethersoft.sca.plugin.audit.IVal[] operands, com.togethersoft.sca.dataflow.values.IValueDomain[] values, com.togethersoft.sca.dataflow.values.IValueDomain result)
          Examines the results of data flow analysis.
 void checkType(com.togethersoft.sca.plugin.audit.AstType decl)
          Examines a class or an interface.
 void checkTypeExpression(com.togethersoft.sca.plugin.audit.AstTypeExpression expr)
          Examines a type expression.
 void checkUnaryExpression(com.togethersoft.sca.plugin.audit.AstUnaryExpression expr)
          Examines a unary expression.
 void checkVariable(com.togethersoft.sca.plugin.audit.AstVariable decl)
          Examines a variable or method parameter.
 void checkWhileStatement(com.togethersoft.sca.plugin.audit.AstWhileStatement stmt)
          Examines a while loop statement.
 void enterPackage(com.togethersoft.sca.plugin.audit.AstPackage pkg)
          enterPackage is the first method called during package examination.
 com.togethersoft.sca.core.IAnalyzerDescriptor getAnalyzer()
          Returns the analyzer that produced this message.
static java.lang.String getAutoFixName(com.togethersoft.sca.core.plugin.audit.IAuditMessage m)
           
static java.lang.String getAutoFixName(com.togethersoft.sca.core.plugin.audit.IAuditMessage m, int fixNo)
           
static java.lang.String getAutoFixName(java.lang.String id)
           
 com.togethersoft.sca.internal.dataflow.DataFlowAnalyzer getDataFlowAnalyzer()
           
 java.lang.String getExplainMessage(com.togethersoft.sca.plugin.audit.AstObject ast, java.lang.String messageId, java.lang.Object[] values)
          Returns the formatted explain text of this message in HTML format
 int getGroup()
           
 com.togethersoft.sca.plugin.audit.IProject getProject()
           
 java.util.ResourceBundle getResourceBundle()
          Method getResourceBundle return ResourceBundle by default return value is null.
 java.lang.String getSeverity()
          Returns the severity of messages generated by this rule.
 com.togethersoft.sca.core.plugin.audit.AutoFix getSuppressionFix(com.togethersoft.sca.core.plugin.audit.IAuditMessage msg)
          Returns a fix that will suppress the given message during subsequent audit executions.
 void leaveCompoundStatement(com.togethersoft.sca.plugin.audit.AstCompoundStatement stmt)
          Called when all the statements contained in the block have been examined.
 void leaveMethod(com.togethersoft.sca.plugin.audit.AstMethod method)
          leaveMethod is called when the body of the method has been examined.
 void leavePackage(com.togethersoft.sca.plugin.audit.AstPackage pkg)
          leavePackage is the last method called during package examination.
 boolean requiresDataFlowAnalysis()
          If this audit requires data flow analysis
 void setDataFlowAnalyzer(com.togethersoft.sca.internal.dataflow.DataFlowAnalyzer dataFlowAnalyzer)
           
 void setParameters(com.togethersoft.sca.core.IAnalyzerDescriptor analyzer, java.lang.String severity, com.togethersoft.sca.internal.plugin.audit.ReportManager logger)
           
 void setProject(com.togethersoft.sca.plugin.audit.IProject project)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuditRule

public AuditRule(int group)
Method Detail

checkArrayCreationExpression

public void checkArrayCreationExpression(com.togethersoft.sca.plugin.audit.AstArrayCreationExpression expr)
Description copied from interface: IAuditRule
Examines an array creation expression.

Group: expressions.

Specified by:
checkArrayCreationExpression in interface IAuditRule

checkArrayInitializer

public void checkArrayInitializer(com.togethersoft.sca.plugin.audit.AstArrayInitializer expr)
Description copied from interface: IAuditRule
Examines an array initializer expression.

Group: expressions.

Specified by:
checkArrayInitializer in interface IAuditRule

checkArrayReference

public void checkArrayReference(com.togethersoft.sca.plugin.audit.AstArrayReference expr)
Description copied from interface: IAuditRule
Examines an array reference expression.

Group: expressions.

Specified by:
checkArrayReference in interface IAuditRule

checkAssertStatement

public void checkAssertStatement(com.togethersoft.sca.plugin.audit.AstAssertStatement stmt)
Description copied from interface: IAuditRule
Examines an assertion statement.

Group: statements.

Specified by:
checkAssertStatement in interface IAuditRule

checkAssignmentExpression

public void checkAssignmentExpression(com.togethersoft.sca.plugin.audit.AstAssignmentExpression expr)
Description copied from interface: IAuditRule
Examines an assignment expression.

Group: expressions.

Specified by:
checkAssignmentExpression in interface IAuditRule

checkBasicBlock

public void checkBasicBlock(com.togethersoft.sca.plugin.audit.IBasicBlock block)
Description copied from interface: IAuditRule
Examines the results of control flow analysis.

Group: statements.

Specified by:
checkBasicBlock in interface IAuditRule

checkBinaryExpression

public void checkBinaryExpression(com.togethersoft.sca.plugin.audit.AstBinaryExpression expr)
Description copied from interface: IAuditRule
Examines a binary expression.

Group: expressions.

Specified by:
checkBinaryExpression in interface IAuditRule

checkBreakStatement

public void checkBreakStatement(com.togethersoft.sca.plugin.audit.AstBreakStatement stmt)
Description copied from interface: IAuditRule
Examines a break statement.

Group: statements.

Specified by:
checkBreakStatement in interface IAuditRule

checkCastExpression

public void checkCastExpression(com.togethersoft.sca.plugin.audit.AstCastExpression expr)
Description copied from interface: IAuditRule
Examines a type cast expression.

Group: expressions.

Specified by:
checkCastExpression in interface IAuditRule

checkCompilationUnit

public void checkCompilationUnit(com.togethersoft.sca.plugin.audit.AstCompilationUnit decl)
Description copied from interface: IAuditRule
Examines a compilation unit (source file).

Group: declarations.

Specified by:
checkCompilationUnit in interface IAuditRule

checkCompoundStatement

public void checkCompoundStatement(com.togethersoft.sca.plugin.audit.AstCompoundStatement stmt)
Description copied from interface: IAuditRule
Examines a compound statement.

Group: statements.

Specified by:
checkCompoundStatement in interface IAuditRule

checkConditionalExpression

public void checkConditionalExpression(com.togethersoft.sca.plugin.audit.AstConditionalExpression expr)
Description copied from interface: IAuditRule
Examines a conditional expression.

Group: expressions.

Specified by:
checkConditionalExpression in interface IAuditRule

checkConstructorInvocation

public void checkConstructorInvocation(com.togethersoft.sca.plugin.audit.AstConstructorInvocation expr)
Description copied from interface: IAuditRule
Examines an explicit constructor invocation.

Group: expressions.

Specified by:
checkConstructorInvocation in interface IAuditRule

checkContinueStatement

public void checkContinueStatement(com.togethersoft.sca.plugin.audit.AstContinueStatement stmt)
Description copied from interface: IAuditRule
Examines a continue statement.

Group: statements.

Specified by:
checkContinueStatement in interface IAuditRule

checkDeclaration

public void checkDeclaration(com.togethersoft.sca.plugin.audit.AstDeclaration decl)
The AuditImpl default implementation calls checkDeclaration for each declaration that is not handled specifically by the corresponding checkXXX method. Audit rule implementations may override checkXXX to change this behavior.

checkDeclarationStatement

public void checkDeclarationStatement(com.togethersoft.sca.plugin.audit.AstDeclarationStatement stmt)
Description copied from interface: IAuditRule
Examines a declaration statement.

Group: statements.

Specified by:
checkDeclarationStatement in interface IAuditRule

checkDoStatement

public void checkDoStatement(com.togethersoft.sca.plugin.audit.AstDoStatement stmt)
Description copied from interface: IAuditRule
Examines a do loop statement.

Group: statements.

Specified by:
checkDoStatement in interface IAuditRule

checkEmptyStatement

public void checkEmptyStatement(com.togethersoft.sca.plugin.audit.AstEmptyStatement stmt)
Description copied from interface: IAuditRule
Examines an empty statement.

Group: statements.

Specified by:
checkEmptyStatement in interface IAuditRule

checkExpression

public void checkExpression(com.togethersoft.sca.plugin.audit.AstExpression expr)
The AuditImpl default implementation calls checkExpression for each expression that is not handled specifically by the corresponding checkXXX method. Audit rule implementations may override checkXXX to change this behavior.

checkExpressionStatement

public void checkExpressionStatement(com.togethersoft.sca.plugin.audit.AstExpressionStatement stmt)
Description copied from interface: IAuditRule
Examines an expression statement.

Group: statements.

Specified by:
checkExpressionStatement in interface IAuditRule

checkField

public void checkField(com.togethersoft.sca.plugin.audit.AstField field)
Description copied from interface: IAuditRule
Examines a field.

Group: declarations.

Specified by:
checkField in interface IAuditRule

checkField

public void checkField(com.togethersoft.sca.dataflow.IField field,
                       com.togethersoft.sca.plugin.audit.AstField ast)
Description copied from interface: IAuditRule
Examines a field. Group: declarations.
Specified by:
checkField in interface IAuditRule

checkFieldReference

public void checkFieldReference(com.togethersoft.sca.plugin.audit.AstFieldReference expr)
Description copied from interface: IAuditRule
Examines a field reference expression.

Group: expressions.

Specified by:
checkFieldReference in interface IAuditRule

checkForStatement

public void checkForStatement(com.togethersoft.sca.plugin.audit.AstForStatement stmt)
Description copied from interface: IAuditRule
Examines a for loop statement.

Group: statements.

Specified by:
checkForStatement in interface IAuditRule

checkIfStatement

public void checkIfStatement(com.togethersoft.sca.plugin.audit.AstIfStatement stmt)
Description copied from interface: IAuditRule
Examines an if statement.

Group: statements.

Specified by:
checkIfStatement in interface IAuditRule

checkInitializer

public void checkInitializer(com.togethersoft.sca.plugin.audit.AstInitializer init)
Description copied from interface: IAuditRule
Examines a class initializer.

Group: declarations.

Specified by:
checkInitializer in interface IAuditRule

checkLifetime

public void checkLifetime(com.togethersoft.sca.plugin.audit.ITupleSet[][] webs)
Description copied from interface: IAuditRule
Examined lifetime of a local variable. Group: expressions.
Specified by:
checkLifetime in interface IAuditRule

checkLiteral

public void checkLiteral(com.togethersoft.sca.plugin.audit.AstLiteral expr)
Description copied from interface: IAuditRule
Examines a literal.

Group: expressions.

Specified by:
checkLiteral in interface IAuditRule

checkLoop

public void checkLoop(com.togethersoft.sca.plugin.audit.IJavaLoop loop)
Description copied from interface: IAuditRule
Examines a loop. It may be used for finding infinite and never executed loops.

Group: statements.

Specified by:
checkLoop in interface IAuditRule

checkMethod

public void checkMethod(com.togethersoft.sca.plugin.audit.AstMethod method)
Description copied from interface: IAuditRule
Examines a method.

Group: declarations.

Specified by:
checkMethod in interface IAuditRule

checkMethod

public void checkMethod(com.togethersoft.sca.dataflow.IMethod method,
                        com.togethersoft.sca.plugin.audit.AstMethod ast)
Description copied from interface: IAuditRule
Examines a method. Group: declarations.
Specified by:
checkMethod in interface IAuditRule

checkMethodCallExpression

public void checkMethodCallExpression(com.togethersoft.sca.plugin.audit.AstMethodCallExpression expr)
Description copied from interface: IAuditRule
Examines a method call expression.

Group: expressions.

Specified by:
checkMethodCallExpression in interface IAuditRule

checkModel

public void checkModel(com.togethersoft.sca.plugin.audit.AstModel model)
Description copied from interface: IAuditRule
Examines a model (whole project).

Group: declarations.

Specified by:
checkModel in interface IAuditRule

checkObjectCreationExpression

public void checkObjectCreationExpression(com.togethersoft.sca.plugin.audit.AstObjectCreationExpression expr)
Description copied from interface: IAuditRule
Examines an object creation expression.

Group: expressions.

Specified by:
checkObjectCreationExpression in interface IAuditRule

checkParenthesizedExpression

public void checkParenthesizedExpression(com.togethersoft.sca.plugin.audit.AstParenthesizedExpression expr)
Description copied from interface: IAuditRule
Examines a parenthesized expression.

Group: expressions.

Specified by:
checkParenthesizedExpression in interface IAuditRule

checkReturnStatement

public void checkReturnStatement(com.togethersoft.sca.plugin.audit.AstReturnStatement stmt)
Description copied from interface: IAuditRule
Examines a return statement.

Group: statements.

Specified by:
checkReturnStatement in interface IAuditRule

checkSimpleReference

public void checkSimpleReference(com.togethersoft.sca.plugin.audit.AstSimpleReference expr)
Description copied from interface: IAuditRule
Examines a simple name expression.

Group: expressions.

Specified by:
checkSimpleReference in interface IAuditRule

checkStatement

public void checkStatement(com.togethersoft.sca.plugin.audit.AstStatement stmt)

checkSuperExpression

public void checkSuperExpression(com.togethersoft.sca.plugin.audit.AstSuperExpression expr)
Description copied from interface: IAuditRule
Examines super expression.

Group: expressions.

Specified by:
checkSuperExpression in interface IAuditRule

checkSwitchStatement

public void checkSwitchStatement(com.togethersoft.sca.plugin.audit.AstSwitchStatement stmt)
Description copied from interface: IAuditRule
Examines a switch statement.

Group: statements.

Specified by:
checkSwitchStatement in interface IAuditRule

checkSynchronizedStatement

public void checkSynchronizedStatement(com.togethersoft.sca.plugin.audit.AstSynchronizedStatement stmt)
Description copied from interface: IAuditRule
Examines a synchronized statement.

Group: statements.

Specified by:
checkSynchronizedStatement in interface IAuditRule

checkThisExpression

public void checkThisExpression(com.togethersoft.sca.plugin.audit.AstThisExpression expr)
Description copied from interface: IAuditRule
Examines a this expression.

Group: expressions.

Specified by:
checkThisExpression in interface IAuditRule

checkThrowStatement

public void checkThrowStatement(com.togethersoft.sca.plugin.audit.AstThrowStatement stmt)
Description copied from interface: IAuditRule
Examines a throw statement.

Group: statements.

Specified by:
checkThrowStatement in interface IAuditRule

checkTryStatement

public void checkTryStatement(com.togethersoft.sca.plugin.audit.AstTryStatement stmt)
Description copied from interface: IAuditRule
Examines a try statement.

Group: statements.

Specified by:
checkTryStatement in interface IAuditRule

checkTuple

public void checkTuple(com.togethersoft.sca.plugin.audit.ITuple tuple,
                       com.togethersoft.sca.plugin.audit.IVal[] operands,
                       com.togethersoft.sca.dataflow.values.IValueDomain[] values,
                       com.togethersoft.sca.dataflow.values.IValueDomain result)
Description copied from interface: IAuditRule
Examines the results of data flow analysis.

Group: tuples.

Specified by:
checkTuple in interface IAuditRule

checkType

public void checkType(com.togethersoft.sca.plugin.audit.AstType decl)
Description copied from interface: IAuditRule
Examines a class or an interface.

Group: declarations.

Specified by:
checkType in interface IAuditRule

checkTypeExpression

public void checkTypeExpression(com.togethersoft.sca.plugin.audit.AstTypeExpression expr)
Description copied from interface: IAuditRule
Examines a type expression.

Group: expressions.

Specified by:
checkTypeExpression in interface IAuditRule

checkUnaryExpression

public void checkUnaryExpression(com.togethersoft.sca.plugin.audit.AstUnaryExpression expr)
Description copied from interface: IAuditRule
Examines a unary expression.

Group: expressions.

Specified by:
checkUnaryExpression in interface IAuditRule

checkVariable

public void checkVariable(com.togethersoft.sca.plugin.audit.AstVariable decl)
Description copied from interface: IAuditRule
Examines a variable or method parameter.

Group: declarations.

Specified by:
checkVariable in interface IAuditRule

checkWhileStatement

public void checkWhileStatement(com.togethersoft.sca.plugin.audit.AstWhileStatement stmt)
Description copied from interface: IAuditRule
Examines a while loop statement.

Group: statements.

Specified by:
checkWhileStatement in interface IAuditRule

enterPackage

public void enterPackage(com.togethersoft.sca.plugin.audit.AstPackage pkg)
Description copied from interface: IAuditRule
enterPackage is the first method called during package examination.

Group: declarations.

Specified by:
enterPackage in interface IAuditRule

getAnalyzer

public com.togethersoft.sca.core.IAnalyzerDescriptor getAnalyzer()
Description copied from interface: IAuditRule
Returns the analyzer that produced this message.
Specified by:
getAnalyzer in interface IAuditRule

getAutoFixName

public static java.lang.String getAutoFixName(com.togethersoft.sca.core.plugin.audit.IAuditMessage m)

getAutoFixName

public static java.lang.String getAutoFixName(com.togethersoft.sca.core.plugin.audit.IAuditMessage m,
                                              int fixNo)

getAutoFixName

public static java.lang.String getAutoFixName(java.lang.String id)

getDataFlowAnalyzer

public com.togethersoft.sca.internal.dataflow.DataFlowAnalyzer getDataFlowAnalyzer()

getExplainMessage

public java.lang.String getExplainMessage(com.togethersoft.sca.plugin.audit.AstObject ast,
                                          java.lang.String messageId,
                                          java.lang.Object[] values)
Description copied from interface: IAuditRule
Returns the formatted explain text of this message in HTML format
Specified by:
getExplainMessage in interface IAuditRule
Following copied from interface: com.togethersoft.sca.plugin.audit.IAuditRule
Returns:
String the formatted message

getGroup

public int getGroup()

getProject

public com.togethersoft.sca.plugin.audit.IProject getProject()

getResourceBundle

public java.util.ResourceBundle getResourceBundle()
Description copied from interface: IAuditRule
Method getResourceBundle return ResourceBundle by default return value is null.
Specified by:
getResourceBundle in interface IAuditRule
Following copied from interface: com.togethersoft.sca.plugin.audit.IAuditRule
Returns:
ResourceBundle property file with localized Audit messages

getSeverity

public java.lang.String getSeverity()
Description copied from interface: IAuditRule
Returns the severity of messages generated by this rule. Returns an empty string if the severity was not specified.
Specified by:
getSeverity in interface IAuditRule

getSuppressionFix

public com.togethersoft.sca.core.plugin.audit.AutoFix getSuppressionFix(com.togethersoft.sca.core.plugin.audit.IAuditMessage msg)
Description copied from interface: IAuditRule
Returns a fix that will suppress the given message during subsequent audit executions. Returns null if suppression fix cannot be created. When run, the suppression fix will insert a special comment before the associated code fragment, for example:
     void f(int a) {
         int z = 0;
         // $SUP-AP$ $SUP-EVNU$ $SUP-ONE$
         a += z;
     }
 
Specified by:
getSuppressionFix in interface IAuditRule

leaveCompoundStatement

public void leaveCompoundStatement(com.togethersoft.sca.plugin.audit.AstCompoundStatement stmt)
Description copied from interface: IAuditRule
Called when all the statements contained in the block have been examined.
Specified by:
leaveCompoundStatement in interface IAuditRule

leaveMethod

public void leaveMethod(com.togethersoft.sca.plugin.audit.AstMethod method)
Description copied from interface: IAuditRule
leaveMethod is called when the body of the method has been examined.

Group: declarations.

Specified by:
leaveMethod in interface IAuditRule

leavePackage

public void leavePackage(com.togethersoft.sca.plugin.audit.AstPackage pkg)
Description copied from interface: IAuditRule
leavePackage is the last method called during package examination.

Group: declarations.

Specified by:
leavePackage in interface IAuditRule

requiresDataFlowAnalysis

public boolean requiresDataFlowAnalysis()
Description copied from interface: IAuditRule
If this audit requires data flow analysis
Specified by:
requiresDataFlowAnalysis in interface IAuditRule
Following copied from interface: com.togethersoft.sca.plugin.audit.IAuditRule
Returns:
boolean

setDataFlowAnalyzer

public void setDataFlowAnalyzer(com.togethersoft.sca.internal.dataflow.DataFlowAnalyzer dataFlowAnalyzer)

setParameters

public void setParameters(com.togethersoft.sca.core.IAnalyzerDescriptor analyzer,
                          java.lang.String severity,
                          com.togethersoft.sca.internal.plugin.audit.ReportManager logger)

setProject

public void setProject(com.togethersoft.sca.plugin.audit.IProject project)