F
-文件转发到这个对象的类型
public class ForwardingJavaFileObject<F extends JavaFileObject> extends ForwardingFileObject<F> implements JavaFileObject
JavaFileObject.Kind
fileObject
Modifier | Constructor and Description |
---|---|
protected |
ForwardingJavaFileObject(F fileObject)
创建一个新的实例forwardingjavafileobject。
|
Modifier and Type | Method and Description |
---|---|
Modifier |
getAccessLevel()
提供了一个关于此文件对象表示的类的访问级别的提示。
|
JavaFileObject.Kind |
getKind()
获取此文件对象的类型。
|
NestingKind |
getNestingKind()
提供了一个关于这个文件对象表示的类的嵌套级别的提示。
|
boolean |
isNameCompatible(String simpleName, JavaFileObject.Kind kind)
检查这个文件对象是否与指定的简单名称和类型兼容。
|
delete, getCharContent, getLastModified, getName, openInputStream, openOutputStream, openReader, openWriter, toUri
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
delete, getCharContent, getLastModified, getName, openInputStream, openOutputStream, openReader, openWriter, toUri
protected ForwardingJavaFileObject(F fileObject)
fileObject
-代表该文件对象
public JavaFileObject.Kind getKind()
JavaFileObject
getKind
接口
JavaFileObject
public boolean isNameCompatible(String simpleName, JavaFileObject.Kind kind)
JavaFileObject
isNameCompatible
接口
JavaFileObject
simpleName
-一类简单的名字
kind
true
文件对象是兼容的;否则为false
public NestingKind getNestingKind()
JavaFileObject
NestingKind.MEMBER
意味着
NestingKind.LOCAL
或
NestingKind.ANONYMOUS
。如果嵌套级别是未知的或该文件对象并不代表一个类文件,此方法返回
null
。
getNestingKind
接口
JavaFileObject
null
如果嵌套类是不知道的
public Modifier getAccessLevel()
JavaFileObject
null
。
getAccessLevel
接口
JavaFileObject
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.