Class AssertionWriter

java.lang.Object
org.codehaus.groovy.classgen.asm.AssertionWriter

public class AssertionWriter extends Object
Emits bytecode for Groovy assert statements.
  • Constructor Details

    • AssertionWriter

      public AssertionWriter(WriterController wc)
      Creates an assertion writer for the supplied controller.
      Parameters:
      wc - the active writer controller
  • Method Details

    • writeAssertStatement

      public void writeAssertStatement(AssertStatement statement)
      Emits bytecode for an assert statement.
      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

      public void record(Token token)
      Records the current stack value for the supplied token position.
      Parameters:
      token - the token whose source position should be recorded
    • record

      public void record(Expression expression)
      Records the current stack value for the supplied expression position.
      Parameters:
      expression - the expression whose source position should be recorded