Class TryCatchBlockGenerator
java.lang.Object
org.apache.groovy.contracts.generation.TryCatchBlockGenerator
Creates a try-catch block around a given
AssertStatement
and catches
a PowerAssertionError to reuse the generated visual output.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic BlockStatement
generateTryCatchBlock
(ClassNode assertionErrorClass, String message, Statement assertStatement) static BlockStatement
generateTryCatchBlockForInlineMode
(ClassNode assertionErrorClass, String message, Statement assertStatement)
-
Constructor Details
-
TryCatchBlockGenerator
public TryCatchBlockGenerator()
-
-
Method Details
-
generateTryCatchBlockForInlineMode
public static BlockStatement generateTryCatchBlockForInlineMode(ClassNode assertionErrorClass, String message, Statement assertStatement) -
generateTryCatchBlock
public static BlockStatement generateTryCatchBlock(ClassNode assertionErrorClass, String message, Statement assertStatement)
-