< prev index next >

langtools/src/jdk.jdeps/share/classes/com/sun/tools/javap/Main.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -24,10 +24,11 @@
  */
 
 package com.sun.tools.javap;
 
 import java.io.PrintWriter;
+import java.util.spi.ToolProvider;
 
 /**
  *  Main entry point.
  *
  *  <p><b>This is NOT part of any supported API.

@@ -56,6 +57,16 @@
     public static int run(String[] args, PrintWriter out) {
         JavapTask t = new JavapTask();
         t.setLog(out);
         return t.run(args);
     }
+
+    public static class JavapToolProvider implements ToolProvider {
+        public String name() {
+            return "javap";
+        }
+
+        public int run(PrintWriter out, PrintWriter err, String... args) {
+            return Main.run(args, out);
+        }
+    }
 }
< prev index next >