FileDocCategorySizeDatePackage
JavaFileObject.javaAPI DocJava SE 6 API3485Tue Jun 10 00:27:02 BST 2008javax.tools

JavaFileObject

public interface JavaFileObject implements 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.

author
Peter von der Ahé
author
Jonathan Gibbons
see
JavaFileManager
since
1.6

Fields Summary
Constructors Summary
Methods Summary
public javax.lang.model.element.ModifiergetAccessLevel()
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}.

return
the access level

public javax.tools.JavaFileObject$KindgetKind()
Gets the kind of this file object.

return
the kind

public javax.lang.model.element.NestingKindgetNestingKind()
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}.

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

public booleanisNameCompatible(java.lang.String simpleName, javax.tools.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".

param
simpleName a simple name of a class
param
kind a kind
return
{@code true} if this file object is compatible; false otherwise