Class ProgramLicences

java.lang.Object
org.ek9lang.core.ProgramLicences

public final class ProgramLicences extends Object
THE licence files every program EK9 compiles carries with it (licence decision D-L1, docs/legal): the runtime's Apache-2.0 licence, the runtime's NOTICE, and the notices of the third-party code the program contains. Apache-2.0 s.4 asks that they travel with every copy of the runtime, and every compiled program is one.

A program jar holds them as JAR_DIRECTORY entries (RuntimeClassExtractor writes them). A native executable has no jar, so it holds them EMBEDDED: each file is a NUL, EMBEDDED_MARK, its name, a newline, its text and a NUL - plain bytes in a data section, found by scanning, so no object-file format needs parsing and strings shows them too. readFrom(Path) reads either form back; ek9 -show-licences is its door. The names are always FILE_NAMES, whatever the form, and nothing else is ever read or written.

  • Field Details

    • LICENCE_FILE

      public static final String LICENCE_FILE
      The runtime's licence, the Apache License 2.0.
      See Also:
    • NOTICE_FILE

      public static final String NOTICE_FILE
      The runtime's NOTICE.
      See Also:
    • THIRD_PARTY_FILE

      public static final String THIRD_PARTY_FILE
      The notices of the third-party code in the program (a JVM program and a native one contain different code).
      See Also:
    • FILE_NAMES

      public static final List<String> FILE_NAMES
      Every licence file a program carries, in the order they are shown.
    • JAR_DIRECTORY

      public static final String JAR_DIRECTORY
      Where a program jar holds them.
      See Also:
    • EMBEDDED_MARK

      public static final String EMBEDDED_MARK
      What precedes the name of each embedded file, after its NUL.
      See Also:
  • Method Details