1 7 8 package javax.tools; 9 10 import java.io.IOException ; 11 import java.net.URI ; 12 import java.util.Iterator ; 13 import java.util.Set ; 14 import javax.tools.JavaFileObject.Kind; 15 16 25 public class ForwardingJavaFileManager<M extends JavaFileManager> implements JavaFileManager { 26 27 30 protected final M fileManager; 31 32 36 protected ForwardingJavaFileManager(M fileManager) { 37 fileManager.getClass(); this.fileManager = fileManager; 39 } 40 41 45 public ClassLoader getClassLoader(Location location) { 46 return fileManager.getClassLoader(location); 47 } 48 49 53 public Iterable <JavaFileObject> list(Location location, 54 String packageName, 55 Set <Kind> kinds, 56 boolean recurse) 57 throws IOException  58 { 59 return fileManager.list(location, packageName, kinds, recurse); 60 } 61 62 65 public String inferBinaryName(Location location, JavaFileObject file) { 66 return fileManager.inferBinaryName(location, file); 67 } 68 69 72 public boolean isSameFile(FileObject a, FileObject b) { 73 return fileManager.isSameFile(a, b); 74 } 75 76 80 public boolean handleOption(String current, Iterator <String > remaining) { 81 return fileManager.handleOption(current, remaining); 82 } 83 84 public boolean hasLocation(Location location) { 85 return fileManager.hasLocation(location); 86 } 87 88 public int isSupportedOption(String option) { 89 return fileManager.isSupportedOption(option); 90 } 91 92 96 public JavaFileObject getJavaFileForInput(Location location, 97 String className, 98 Kind kind) 99 throws IOException  100 { 101 return fileManager.getJavaFileForInput(location, className, kind); 102 } 103 104 108 public JavaFileObject getJavaFileForOutput(Location location, 109 String className, 110 Kind kind, 111 FileObject sibling) 112 throws IOException  113 { 114 return fileManager.getJavaFileForOutput(location, className, kind, sibling); 115 } 116 117 121 public FileObject getFileForInput(Location location, 122 String packageName, 123 String relativeName) 124 throws IOException  125 { 126 return fileManager.getFileForInput(location, packageName, relativeName); 127 } 128 129 133 public FileObject getFileForOutput(Location location, 134 String packageName, 135 String relativeName, 136 FileObject sibling) 137 throws IOException  138 { 139 return fileManager.getFileForOutput(location, packageName, relativeName, sibling); 140 } 141 142 public void flush() throws IOException { 143 fileManager.flush(); 144 } 145 146 public void close() throws IOException { 147 fileManager.close(); 148 } 149 } 150
| Popular Tags
|