diff options
author | Reinier Zwitserloot <reinier@tipit.to> | 2009-11-28 09:29:12 +0100 |
---|---|---|
committer | Reinier Zwitserloot <reinier@tipit.to> | 2009-11-28 09:29:12 +0100 |
commit | ce018589fe7e9d4b018f5797b7453a6ca16c6108 (patch) | |
tree | fbade8fe329b224d7a52cf4daf731288ec62d6e5 /src/delombok | |
parent | ad09ad1d29a30e618afe9752216d328161095883 (diff) | |
download | lombok-ce018589fe7e9d4b018f5797b7453a6ca16c6108.tar.gz lombok-ce018589fe7e9d4b018f5797b7453a6ca16c6108.tar.bz2 lombok-ce018589fe7e9d4b018f5797b7453a6ca16c6108.zip |
Redesigned how lombok runs as a command line app, added the ability to print information about and generate lombok-runtime.jar, fleshed out the 'install' and 'uninstall' command line tools.
Diffstat (limited to 'src/delombok')
-rw-r--r-- | src/delombok/lombok/delombok/DelombokApp.java | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/delombok/lombok/delombok/DelombokApp.java b/src/delombok/lombok/delombok/DelombokApp.java index 199534e4..71fda96f 100644 --- a/src/delombok/lombok/delombok/DelombokApp.java +++ b/src/delombok/lombok/delombok/DelombokApp.java @@ -7,7 +7,9 @@ import java.io.InputStream; import java.lang.reflect.InvocationTargetException; import java.net.MalformedURLException; import java.net.URL; +import java.util.Arrays; import java.util.Enumeration; +import java.util.List; import java.util.jar.JarEntry; import java.util.jar.JarFile; @@ -17,7 +19,7 @@ import org.mangosdk.spi.ProviderFor; @ProviderFor(LombokApp.class) public class DelombokApp implements LombokApp { - @Override public int runApp(String[] args) throws Exception { + @Override public int runApp(List<String> args) throws Exception { try { Class.forName("com.sun.tools.javac.main.JavaCompiler"); runDirectly(args); @@ -117,8 +119,8 @@ public class DelombokApp implements LombokApp { } } - private void runDirectly(String[] args) { - Delombok.main(args); + private void runDirectly(List<String> args) { + Delombok.main(args.toArray(new String[0])); } private static File findToolsJar() { @@ -168,5 +170,13 @@ public class DelombokApp implements LombokApp { @Override public String getAppName() { return "delombok"; } + + @Override public List<String> getAppAliases() { + return Arrays.asList("unlombok", "delombok"); + } + + @Override public String getAppDescription() { + return "Applies lombok transformations without compiling your\njava code (so, 'unpacks' lombok annotations and such)."; + } } |