equal
deleted
inserted
replaced
1054 /** Read class attribute. |
1054 /** Read class attribute. |
1055 */ |
1055 */ |
1056 void readClassAttr(ClassSymbol c, Name attrName, int attrLen) { |
1056 void readClassAttr(ClassSymbol c, Name attrName, int attrLen) { |
1057 if (attrName == names.SourceFile) { |
1057 if (attrName == names.SourceFile) { |
1058 Name n = readName(nextChar()); |
1058 Name n = readName(nextChar()); |
1059 c.sourcefile = new SourceFileObject(n); |
1059 c.sourcefile = new SourceFileObject(n, c.flatname); |
1060 } else if (attrName == names.InnerClasses) { |
1060 } else if (attrName == names.InnerClasses) { |
1061 readInnerClasses(c); |
1061 readInnerClasses(c); |
1062 } else if (allowGenerics && attrName == names.Signature) { |
1062 } else if (allowGenerics && attrName == names.Signature) { |
1063 readingClassAttr = true; |
1063 readingClassAttr = true; |
1064 try { |
1064 try { |
2219 private static class SourceFileObject extends BaseFileObject { |
2219 private static class SourceFileObject extends BaseFileObject { |
2220 |
2220 |
2221 /** The file's name. |
2221 /** The file's name. |
2222 */ |
2222 */ |
2223 private Name name; |
2223 private Name name; |
2224 |
2224 private Name flatname; |
2225 public SourceFileObject(Name name) { |
2225 |
|
2226 public SourceFileObject(Name name, Name flatname) { |
|
2227 super(null); // no file manager; never referenced for this file object |
2226 this.name = name; |
2228 this.name = name; |
|
2229 this.flatname = flatname; |
2227 } |
2230 } |
2228 |
2231 |
2229 public InputStream openInputStream() { |
2232 public InputStream openInputStream() { |
2230 throw new UnsupportedOperationException(); |
2233 throw new UnsupportedOperationException(); |
2231 } |
2234 } |
2283 |
2286 |
2284 public Reader openReader(boolean ignoreEncodingErrors) throws IOException { |
2287 public Reader openReader(boolean ignoreEncodingErrors) throws IOException { |
2285 throw new UnsupportedOperationException(); |
2288 throw new UnsupportedOperationException(); |
2286 } |
2289 } |
2287 |
2290 |
|
2291 @Override |
|
2292 protected String inferBinaryName(Iterable<? extends File> path) { |
|
2293 return flatname.toString(); |
|
2294 } |
2288 } |
2295 } |
2289 } |
2296 } |