Skip to content

Commit

Permalink
Utilities for dealing with Zips (now that im ditching modules.)
Browse files Browse the repository at this point in the history
  • Loading branch information
durganmcbroom committed Apr 16, 2023
1 parent 2b0b40a commit ec4f17b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/main/kotlin/net/yakclient/archives/zip/ZipArchives.kt
@@ -0,0 +1,11 @@
@file:JvmName("ZipArchives")

package net.yakclient.archives.zip

import net.yakclient.archives.ArchiveHandle

public fun classLoaderToArchive(classloader: ClassLoader): ArchiveHandle = ZipHandle(
classloader,
classloader.definedPackages.mapTo(HashSet(), Package::getName),
setOf(classLoaderToArchive(classloader.parent))
)

0 comments on commit ec4f17b

Please sign in to comment.