|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sun.tools.javac.file.BaseFileObject
com.sun.tools.javac.jvm.ClassReader.SourceFileObject
private static class ClassReader.SourceFileObject
A subclass of JavaFileObject for the sourcefile attribute found in a classfile. The attribute is only the last component of the original filename, so is unlikely to be valid as is, so operations other than those to access the name throw UnsupportedOperationException
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface javax.tools.JavaFileObject |
|---|
JavaFileObject.Kind |
| Field Summary | |
|---|---|
private Name |
flatname
|
private Name |
name
The file's name. |
| Fields inherited from class com.sun.tools.javac.file.BaseFileObject |
|---|
fileManager |
| Constructor Summary | |
|---|---|
ClassReader.SourceFileObject(Name name,
Name flatname)
|
|
| Method Summary | |
|---|---|
boolean |
delete()
Deletes this file object. |
boolean |
equals(java.lang.Object other)
|
java.nio.CharBuffer |
getCharContent(boolean ignoreEncodingErrors)
Gets the character content of this file object, if available. |
long |
getLastModified()
Gets the time this file object was last modified. |
java.lang.String |
getName()
Deprecated. see bug 6410637 |
int |
hashCode()
|
protected java.lang.String |
inferBinaryName(java.lang.Iterable<? extends java.io.File> path)
|
boolean |
isNameCompatible(java.lang.String simpleName,
JavaFileObject.Kind kind)
Checks if this file object is compatible with the specified simple name and kind. |
java.io.InputStream |
openInputStream()
Gets an InputStream for this file object. |
java.io.OutputStream |
openOutputStream()
Gets an OutputStream for this file object. |
java.io.Reader |
openReader()
|
java.io.Reader |
openReader(boolean ignoreEncodingErrors)
Gets a reader for this object. |
java.io.Writer |
openWriter()
Gets a Writer for this file object. |
java.net.URI |
toUri()
Returns a URI identifying this file object. |
| Methods inherited from class com.sun.tools.javac.file.BaseFileObject |
|---|
getAccessLevel, getDecoder, getKind, getNestingKind, getPath, removeExtension, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private Name name
private Name flatname
| Constructor Detail |
|---|
public ClassReader.SourceFileObject(Name name,
Name flatname)
| Method Detail |
|---|
public java.io.InputStream openInputStream()
FileObject
public java.io.OutputStream openOutputStream()
FileObject
public java.io.Reader openReader()
public java.io.Writer openWriter()
FileObject
@Deprecated public java.lang.String getName()
FileObject"BobsApp\Test.java" on
the command line, this method should return "BobsApp\Test.java" whereas the toUri
method might return file:///C:/Documents%20and%20Settings/UncleBob/BobsApp/Test.java.
getName in interface FileObjectgetName in class BaseFileObjectpublic long getLastModified()
FileObject
public boolean delete()
FileObject
public java.nio.CharBuffer getCharContent(boolean ignoreEncodingErrors)
FileObjectignoreEncodingErrors is true.
ignoreEncodingErrors - ignore encoding errors if true
null otherwisepublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object
public boolean isNameCompatible(java.lang.String simpleName,
JavaFileObject.Kind kind)
JavaFileObject
simpleName - a simple name of a classkind - a kind
true if this file object is compatible; false
otherwisepublic java.net.URI toUri()
FileObject
public java.io.Reader openReader(boolean ignoreEncodingErrors)
throws java.io.IOException
FileObjectignoreEncodingErrors is true.
openReader in interface FileObjectopenReader in class BaseFileObjectignoreEncodingErrors - ignore encoding errors if true
java.io.IOException - if an I/O error occurredprotected java.lang.String inferBinaryName(java.lang.Iterable<? extends java.io.File> path)
inferBinaryName in class BaseFileObject
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||