This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.tools
interface JavaFileObject

All Superinterfaces:
FileObject
All Known Implementing Classes:
ForwardingJavaFileObject, SimpleJavaFileObject

public interface JavaFileObject
extends FileObject

File abstraction for tools operating on Java™ programming language source and class files.

All methods in this interface might throw a SecurityException if a security exception occurs.

Unless explicitly allowed, all methods in this interface might throw a NullPointerException if given a {@code null} argument.


Nested Class Summary
static enum

           Kinds of JavaFileObjects.
 
Method Summary
 Modifier

          Provides a hint about the access level of the class represented by this file object.
 JavaFileObject.Kind

          Gets the kind of this file object.
 NestingKind

          Provides a hint about the nesting level of the class represented by this file object.
 boolean

          Checks if this file object is compatible with the specified simple name and kind.
 
Methods inherited from class javax.tools.FileObject
delete, getCharContent, getLastModified, getName, openInputStream, openOutputStream, openReader, openWriter, toUri
 

Method Detail

getAccessLevel

public Modifier getAccessLevel()
Provides a hint about the access level of the class represented by this file object. If the access level is not known or if this file object does not represent a class file this method returns {@code null}.

Returns:
the access level

getKind

public JavaFileObject.Kind getKind()
Gets the kind of this file object.

Returns:
the kind

getNestingKind

public NestingKind getNestingKind()
Provides a hint about the nesting level of the class represented by this file object. This method may return {@link NestingKind#MEMBER} to mean {@link NestingKind#LOCAL} or {@link NestingKind#ANONYMOUS}. If the nesting level is not known or this file object does not represent a class file this method returns {@code null}.

Returns:
the nesting kind, or {@code null} if the nesting kind is not known

isNameCompatible

public boolean isNameCompatible(String simpleName,
                                JavaFileObject.Kind kind)
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 3rd ed., section 6.2 "Names and Identifiers".

Parameters:
simpleName - a simple name of a class
kind - a kind
Returns:
{@code true} if this file object is compatible; false otherwise


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.