Source:
public static void main(String[] args) { Options options = new Options(); options.addOption(OptionBuilder .withLongOpt("public-api-list") .hasArgs(1) .withDescription("Public API list flie. Used to de-dupe bridge methods.") .create("p")); options.addOption(OptionBuilder .withLongOpt("debug") .hasArgs(0) .withDescription("Enable debug") .create("d")); options.addOption(OptionBuilder .withLongOpt("help") .hasArgs(0) .withDescription("Show this help") .create("h")); CommandLineParser parser = new GnuParser(); CommandLine cmd; try { cmd = parser.parse(options, args); } catch (ParseException e) { System.err.println(e.getMessage()); help(options); return; } if (cmd.hasOption('h')) { help(options); } String publicApiFilename = cmd.getOptionValue('p', null); String[] jarFiles = cmd.getArgs(); if (jarFiles.length == 0) { System.err.println("Error: no jar files specified."); help(options); } Status status = new Status(cmd.hasOption('d')); Set<String> publicApis; if (publicApiFilename != null) { try { publicApis = Sets.newHashSet( Files.readLines(new File(publicApiFilename), Charset.forName("UTF-8"))); } catch (IOException e) { status.error(e); System.exit(1); return; } } else { publicApis = Collections.emptySet(); } for (String jarFile : jarFiles) { status.debug("Processing jar file %s", jarFile); try { JarReader reader = new JarReader(status, jarFile); reader.stream().forEach(clazz -> new AnnotationVisitor(clazz, ANNOTATION_TYPE, publicApis, status).visit()); reader.close(); } catch (IOException e) { status.error(e); } } if (status.ok()) { System.exit(0); } else { System.exit(1); } }

Target:
public static void main(String[] args) { Options options = new Options(); options.addOption(OptionBuilder .withLongOpt("public-api-list") .hasArgs(1) .withDescription("Public API list file. Used to de-dupe bridge methods.") .create("p")); options.addOption(OptionBuilder .withLongOpt("debug") .hasArgs(0) .withDescription("Enable debug") .create("d")); options.addOption(OptionBuilder .withLongOpt("help") .hasArgs(0) .withDescription("Show this help") .create("h")); CommandLineParser parser = new GnuParser(); CommandLine cmd; try { cmd = parser.parse(options, args); } catch (ParseException e) { System.err.println(e.getMessage()); help(options); return; } if (cmd.hasOption('h')) { help(options); } String publicApiFilename = cmd.getOptionValue('p', null); String[] jarFiles = cmd.getArgs(); if (jarFiles.length == 0) { System.err.println("Error: no jar files specified."); help(options); } Status status = new Status(cmd.hasOption('d')); Set<String> publicApis; if (publicApiFilename != null) { try { publicApis = Sets.newHashSet( Files.readLines(new File(publicApiFilename), Charset.forName("UTF-8"))); } catch (IOException e) { status.error(e); System.exit(1); return; } } else { publicApis = Collections.emptySet(); } for (String jarFile : jarFiles) { status.debug("Processing jar file %s", jarFile); try { JarReader reader = new JarReader(status, jarFile); reader.stream().forEach(clazz -> new AnnotationVisitor(clazz, ANNOTATION_TYPE, publicApis, status).visit()); reader.close(); } catch (IOException e) { status.error(e); } } if (status.ok()) { System.exit(0); } else { System.exit(1); } }