lock.writeLock().lock();
try {
// now we need to visit all the types that got referenced but not visited
final ResourceLocator locator = context.getLocator();
if (locator!=null) {
context.logger.info("visiting unvisited references");
context.types.onNotVisitedEntries(new TypesCtr.ProxyTask() {
@Override
public void on(TypeProxy<?> proxy) {
String name = proxy.getName();
// make this name a resource name...
String resourceName = name.replaceAll("\\.", "/") + ".class";
InputStream is = null;
try {
is = locator.openResourceStream(resourceName);
if (null == is) {
return;
}
// now visit...
logger.log(Level.FINE, "Going to visit {0}", resourceName);
ClassReader cr = new ClassReader(is);
try {
URL url = locator.getResource(resourceName);
File file = getFilePath(url.getPath(), resourceName);
URI definingURI = getDefiningURI(file);
if (logger.isLoggable(Level.FINE)) {
logger.fine("file=" + file + "; definingURI=" + definingURI);
}