/*
* 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.
*
* 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.
*/
/**
* ClassFileReader reads ClassFile(s) of a given path that can be
* a .class file, a directory, or a JAR file.
*/
public class ClassFileReader {
/**
* Returns a ClassFileReader instance of a given path.
*/
}
if (path.isDirectory()) {
} else {
}
}
/**
* Returns a ClassFileReader instance of a given JarFile.
*/
}
}
return baseFileName;
}
/**
* Returns the ClassFile matching the given binary name
* or a fully-qualified class name.
*/
return readClassFile(path);
}
} else {
return readClassFile(path);
}
}
return null;
}
return new FileIterator();
}
};
}
try {
} catch (ConstantPoolException e) {
throw new ClassFileError(e);
} finally {
}
}
}
int count;
FileIterator() {
this.count = 0;
}
public boolean hasNext() {
}
if (!hasNext()) {
throw new NoSuchElementException();
}
try {
count++;
return cf;
} catch (IOException e) {
throw new ClassFileError(e);
}
}
public void remove() {
throw new UnsupportedOperationException("Not supported yet.");
}
}
}
super(path);
}
}
return readClassFile(p);
}
} else {
return readClassFile(p);
}
}
return null;
}
return iter;
}
};
}
throws IOException {
}
return FileVisitResult.CONTINUE;
}
});
return files;
}
index = 0;
}
public boolean hasNext() {
}
if (!hasNext()) {
throw new NoSuchElementException();
}
try {
return readClassFile(path);
} catch (IOException e) {
throw new ClassFileError(e);
}
}
public void remove() {
throw new UnsupportedOperationException("Not supported yet.");
}
}
}
}
super(path);
}
if (e == null) {
}
if (e != null) {
return readClassFile(e);
}
} else {
if (e != null) {
return readClassFile(e);
}
}
return null;
}
try {
} catch (ConstantPoolException ex) {
throw new IOException(ex);
} finally {
}
}
return iter;
}
};
}
JarFileIterator() {
while (entries.hasMoreElements()) {
this.nextEntry = e;
break;
}
}
}
public boolean hasNext() {
}
if (!hasNext()) {
throw new NoSuchElementException();
}
try {
} catch (IOException e) {
throw new ClassFileError(e);
}
while (entries.hasMoreElements()) {
nextEntry = e;
break;
}
}
return cf;
}
public void remove() {
throw new UnsupportedOperationException("Not supported yet.");
}
}
}
super(t);
}
}
}