Interface ClassOutput

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ClassOutput
A container for created classes with a specific output strategy.
  • Method Summary

    Modifier and Type
    Method
    Description
    default ClassOutput
    Returns a class output that write the class bytes to this output as well as the given one.
    fileWriter(Path basePath)
    Returns a class output for the given path.
    default void
    write(ClassDesc desc, byte[] bytes)
    Accept and write the class bytes.
    void
    write(String path, byte[] bytes)
    Write a resource to the output.
  • Method Details

    • write

      default void write(ClassDesc desc, byte[] bytes)
      Accept and write the class bytes.
      Parameters:
      desc - the class descriptor (not null)
      bytes - the class file bytes (not null)
    • write

      void write(String path, byte[] bytes)
      Write a resource to the output.
      Parameters:
      path - the resource relative path (not null)
      bytes - the resource bytes (not null)
    • andThen

      default ClassOutput andThen(ClassOutput next)
      Returns a class output that write the class bytes to this output as well as the given one.
      Parameters:
      next - the other class output to write to (must not be null)
      Returns:
      a class output that write the class bytes to this output as well as the given one
    • fileWriter

      static ClassOutput fileWriter(Path basePath)
      Returns a class output for the given path.
      Parameters:
      basePath - the path into which class files should be stored (must not be null)
      Returns:
      a class output for the given path