Class LinkageAudit

java.lang.Object
com.ultikits.ultitools.LinkageAudit

final class LinkageAudit extends Object
Read-only startup and offline audit of symbolic server/framework references, not a verifier. Reflection, string lookups, NMS and behaviour behind unchanged signatures are out of scope.
  • Field Details

  • Constructor Details

    • LinkageAudit

      private LinkageAudit()
  • Method Details

    • inspect

      static LinkageAudit.Audit inspect(File module, ClassLoader api, List<ClassRewriteRule> rules) throws IOException
      Throws:
      IOException
    • effectiveClasses

      private static Iterable<JarEntry> effectiveClasses(JarFile jar) throws IOException
      Throws:
      IOException
    • selectClassEntry

      private static void selectClassEntry(JarEntry entry, boolean multiRelease, int runtime, Map<String,JarEntry> selected, Map<String,Integer> versions)
    • run

      static int run(String[] arguments, PrintStream output) throws IOException
      Explicit API paths never inherit the host process's Paper API. Additional API jars are repeatable. The --api index must include every runtime dependency whose classes the audited code extends or calls: the server API and its transitive dependencies, plus the audited artifact's own provided/runtime dependencies.

      Exit status: 0 when no own-code reference is unresolved, 1 when one is, 2 for invalid arguments, and 3 when an API path or module JAR does not exist or cannot be read, so a caller can tell findings from a failed run. An --own root is a package, in slash or dotted form, matched on a package boundary exactly as start-up matches a module's scan roots.

      Throws:
      IOException
    • ownRoot

      private static String ownRoot(String argument)
      Normalises a slash or dotted package root to the dotted form start-up passes to the scanner.
    • main

      public static void main(String[] arguments) throws IOException
      The enclosing type is package-private; this launcher is not a published Java API.
      Throws:
      IOException
    • apiOwner

      private static boolean apiOwner(String owner)
    • packageName

      private static String packageName(String className)