## Uses of Interface
javax.tools.FileObject

- Packages that use FileObject
  Package | Description
  --- | ---
  com.sun.source.util | Provides utilities for operations on abstract syntax trees (AST).
  javax.annotation.processing | Facilities for declaring annotation processors and for allowing annotation processors to communicate with an annotation processing tool environment.
  javax.tools | Provides interfaces for tools which can be invoked from a program, for example, compilers.

- - ### Uses of FileObject in com.sun.source.util

    Methods in com.sun.source.util with parameters of type FileObject
    Modifier and Type | Method | Description
    --- | --- | ---
    `abstract DocCommentTree` | DocTrees.`getDocCommentTree​(FileObject fileObject)` | Returns the doc comment tree of the given file.
    `abstract DocTreePath` | DocTrees.`getDocTreePath​(FileObject fileObject, PackageElement packageElement)` | Returns a doc tree path containing the doc comment tree of the given file.

  - ### Uses of FileObject in javax.annotation.processing

    Methods in javax.annotation.processing that return FileObject
    Modifier and Type | Method | Description
    --- | --- | ---
    `FileObject` | Filer.`createResource​(JavaFileManager.Location location, CharSequence moduleAndPkg, CharSequence relativeName, Element... originatingElements)` | Creates a new auxiliary resource file for writing and returns a file object for it.
    `FileObject` | Filer.`getResource​(JavaFileManager.Location location, CharSequence moduleAndPkg, CharSequence relativeName)` | Returns an object for reading an existing resource.

  - ### Uses of FileObject in javax.tools

    Classes in javax.tools with type parameters of type FileObject
    Modifier and Type | Class | Description
    --- | --- | ---
    `class` | `ForwardingFileObject<F extends FileObject>` | Forwards calls to a given file object.

    Subinterfaces of FileObject in javax.tools
    Modifier and Type | Interface | Description
    --- | --- | ---
    `interface` | `JavaFileObject` | File abstraction for tools operating on Java™ programming language source and class files.

    Classes in javax.tools that implement FileObject
    Modifier and Type | Class | Description
    --- | --- | ---
    `class` | `ForwardingFileObject<F extends FileObject>` | Forwards calls to a given file object.
    `class` | `ForwardingJavaFileObject<F extends JavaFileObject>` | Forwards calls to a given file object.
    `class` | `SimpleJavaFileObject` | Provides simple implementations for most methods in JavaFileObject.

    Fields in javax.tools declared as FileObject
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected F` | ForwardingFileObject.`fileObject` | The file object which all methods are delegated to.

    Methods in javax.tools that return FileObject
    Modifier and Type | Method | Description
    --- | --- | ---
    `FileObject` | ForwardingJavaFileManager.`getFileForInput​(JavaFileManager.Location location, String packageName, String relativeName)` |
    `FileObject` | JavaFileManager.`getFileForInput​(JavaFileManager.Location location, String packageName, String relativeName)` | Returns a file object for input representing the specified relative name in the specified package in the given package-oriented location.
    `FileObject` | ForwardingJavaFileManager.`getFileForOutput​(JavaFileManager.Location location, String packageName, String relativeName, FileObject sibling)` |
    `FileObject` | JavaFileManager.`getFileForOutput​(JavaFileManager.Location location, String packageName, String relativeName, FileObject sibling)` | Returns a file object for output representing the specified relative name in the specified package in the given location.

    Methods in javax.tools with parameters of type FileObject
    Modifier and Type | Method | Description
    --- | --- | ---
    `default Path` | StandardJavaFileManager.`asPath​(FileObject file)` | Returns the path, if any, underlying this file object (optional operation).
    `boolean` | ForwardingJavaFileManager.`contains​(JavaFileManager.Location location, FileObject fo)` |
    `default boolean` | JavaFileManager.`contains​(JavaFileManager.Location location, FileObject fo)` | Determines whether or not a given file object is "contained in" a specified location.
    `FileObject` | ForwardingJavaFileManager.`getFileForOutput​(JavaFileManager.Location location, String packageName, String relativeName, FileObject sibling)` |
    `FileObject` | JavaFileManager.`getFileForOutput​(JavaFileManager.Location location, String packageName, String relativeName, FileObject sibling)` | Returns a file object for output representing the specified relative name in the specified package in the given location.
    `JavaFileObject` | ForwardingJavaFileManager.`getJavaFileForOutput​(JavaFileManager.Location location, String className, JavaFileObject.Kind kind, FileObject sibling)` |
    `JavaFileObject` | JavaFileManager.`getJavaFileForOutput​(JavaFileManager.Location location, String className, JavaFileObject.Kind kind, FileObject sibling)` | Returns a file object for output representing the specified class of the specified kind in the given package-oriented location.
    `boolean` | ForwardingJavaFileManager.`isSameFile​(FileObject a, FileObject b)` |
    `boolean` | JavaFileManager.`isSameFile​(FileObject a, FileObject b)` | Compares two file objects and return true if they represent the same underlying object.
    `boolean` | StandardJavaFileManager.`isSameFile​(FileObject a, FileObject b)` | Compares two file objects and return true if they represent the same canonical file, zip file entry, or entry in any file system based container.