classPath clean up

git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@144 379699f6-c40d-0410-875b-85095c16579e
stable
jochen 26 years ago
parent 44a0a36b2d
commit 18271be2ff
  1. 11
      jode/jode/decompiler/ImportHandler.java

@ -20,7 +20,6 @@
package jode; package jode;
import java.util.*; import java.util.*;
import jode.bytecode.ClassInfo; import jode.bytecode.ClassInfo;
import jode.bytecode.SearchPath;
public class JodeEnvironment { public class JodeEnvironment {
Hashtable imports; Hashtable imports;
@ -30,11 +29,9 @@ public class JodeEnvironment {
String className; String className;
String pkg; String pkg;
SearchPath classPath;
JodeEnvironment(String path) { JodeEnvironment(String path) {
classPath = new SearchPath(path); ClassInfo.setClassPath(path);
ClassInfo.setClassPath(classPath);
Type.setEnvironment(this); Type.setEnvironment(this);
imports = new Hashtable(); imports = new Hashtable();
/* java.lang is always imported */ /* java.lang is always imported */
@ -66,8 +63,7 @@ public class JodeEnvironment {
name = name.substring(pkgdelim); name = name.substring(pkgdelim);
if (pkg.length() != 0) { if (pkg.length() != 0) {
if (classPath.exists((pkg+name).replace('.', '/') if (ClassInfo.exists(pkg+name))
+ ".class"))
return true; return true;
} }
@ -79,8 +75,7 @@ public class JodeEnvironment {
importName = importName.substring importName = importName.substring
(0, importName.length()-2); (0, importName.length()-2);
if (!importName.equals(pkgName)) { if (!importName.equals(pkgName)) {
if (classPath.exists(importName.replace('.', '/') if (ClassInfo.exists(importName))
+ ".class"))
return true; return true;
} }
} }

Loading…
Cancel
Save