Interface StatementWriter

All Known Implementing Classes:
TryCatchStatementWriter

public sealed interface StatementWriter permits TryCatchStatementWriter (not exhaustive)
The statement writer.
Since:
1.5
Author:
Denis Stepanov
  • Method Summary

    Modifier and Type
    Method
    Description
    of(StatementDef statementDef)
    Create a writer from the statement.
    void
    write(org.objectweb.asm.commons.GeneratorAdapter generatorAdapter, MethodContext context, @Nullable Runnable finallyBlock)
    Write the statement.
    default void
    writeScoped(org.objectweb.asm.commons.GeneratorAdapter generatorAdapter, MethodContext context, @Nullable Runnable finallyBlock)
    Write the statement with scoped locals.
  • Method Details

    • of

      static StatementWriter of(StatementDef statementDef)
      Create a writer from the statement.
      Parameters:
      statementDef - Statement
      Returns:
      a writer
    • write

      void write(org.objectweb.asm.commons.GeneratorAdapter generatorAdapter, MethodContext context, @Nullable @Nullable Runnable finallyBlock)
      Write the statement.
      Parameters:
      generatorAdapter - The adapter
      context - The method context
      finallyBlock - The runnable that should be invoked before any returning operation - return/throw
    • writeScoped

      default void writeScoped(org.objectweb.asm.commons.GeneratorAdapter generatorAdapter, MethodContext context, @Nullable @Nullable Runnable finallyBlock)
      Write the statement with scoped locals.
      Parameters:
      generatorAdapter - The adapter
      context - The method context
      finallyBlock - The runnable that should be invoked before any returning operation - return/throw