/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* This class is used to represent a class path, which can contain both
* directories and zip files.
*
* WARNING: The contents of this source file are not part of any
* supported API. Code that depends on them does so at its own risk:
* they are subject to change or removal without notice.
*/
public
class ClassPath {
/**
* The original class path string
*/
/**
* List of class path entries
*/
/**
* Build a class path from the specified path string
*/
}
/**
* Build a class path from the specified array of class path
* element strings. This constructor, and the corresponding
* "init" method, were added as part of the fix for 6473331, which
* adds support for Class-Path manifest entries in JAR files to
* rmic. It is conceivable that the value of a Class-Path
* manifest entry will contain a path separator, which would cause
* incorrect behavior if the expanded path were passed to the
* previous constructor as a single path-separator-delimited
* string; use of this constructor avoids that problem.
*/
}
/**
* Build a default class path from the path strings specified by
* the properties sun.boot.class.path and env.class.path, in that
* order.
*/
public ClassPath() {
}
int i, j, n;
// Save original class path string
}
// Count the number of path separators
i = n = 0;
n++; i++;
}
// Build the class path
j = len;
}
if (i == j) {
path[n] = new ClassPathEntry();
} else {
try {
path[n] = new ClassPathEntry();
} catch (ZipException e) {
} catch (IOException e) {
// Ignore exceptions, at least for now...
}
} else {
path[n] = new ClassPathEntry();
}
}
}
// Trim class path to exact size
this.path = new ClassPathEntry[n];
}
// Save original class path string
this.pathstr = "";
} else {
}
}
// Build the class path
int n = 0;
try {
path[n] = new ClassPathEntry();
} catch (ZipException e) {
} catch (IOException e) {
// Ignore exceptions, at least for now...
}
} else {
path[n] = new ClassPathEntry();
}
}
// Trim class path to exact size
this.path = new ClassPathEntry[n];
}
/**
* Find the specified directory in the class path
*/
}
/**
* Load the specified file from the class path
*/
}
if (!isDirectory) {
// zip files are picky about "foo" vs. "foo/".
// also, the getFiles caches are keyed with a trailing /
}
}
} else {
if (isDirectory) {
}
} else {
// Don't bother checking !file.isDir,
// since we only look for names which
// cannot already be packages (foo.java, etc).
}
}
}
}
}
return null;
}
/**
* Returns list of files given a package name and extension.
*/
while (e.hasMoreElements()) {
}
}
} else {
}
}
}
}
}
/**
* Release resources.
*/
}
}
}
/**
* Returns original class path string
*/
return pathstr;
}
}
/**
* A class path entry, which can either be a directory or an open zip file.
*/
class ClassPathEntry {
// search the directory, exactly once
if (sd.isDirectory()) {
// should not happen, but just in case, fail silently
}
}
} else {
}
}
return files;
}
}