public class Atlas
extends java.lang.Object
implements java.io.Closeable
transformations, and an environment
to transform Java binaries.
Atlases are independent of the specific binary being processed, allowing them to be used for multiple binary transformations.
| Constructor and Description |
|---|
Atlas() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Note that this will clear the classpath!
|
Atlas |
install(java.util.function.Function<AtlasTransformerContext,org.cadixdev.bombe.jar.JarEntryTransformer> transformer)
Installs a
transformer to the Atlas, noting that
each installed transformer will be constructed once for each binary processed. |
void |
run(JarFile jar,
java.nio.file.Path output)
Runs the Atlas on the given input
jar, saving the result to the
given output path. |
void |
run(java.nio.file.Path input,
java.nio.file.Path output)
Runs the Atlas on the given input binary, saving the result to the output path.
|
Atlas |
use(java.nio.file.Path jar)
Adds the given JAR file to the Atlas classpath, allowing the
inheritance provider to have a more complete view
of the environment. |
public Atlas use(java.nio.file.Path jar) throws java.io.IOException
inheritance provider to have a more complete view
of the environment.jar - The path to the JAR filethis, for chainingjava.io.IOException - Should an issue occur reading the JAR filepublic Atlas install(java.util.function.Function<AtlasTransformerContext,org.cadixdev.bombe.jar.JarEntryTransformer> transformer)
transformer to the Atlas, noting that
each installed transformer will be constructed once for each binary processed.transformer - The transformer constructorthis, for chainingpublic void run(java.nio.file.Path input,
java.nio.file.Path output)
throws java.io.IOException
input - The input binaryoutput - The output binaryjava.io.IOException - Should an issue occur reading the input JAR, or
reading the output JARrun(JarFile, Path)public void run(JarFile jar, java.nio.file.Path output) throws java.io.IOException
jar, saving the result to the
given output path.jar - The input jaroutput - The output binaryjava.io.IOException - Should an issue occur reading the input JAR, or
reading the output JARpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOException