1 29 30 package com.caucho.loader; 31 32 import com.caucho.log.Log; 33 import com.caucho.vfs.Dependency; 34 import com.caucho.vfs.Path; 35 36 import java.net.URL ; 37 import java.util.HashMap ; 38 import java.util.Vector ; 39 import java.util.logging.Logger ; 40 41 44 public class PathLoader extends Loader implements Dependency { 45 private static final Logger log = Log.open(PathLoader.class); 46 47 private HashMap <String ,Path> _pathMap = new HashMap <String ,Path>(); 48 49 52 public PathLoader() 53 { 54 } 55 56 59 public void init() 60 { 61 } 62 63 66 public boolean isModified() 67 { 68 return false; 69 } 70 71 74 public void put(String name, Path path) 75 { 76 _pathMap.put(name, path); 77 } 78 79 84 protected ClassEntry getClassEntry(String name) 85 throws ClassNotFoundException 86 { 87 Path path = _pathMap.get(name); 88 89 if (path != null && path.canRead() && path.getLength() > 0) { 90 ClassEntry entry = new ClassEntry(getLoader(), name, path, 91 path, getCodeSource(path)); 92 93 105 106 return entry; 107 } 108 109 return null; 110 } 111 112 115 public void getResources(Vector <URL > vector, String name) 116 { 117 } 118 119 126 public Path getPath(String pathName) 127 { 128 return null; 129 } 130 131 public Path getCodePath() 132 { 133 return null; 134 } 135 136 public String toString() 137 { 138 return "PathLoader[]"; 139 } 140 } 141 | Popular Tags |