langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/Main.java
changeset 41448 6689bce0cd65
parent 30846 2b3f379840f0
equal deleted inserted replaced
41447:17a7304c73b7 41448:6689bce0cd65
     1 /*
     1 /*
     2  * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    24  */
    24  */
    25 
    25 
    26 package com.sun.tools.jdeps;
    26 package com.sun.tools.jdeps;
    27 
    27 
    28 import java.io.*;
    28 import java.io.*;
       
    29 import java.util.spi.ToolProvider;
    29 
    30 
    30 /**
    31 /**
    31  *
    32  *
    32  * Usage:
    33  * Usage:
    33  *    jdeps [options] files ...
    34  *    jdeps [options] files ...
    60     public static int run(String[] args, PrintWriter out) {
    61     public static int run(String[] args, PrintWriter out) {
    61         JdepsTask t = new JdepsTask();
    62         JdepsTask t = new JdepsTask();
    62         t.setLog(out);
    63         t.setLog(out);
    63         return t.run(args);
    64         return t.run(args);
    64     }
    65     }
       
    66 
       
    67     public static class JDepsToolProvider implements ToolProvider {
       
    68         public String name() {
       
    69             return "jdeps";
       
    70         }
       
    71 
       
    72         public int run(PrintWriter out, PrintWriter err, String... args) {
       
    73             return Main.run(args, out);
       
    74         }
       
    75     }
    65 }
    76 }