Package: org.codehaus.groovy.tools.javac

## [Java] Class RawJavaFileObject

- org.codehaus.groovy.tools.javac.RawJavaFileObject

-     public class RawJavaFileObject
      extends SimpleJavaFileObject

  Represents a Java source file in file to compile

  Since:
    3.0.0

- - ### Constructor Summary

    Constructors
    Constructor and description
    `RawJavaFileObject(URI uri)` Construct a RawJavaFileObject of the given kind and with the given URI.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public boolean` | `delete()` delete the Java source file
    `` | `public boolean` | `equals(Object o)` Compares this file object by URI.
    `` | `public CharSequence` | `getCharContent(boolean ignoreEncodingErrors)` Returns the source content of the underlying file, caching it after the first read.
    `` | `public int` | `hashCode()` Returns the hash code derived from the URI.
    `` | `public String` | `toString()` Returns a diagnostic string for this file-backed Java file object.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class SimpleJavaFileObject` | `delete, equals, getAccessLevel, getCharContent, getClass, getKind, getLastModified, getName, getNestingKind, hashCode, isNameCompatible, notify, notifyAll, openInputStream, openOutputStream, openReader, openWriter, toString, toUri, wait, wait, wait`

- - ### Constructor Detail

    - #### public RawJavaFileObject(URI uri)

      Construct a RawJavaFileObject of the given kind and with the given URI.

      Parameters:
        `uri` - the URI for this file object

  - ### Method Detail

    - #### public boolean delete()

      delete the Java source file

      Returns:
        `true` if deleted successfully

    - #### public boolean equals(Object o)

      Compares this file object by URI.

      Parameters:
        `o` - the object to compare against
      Returns:
        `true` if the other object represents the same URI

    - #### public CharSequence getCharContent(boolean ignoreEncodingErrors)

      Returns the source content of the underlying file, caching it after the first read.

      throws:
        IOException if the file cannot be read
      Parameters:
        `ignoreEncodingErrors` - ignored because the file is read using the configured default charset
      Returns:
        the source content

    - #### public int hashCode()

      Returns the hash code derived from the URI.

      Returns:
        the hash code

    - #### public String toString()

      Returns a diagnostic string for this file-backed Java file object.

      Returns:
        a string representation of this file object