Package com.sun.tools.javac.util

Examples of com.sun.tools.javac.util.Paths$PathEntry


            origOptions = Collections.unmodifiableMap(origOptions);

            {
                // Note: it might be necessary to check for an empty
                // component ("") of the source path or class path
                Paths paths = Paths.instance(context);

                String sourceDest = options.get("-s");
                if (paths.sourcePath() != null) {
                    for(File f: paths.sourcePath())
                        augmentedSourcePath += (f + File.pathSeparator);
                    augmentedSourcePath += (sourceDest == null)?".":sourceDest;
                } else {
                    augmentedSourcePath = ".";

                    if (sourceDest != null)
                        augmentedSourcePath += (File.pathSeparator + sourceDest);
                }

                String classDest = options.get("-d");
                if (paths.userClassPath() != null) {
                    for(File f: paths.userClassPath())
                        baseClassPath += (f + File.pathSeparator);
                    // put baseClassPath into map to handle any
                    // value needed for the classloader
                    options.put("-classpath", baseClassPath);

                    augmentedClassPath = baseClassPath + ((classDest == null)?".":classDest);
                } else {
                    baseClassPath = ".";
                    if (classDest != null)
                        augmentedClassPath = baseClassPath + (File.pathSeparator + classDest);
                }
                assert options.get("-classpath") != null;
            }

            /*
             * Create base and augmented class loaders
             */
            ClassLoader augmentedAptCL = null;
            {
            /*
             * Use a url class loader to look for classes on the
             * user-specified class path. Prepend computed bootclass
             * path, which includes extdirs, to the URLClassLoader apt
             * uses.
             */
                String aptclasspath = "";
                Paths paths = Paths.instance(context);
                String bcp = "";
                Collection<File> bootclasspath = paths.bootClassPath();

                if (bootclasspath != null) {
                    for(File f: bootclasspath)
                        bcp += (f + File.pathSeparator);
                }
View Full Code Here

TOP

Related Classes of com.sun.tools.javac.util.Paths$PathEntry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.