This is NOT part of any supported API. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.
| Modifier and Type | Field and Description |
|---|---|
| private final CharSequence | |
| private final Path | |
| private final boolean |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public CharSequence | getCharContent(boolean ignoreEncodingErrors)
Overrides javax. Implements javax. Returns the character content of this file object, if available. |
| public Path | |
| public String | getName()
Overrides javax. Implements javax. Returns a user-friendly name for this file object. |
| public boolean | |
| public boolean | isNameCompatible(String simpleName, JavaFileObject.
Overrides javax. Implements javax. Checks if this file object is compatible with the specified simple name and kind. |
| pack-priv static ProgramFileObject | |
| public String | toString()
Overrides javax. Returns a string representation of the object. |
| chars | back to summary |
|---|---|
| private final CharSequence chars | |
| file | back to summary |
|---|---|
| private final Path file | |
| ignoreFirstLine | back to summary |
|---|---|
| private final boolean ignoreFirstLine | |
| ProgramFileObject | back to summary |
|---|---|
| pack-priv ProgramFileObject(Path file, CharSequence chars, boolean ignoreFirstLine) | |
| getCharContent | back to summary |
|---|---|
| public CharSequence getCharContent(boolean ignoreEncodingErrors) Overrides javax. Implements javax. Doc from javax. Returns the character content of this file object, if available.
Any byte that cannot be decoded will be replaced by the default
translation character. In addition, a diagnostic may be
reported unless
| |
| getFile | back to summary |
|---|---|
| public Path getFile() | |
| getName | back to summary |
|---|---|
| public String getName() Overrides javax. Implements javax. Doc from javax. Returns a user-friendly name for this file object. The exact
value returned is not specified but implementations should take
care to preserve names as given by the user. For example, if
the user writes the filename
| |
| isFirstLineIgnored | back to summary |
|---|---|
| public boolean isFirstLineIgnored() | |
| isNameCompatible | back to summary |
|---|---|
| public boolean isNameCompatible(String simpleName, JavaFileObject. Overrides javax. Implements javax. Doc from javax. Checks if this file object is compatible with the specified simple name and kind. A simple name is a single identifier (not qualified) as defined in The Java Language Specification, section 6.2.
| |
| of | back to summary |
|---|---|
| pack-priv static ProgramFileObject of(Path file) throws Fault Reads a source file, ignoring the first line if it is not a Java source file and
it begins with If it is not a Java source file, and if the first two bytes are
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides javax. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |