[Nice-commit] Nice/src/gnu/bytecode Type.java,1.19,1.20
Brought to you by:
bonniot
From: Daniel B. <bo...@us...> - 2004-07-04 02:01:51
|
Update of /cvsroot/nice/Nice/src/gnu/bytecode In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27645/src/gnu/bytecode Modified Files: Type.java Log Message: Remove nice.tools.code.ClassLoader (which was used to load java.util.* classes from a version with type parameter). For now, all imported classes are loaded using reflexion. Index: Type.java =================================================================== RCS file: /cvsroot/nice/Nice/src/gnu/bytecode/Type.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** Type.java 1 Jul 2004 11:41:41 -0000 1.19 --- Type.java 4 Jul 2004 02:01:43 -0000 1.20 *************** *** 92,98 **** else { ! type = loadFromClasspath(name); ! if (type == null) ! type = new ClassType(name, ClassType.EXISTING_CLASS); } mapNameToType.put(name, type); --- 92,96 ---- else { ! type = new ClassType(name, ClassType.EXISTING_CLASS); } mapNameToType.put(name, type); *************** *** 101,129 **** } - private static nice.tools.code.ClassLoader loader; - static { - String runtime = nice.tools.code.TypeImport.getRuntime(); - loader = new nice.tools.code.ClassLoader - (runtime, - new nice.tools.code.ClassLoader.Registrar() { - public void register(String name, ClassType type) - { - getMapNameToType().put(name, type); - } - }); - } - - public static Type loadFromClasspath(String name) - { - Type type = lookupType(name); - if (type != null) - return type; - - if (name.startsWith("java.util.")) - return loader.load(name); - else - return null; - } - /** Register that the Type for class is type. */ public static void registerTypeForName(String name, Type type) --- 99,102 ---- *************** *** 171,175 **** } ! type = loadFromClasspath(reflectClass.getName()); if (type != null) return type; --- 144,148 ---- } ! type = lookupType(reflectClass.getName()); if (type != null) return type; |