Class TypeTable.Writer.Jar

java.lang.Object
org.openrewrite.java.internal.parser.TypeTable.Writer.Jar
Enclosing class:
TypeTable.Writer

public class TypeTable.Writer.Jar extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
    Jar()
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    write(Path jar)
     
    void
    writeClass(InputStream classInputStream)
    Write a single class from an InputStream containing bytecode.
    void
    writeResource(String resourcePath, byte[] content)
    Write a non-class resource file (e.g., a Kotlin .kotlin_module file) so that the synthesized classpath has parity with the source jar for tooling that reads these files (like the Kotlin compiler, which needs .kotlin_module to resolve top-level functions in a package).

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Jar

      public Jar()
  • Method Details

    • write

      public void write(Path jar)
    • writeResource

      public void writeResource(String resourcePath, byte[] content)
      Write a non-class resource file (e.g., a Kotlin .kotlin_module file) so that the synthesized classpath has parity with the source jar for tooling that reads these files (like the Kotlin compiler, which needs .kotlin_module to resolve top-level functions in a package).
    • writeClass

      public void writeClass(InputStream classInputStream) throws IOException
      Write a single class from an InputStream containing bytecode. This can be used for processing individual class files.
      Parameters:
      classInputStream - InputStream containing the class bytecode
      Throws:
      IOException - if reading the class fails