< prev index next >

src/jdk.rmic/share/classes/sun/rmi/rmic/BatchEnvironment.java

Print this page


   1 /*
   2  * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  44 import java.util.jar.JarFile;
  45 import java.util.jar.Manifest;
  46 import java.util.jar.Attributes;
  47 import sun.tools.java.ClassPath;
  48 
  49 /**
  50  * BatchEnvironment for rmic extends javac's version in four ways:
  51  * 1. It overrides errorString() to handle looking for rmic-specific
  52  * error messages in rmic's resource bundle
  53  * 2. It provides a mechanism for recording intermediate generated
  54  * files so that they can be deleted later.
  55  * 3. It holds a reference to the Main instance so that generators
  56  * can refer to it.
  57  * 4. It provides access to the ClassPath passed to the constructor.
  58  *
  59  * WARNING: The contents of this source file are not part of any
  60  * supported API.  Code that depends on them does so at its own risk:
  61  * they are subject to change or removal without notice.
  62  */
  63 

  64 public class BatchEnvironment extends sun.tools.javac.BatchEnvironment {
  65 
  66     /** instance of Main which created this environment */
  67     private Main main;
  68 
  69     /**
  70      * Create a ClassPath object for rmic from a class path string.
  71      */
  72     public static ClassPath createClassPath(String classPathString) {
  73         ClassPath[] paths = classPaths(null, classPathString, null);
  74         return paths[1];
  75     }
  76 
  77     /**
  78      * Create a ClassPath object for rmic from the relevant command line
  79      * options for class path and boot class path.
  80      */
  81     public static ClassPath createClassPath(String classPathString,
  82                                             String sysClassPathString)
  83     {


   1 /*
   2  * Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  44 import java.util.jar.JarFile;
  45 import java.util.jar.Manifest;
  46 import java.util.jar.Attributes;
  47 import sun.tools.java.ClassPath;
  48 
  49 /**
  50  * BatchEnvironment for rmic extends javac's version in four ways:
  51  * 1. It overrides errorString() to handle looking for rmic-specific
  52  * error messages in rmic's resource bundle
  53  * 2. It provides a mechanism for recording intermediate generated
  54  * files so that they can be deleted later.
  55  * 3. It holds a reference to the Main instance so that generators
  56  * can refer to it.
  57  * 4. It provides access to the ClassPath passed to the constructor.
  58  *
  59  * WARNING: The contents of this source file are not part of any
  60  * supported API.  Code that depends on them does so at its own risk:
  61  * they are subject to change or removal without notice.
  62  */
  63 
  64 @SuppressWarnings("deprecation")
  65 public class BatchEnvironment extends sun.tools.javac.BatchEnvironment {
  66 
  67     /** instance of Main which created this environment */
  68     private Main main;
  69 
  70     /**
  71      * Create a ClassPath object for rmic from a class path string.
  72      */
  73     public static ClassPath createClassPath(String classPathString) {
  74         ClassPath[] paths = classPaths(null, classPathString, null);
  75         return paths[1];
  76     }
  77 
  78     /**
  79      * Create a ClassPath object for rmic from the relevant command line
  80      * options for class path and boot class path.
  81      */
  82     public static ClassPath createClassPath(String classPathString,
  83                                             String sysClassPathString)
  84     {


< prev index next >