Class OptimizedJarBuilder
- java.lang.Object
-
- foundation.icon.ee.tooling.deploy.OptimizedJarBuilder
-
public class OptimizedJarBuilder extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description OptimizedJarBuilder(boolean debugModeEnabled, byte[] jarBytes)Initializes a new instance of OptimizedJarBuilder, which allows desired optimization steps to be enabled and performedOptimizedJarBuilder(boolean debugModeEnabled, byte[] jarBytes, boolean stripLineNumber)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getOptimizedBytes()Performs selected optimization steps.OptimizedJarBuilderwithLog(java.io.PrintStream log)OptimizedJarBuilderwithRenamer()Renames all the class, method, and field names to smaller names (starting from character names)OptimizedJarBuilderwithUnreachableMethodRemover()Removes methods not reachable from main method
-
-
-
Constructor Detail
-
OptimizedJarBuilder
public OptimizedJarBuilder(boolean debugModeEnabled, byte[] jarBytes)Initializes a new instance of OptimizedJarBuilder, which allows desired optimization steps to be enabled and performed- Parameters:
debugModeEnabled- Indicates if debug data and names need to be preservedjarBytes- Byte array corresponding to the jar
-
OptimizedJarBuilder
public OptimizedJarBuilder(boolean debugModeEnabled, byte[] jarBytes, boolean stripLineNumber)
-
-
Method Detail
-
withUnreachableMethodRemover
public OptimizedJarBuilder withUnreachableMethodRemover()
Removes methods not reachable from main method- Returns:
- OptimizedJarBuilder
-
withRenamer
public OptimizedJarBuilder withRenamer()
Renames all the class, method, and field names to smaller names (starting from character names)- Returns:
- OptimizedJarBuilder
-
withLog
public OptimizedJarBuilder withLog(java.io.PrintStream log)
-
getOptimizedBytes
public byte[] getOptimizedBytes()
Performs selected optimization steps. Unreferenced classes are removed from the Jar for all cases.- Returns:
- optimized jar bytes
-
-