Class TryCatchComplexity
java.lang.Object
de.firemage.autograder.core.integrated.IntegratedCheck
de.firemage.autograder.core.check.complexity.TryCatchComplexity
- All Implemented Interfaces:
Check
The TryCatchComplexity check checks that the number of statements in a try-catch block
is not too high. (lower than
MAX_ALLOWED_STATEMENTS). Note that this check does not count
every statement. Blocks are not counted as statements for example:
{
int a = 0;
int b = 0;
}
Counts as two statements. The for loop counts as one statement as well as the if statement, switch, for-each, while,
do-while etc.
Nested statements are counted as well (ignoring nested statements of method invocations).-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheck(StaticAnalysis staticAnalysis, DynamicAnalysis dynamicAnalysis) Methods inherited from class de.firemage.autograder.core.integrated.IntegratedCheck
addLocalProblem, addLocalProblem, getLinter, getRoot, runMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.firemage.autograder.core.check.Check
maximumProblems, merge
-
Field Details
-
MAX_ALLOWED_STATEMENTS
public static final int MAX_ALLOWED_STATEMENTS- See Also:
-
LOCALIZED_MESSAGE_KEY
- See Also:
-
-
Constructor Details
-
TryCatchComplexity
public TryCatchComplexity()
-
-
Method Details
-
check
- Specified by:
checkin classIntegratedCheck
-