SimpleJavaFileObject (Java SE 16 & JDK 16) (original) (raw)

All Implemented Interfaces:

[FileObject](FileObject.html "interface in javax.tools"), [JavaFileObject](JavaFileObject.html "interface in javax.tools")


Provides simple implementations for most methods in JavaFileObject. This class is designed to be subclassed and used as a basis for JavaFileObject implementations. Subclasses can override the implementation and specification of any method of this class as long as the general contract of JavaFileObject is obeyed.

Since:

1.6

Fields
The kind of this file object.
protected [URI](../../../java.base/java/net/URI.html "class in java.net")
A URI for this file object.

Constructors
protected
Construct a SimpleJavaFileObject of the given kind and with the given URI.

boolean
[delete](#delete%28%29)()
This implementation does nothing.
This implementation returns null.
[getCharContent](#getCharContent%28boolean%29)​(boolean ignoreEncodingErrors)
[getKind](#getKind%28%29)()
Returns the kind of this file object.
long
This implementation returns 0L.
[getName](#getName%28%29)()
Returns a user-friendly name for this file object.
This implementation returns null.
boolean
This implementation compares the path of its URI to the given simple name.
[openReader](#openReader%28boolean%29)​(boolean ignoreEncodingErrors)
Wraps the result of getCharContent(boolean) in a Reader.
Wraps the result of openOutputStream in a Writer.
[toUri](#toUri%28%29)()
Returns a URI identifying this file object.

Methods declared in class java.lang.Object

[clone](../../../java.base/java/lang/Object.html#clone%28%29), [equals](../../../java.base/java/lang/Object.html#equals%28java.lang.Object%29), [finalize](../../../java.base/java/lang/Object.html#finalize%28%29), [getClass](../../../java.base/java/lang/Object.html#getClass%28%29), [hashCode](../../../java.base/java/lang/Object.html#hashCode%28%29), [notify](../../../java.base/java/lang/Object.html#notify%28%29), [notifyAll](../../../java.base/java/lang/Object.html#notifyAll%28%29), [toString](../../../java.base/java/lang/Object.html#toString%28%29), [wait](../../../java.base/java/lang/Object.html#wait%28%29), [wait](../../../java.base/java/lang/Object.html#wait%28long%29), [wait](../../../java.base/java/lang/Object.html#wait%28long,int%29)