Top Description Fields Constructors Methods
javax.tools

public Class ForwardingJavaFileObject<F extends JavaFileObject>

extends ForwardingFileObject<F extends JavaFileObject>
implements JavaFileObject
Class Inheritance
All Implemented Interfaces
javax.tools.JavaFileObject, javax.tools.FileObject
Type Parameters
<F>
the kind of file object forwarded to by this object
Imports
javax.lang.model.element.Modifier, .NestingKind

Forwards calls to a given file object. Subclasses of this class might override some of these methods and might also provide additional fields and methods.

Unless stated otherwise, references in this class to "this file object" should be interpreted as referring indirectly to the delegate file object.

Since
1.6

Field Summary

Inherited from javax.tools.ForwardingFileObject:
fileObject

Constructor Summary

AccessConstructor and Description
protected
ForwardingJavaFileObject(F
delegate to this file object
fileObject
)

Creates a new instance of ForwardingJavaFileObject.

Method Summary

Modifier and TypeMethod and Description
public Modifier
getAccessLevel()

Implements javax.tools.JavaFileObject.getAccessLevel.

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

Implements javax.tools.JavaFileObject.getKind.

Returns the kind of this file object.
public NestingKind
getNestingKind()

Implements javax.tools.JavaFileObject.getNestingKind.

Provides a hint about the nesting level of the class represented by this file object.
public boolean
isNameCompatible(String
a simple name of a class
simpleName
,
JavaFileObject.Kind
a kind
kind
)

Implements javax.tools.JavaFileObject.isNameCompatible.

Checks if this file object is compatible with the specified simple name and kind.
Inherited from javax.tools.ForwardingFileObject:
deletegetCharContentgetLastModifiedgetNameopenInputStreamopenOutputStreamopenReaderopenWritertoUri

Constructor Detail

ForwardingJavaFileObjectback to summary
protected ForwardingJavaFileObject(F fileObject)

Creates a new instance of ForwardingJavaFileObject.

Parameters
fileObject:F

delegate to this file object

Method Detail

getAccessLevelback to summary
public Modifier getAccessLevel()

Implements javax.tools.JavaFileObject.getAccessLevel.

Doc from javax.tools.JavaFileObject.getAccessLevel.

Provides a hint about the access level of the class represented by this file object. If the access level is not known or this file object does not represent a class file this method returns null.

Returns:Modifier

the access level

Annotations
@Override
getKindback to summary
public JavaFileObject.Kind getKind()

Implements javax.tools.JavaFileObject.getKind.

Doc from javax.tools.JavaFileObject.getKind.

Returns the kind of this file object.

Returns:JavaFileObject.Kind

the kind

Annotations
@Override
getNestingKindback to summary
public NestingKind getNestingKind()

Implements javax.tools.JavaFileObject.getNestingKind.

Doc from javax.tools.JavaFileObject.getNestingKind.

Provides a hint about the nesting level of the class represented by this file object. This method may return NestingKind#MEMBER to mean NestingKind#LOCAL or NestingKind#ANONYMOUS. If the nesting level is not known or this file object does not represent a class file this method returns null.

Returns:NestingKind

the nesting kind, or null if the nesting kind is not known

Annotations
@Override
isNameCompatibleback to summary
public boolean isNameCompatible(String simpleName, JavaFileObject.Kind kind)

Implements javax.tools.JavaFileObject.isNameCompatible.

Doc from javax.tools.JavaFileObject.isNameCompatible.

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.

Parameters
simpleName:String

a simple name of a class

kind:JavaFileObject.Kind

a kind

Returns:boolean

true if this file object is compatible; false otherwise

Annotations
@Override