Class TryCatchComplexity

java.lang.Object
de.firemage.autograder.core.integrated.IntegratedCheck
de.firemage.autograder.core.check.complexity.TryCatchComplexity
All Implemented Interfaces:
Check

public class TryCatchComplexity extends IntegratedCheck
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).