Package org.codehaus.groovy.classgen.asm
Class AssertionWriter
java.lang.Object
org.codehaus.groovy.classgen.asm.AssertionWriter
Emits bytecode for Groovy
assert statements.-
Constructor Summary
ConstructorsConstructorDescriptionCreates an assertion writer for the supplied controller. -
Method Summary
Modifier and TypeMethodDescriptionvoidTemporarily disables power-assert value tracking.voidrecord(Expression expression) Records the current stack value for the supplied expression position.voidRecords the current stack value for the supplied token position.voidRestores power-assert value tracking after a previous disable.voidwriteAssertStatement(AssertStatement statement) Emits bytecode for anassertstatement.
-
Constructor Details
-
AssertionWriter
Creates an assertion writer for the supplied controller.- Parameters:
wc- the active writer controller
-
-
Method Details
-
writeAssertStatement
Emits bytecode for anassertstatement.- Parameters:
statement- the assertion statement
-
disableTracker
public void disableTracker()Temporarily disables power-assert value tracking. -
reenableTracker
public void reenableTracker()Restores power-assert value tracking after a previous disable. -
record
Records the current stack value for the supplied token position.- Parameters:
token- the token whose source position should be recorded
-
record
Records the current stack value for the supplied expression position.- Parameters:
expression- the expression whose source position should be recorded
-