|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--com.togethersoft.sca.plugin.audit.AuditRule
| 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 |
public AuditRule(int group)
| Method Detail |
public void checkArrayCreationExpression(com.togethersoft.sca.plugin.audit.AstArrayCreationExpression expr)
IAuditRuleGroup: expressions.
checkArrayCreationExpression in interface IAuditRulepublic void checkArrayInitializer(com.togethersoft.sca.plugin.audit.AstArrayInitializer expr)
IAuditRuleGroup: expressions.
checkArrayInitializer in interface IAuditRulepublic void checkArrayReference(com.togethersoft.sca.plugin.audit.AstArrayReference expr)
IAuditRuleGroup: expressions.
checkArrayReference in interface IAuditRulepublic void checkAssertStatement(com.togethersoft.sca.plugin.audit.AstAssertStatement stmt)
IAuditRuleGroup: statements.
checkAssertStatement in interface IAuditRulepublic void checkAssignmentExpression(com.togethersoft.sca.plugin.audit.AstAssignmentExpression expr)
IAuditRuleGroup: expressions.
checkAssignmentExpression in interface IAuditRulepublic void checkBasicBlock(com.togethersoft.sca.plugin.audit.IBasicBlock block)
IAuditRuleGroup: statements.
checkBasicBlock in interface IAuditRulepublic void checkBinaryExpression(com.togethersoft.sca.plugin.audit.AstBinaryExpression expr)
IAuditRuleGroup: expressions.
checkBinaryExpression in interface IAuditRulepublic void checkBreakStatement(com.togethersoft.sca.plugin.audit.AstBreakStatement stmt)
IAuditRuleGroup: statements.
checkBreakStatement in interface IAuditRulepublic void checkCastExpression(com.togethersoft.sca.plugin.audit.AstCastExpression expr)
IAuditRuleGroup: expressions.
checkCastExpression in interface IAuditRulepublic void checkCompilationUnit(com.togethersoft.sca.plugin.audit.AstCompilationUnit decl)
IAuditRuleGroup: declarations.
checkCompilationUnit in interface IAuditRulepublic void checkCompoundStatement(com.togethersoft.sca.plugin.audit.AstCompoundStatement stmt)
IAuditRuleGroup: statements.
checkCompoundStatement in interface IAuditRulepublic void checkConditionalExpression(com.togethersoft.sca.plugin.audit.AstConditionalExpression expr)
IAuditRuleGroup: expressions.
checkConditionalExpression in interface IAuditRulepublic void checkConstructorInvocation(com.togethersoft.sca.plugin.audit.AstConstructorInvocation expr)
IAuditRuleGroup: expressions.
checkConstructorInvocation in interface IAuditRulepublic void checkContinueStatement(com.togethersoft.sca.plugin.audit.AstContinueStatement stmt)
IAuditRuleGroup: statements.
checkContinueStatement in interface IAuditRulepublic void checkDeclaration(com.togethersoft.sca.plugin.audit.AstDeclaration decl)
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.public void checkDeclarationStatement(com.togethersoft.sca.plugin.audit.AstDeclarationStatement stmt)
IAuditRuleGroup: statements.
checkDeclarationStatement in interface IAuditRulepublic void checkDoStatement(com.togethersoft.sca.plugin.audit.AstDoStatement stmt)
IAuditRuleGroup: statements.
checkDoStatement in interface IAuditRulepublic void checkEmptyStatement(com.togethersoft.sca.plugin.audit.AstEmptyStatement stmt)
IAuditRuleGroup: statements.
checkEmptyStatement in interface IAuditRulepublic void checkExpression(com.togethersoft.sca.plugin.audit.AstExpression expr)
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.public void checkExpressionStatement(com.togethersoft.sca.plugin.audit.AstExpressionStatement stmt)
IAuditRuleGroup: statements.
checkExpressionStatement in interface IAuditRulepublic void checkField(com.togethersoft.sca.plugin.audit.AstField field)
IAuditRuleGroup: declarations.
checkField in interface IAuditRule
public void checkField(com.togethersoft.sca.dataflow.IField field,
com.togethersoft.sca.plugin.audit.AstField ast)
IAuditRulecheckField in interface IAuditRulepublic void checkFieldReference(com.togethersoft.sca.plugin.audit.AstFieldReference expr)
IAuditRuleGroup: expressions.
checkFieldReference in interface IAuditRulepublic void checkForStatement(com.togethersoft.sca.plugin.audit.AstForStatement stmt)
IAuditRuleGroup: statements.
checkForStatement in interface IAuditRulepublic void checkIfStatement(com.togethersoft.sca.plugin.audit.AstIfStatement stmt)
IAuditRuleGroup: statements.
checkIfStatement in interface IAuditRulepublic void checkInitializer(com.togethersoft.sca.plugin.audit.AstInitializer init)
IAuditRuleGroup: declarations.
checkInitializer in interface IAuditRulepublic void checkLifetime(com.togethersoft.sca.plugin.audit.ITupleSet[][] webs)
IAuditRulecheckLifetime in interface IAuditRulepublic void checkLiteral(com.togethersoft.sca.plugin.audit.AstLiteral expr)
IAuditRuleGroup: expressions.
checkLiteral in interface IAuditRulepublic void checkLoop(com.togethersoft.sca.plugin.audit.IJavaLoop loop)
IAuditRuleGroup: statements.
checkLoop in interface IAuditRulepublic void checkMethod(com.togethersoft.sca.plugin.audit.AstMethod method)
IAuditRuleGroup: declarations.
checkMethod in interface IAuditRule
public void checkMethod(com.togethersoft.sca.dataflow.IMethod method,
com.togethersoft.sca.plugin.audit.AstMethod ast)
IAuditRulecheckMethod in interface IAuditRulepublic void checkMethodCallExpression(com.togethersoft.sca.plugin.audit.AstMethodCallExpression expr)
IAuditRuleGroup: expressions.
checkMethodCallExpression in interface IAuditRulepublic void checkModel(com.togethersoft.sca.plugin.audit.AstModel model)
IAuditRuleGroup: declarations.
checkModel in interface IAuditRulepublic void checkObjectCreationExpression(com.togethersoft.sca.plugin.audit.AstObjectCreationExpression expr)
IAuditRuleGroup: expressions.
checkObjectCreationExpression in interface IAuditRulepublic void checkParenthesizedExpression(com.togethersoft.sca.plugin.audit.AstParenthesizedExpression expr)
IAuditRuleGroup: expressions.
checkParenthesizedExpression in interface IAuditRulepublic void checkReturnStatement(com.togethersoft.sca.plugin.audit.AstReturnStatement stmt)
IAuditRuleGroup: statements.
checkReturnStatement in interface IAuditRulepublic void checkSimpleReference(com.togethersoft.sca.plugin.audit.AstSimpleReference expr)
IAuditRuleGroup: expressions.
checkSimpleReference in interface IAuditRulepublic void checkStatement(com.togethersoft.sca.plugin.audit.AstStatement stmt)
public void checkSuperExpression(com.togethersoft.sca.plugin.audit.AstSuperExpression expr)
IAuditRuleGroup: expressions.
checkSuperExpression in interface IAuditRulepublic void checkSwitchStatement(com.togethersoft.sca.plugin.audit.AstSwitchStatement stmt)
IAuditRuleGroup: statements.
checkSwitchStatement in interface IAuditRulepublic void checkSynchronizedStatement(com.togethersoft.sca.plugin.audit.AstSynchronizedStatement stmt)
IAuditRuleGroup: statements.
checkSynchronizedStatement in interface IAuditRulepublic void checkThisExpression(com.togethersoft.sca.plugin.audit.AstThisExpression expr)
IAuditRuleGroup: expressions.
checkThisExpression in interface IAuditRulepublic void checkThrowStatement(com.togethersoft.sca.plugin.audit.AstThrowStatement stmt)
IAuditRuleGroup: statements.
checkThrowStatement in interface IAuditRulepublic void checkTryStatement(com.togethersoft.sca.plugin.audit.AstTryStatement stmt)
IAuditRuleGroup: statements.
checkTryStatement in interface IAuditRule
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)
IAuditRuleGroup: tuples.
checkTuple in interface IAuditRulepublic void checkType(com.togethersoft.sca.plugin.audit.AstType decl)
IAuditRuleGroup: declarations.
checkType in interface IAuditRulepublic void checkTypeExpression(com.togethersoft.sca.plugin.audit.AstTypeExpression expr)
IAuditRuleGroup: expressions.
checkTypeExpression in interface IAuditRulepublic void checkUnaryExpression(com.togethersoft.sca.plugin.audit.AstUnaryExpression expr)
IAuditRuleGroup: expressions.
checkUnaryExpression in interface IAuditRulepublic void checkVariable(com.togethersoft.sca.plugin.audit.AstVariable decl)
IAuditRuleGroup: declarations.
checkVariable in interface IAuditRulepublic void checkWhileStatement(com.togethersoft.sca.plugin.audit.AstWhileStatement stmt)
IAuditRuleGroup: statements.
checkWhileStatement in interface IAuditRulepublic void enterPackage(com.togethersoft.sca.plugin.audit.AstPackage pkg)
IAuditRuleenterPackage is the first method called during package examination.
Group: declarations.
enterPackage in interface IAuditRulepublic com.togethersoft.sca.core.IAnalyzerDescriptor getAnalyzer()
IAuditRulegetAnalyzer in interface IAuditRulepublic static java.lang.String getAutoFixName(com.togethersoft.sca.core.plugin.audit.IAuditMessage m)
public static java.lang.String getAutoFixName(com.togethersoft.sca.core.plugin.audit.IAuditMessage m,
int fixNo)
public static java.lang.String getAutoFixName(java.lang.String id)
public com.togethersoft.sca.internal.dataflow.DataFlowAnalyzer getDataFlowAnalyzer()
public java.lang.String getExplainMessage(com.togethersoft.sca.plugin.audit.AstObject ast,
java.lang.String messageId,
java.lang.Object[] values)
IAuditRulegetExplainMessage in interface IAuditRulecom.togethersoft.sca.plugin.audit.IAuditRulepublic int getGroup()
public com.togethersoft.sca.plugin.audit.IProject getProject()
public java.util.ResourceBundle getResourceBundle()
IAuditRulegetResourceBundle in interface IAuditRulecom.togethersoft.sca.plugin.audit.IAuditRulepublic java.lang.String getSeverity()
IAuditRulegetSeverity in interface IAuditRulepublic com.togethersoft.sca.core.plugin.audit.AutoFix getSuppressionFix(com.togethersoft.sca.core.plugin.audit.IAuditMessage msg)
IAuditRulenull 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;
}
getSuppressionFix in interface IAuditRulepublic void leaveCompoundStatement(com.togethersoft.sca.plugin.audit.AstCompoundStatement stmt)
IAuditRuleleaveCompoundStatement in interface IAuditRulepublic void leaveMethod(com.togethersoft.sca.plugin.audit.AstMethod method)
IAuditRuleleaveMethod is called when the body of the method has been
examined.
Group: declarations.
leaveMethod in interface IAuditRulepublic void leavePackage(com.togethersoft.sca.plugin.audit.AstPackage pkg)
IAuditRuleleavePackage is the last method called during package examination.
Group: declarations.
leavePackage in interface IAuditRulepublic boolean requiresDataFlowAnalysis()
IAuditRulerequiresDataFlowAnalysis in interface IAuditRulecom.togethersoft.sca.plugin.audit.IAuditRulepublic void setDataFlowAnalyzer(com.togethersoft.sca.internal.dataflow.DataFlowAnalyzer dataFlowAnalyzer)
public void setParameters(com.togethersoft.sca.core.IAnalyzerDescriptor analyzer,
java.lang.String severity,
com.togethersoft.sca.internal.plugin.audit.ReportManager logger)
public void setProject(com.togethersoft.sca.plugin.audit.IProject project)
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||