本文整理汇总了Java中com.sun.tools.javac.file.FSInfo类的典型用法代码示例。如果您正苦于以下问题:Java FSInfo类的具体用法?Java FSInfo怎么用?Java FSInfo使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
FSInfo类属于com.sun.tools.javac.file包,在下文中一共展示了FSInfo类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: process
import com.sun.tools.javac.file.FSInfo; //导入依赖的package包/类
@Override
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
Context context = ((JavacProcessingEnvironment) processingEnv).getContext();
FSInfo fsInfo = context.get(FSInfo.class);
round++;
if (round == 1) {
boolean expect = Boolean.valueOf(options.get("expect"));
checkEqual("cache result", fsInfo.isDirectory(testDir.toPath()), expect);
initialFSInfo = fsInfo;
} else {
checkEqual("fsInfo", fsInfo, initialFSInfo);
}
return true;
}
示例2: process
import com.sun.tools.javac.file.FSInfo; //导入依赖的package包/类
@Override
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
Context context = ((JavacProcessingEnvironment) processingEnv).getContext();
FSInfo fsInfo = context.get(FSInfo.class);
round++;
if (round == 1) {
boolean expect = Boolean.valueOf(options.get("expect"));
checkEqual("cache result", fsInfo.isDirectory(testDir), expect);
initialFSInfo = fsInfo;
} else {
checkEqual("fsInfo", fsInfo, initialFSInfo);
}
return true;
}
示例3: setContext
import com.sun.tools.javac.file.FSInfo; //导入依赖的package包/类
/**
* Set the context for JavacPathFileManager.
*/
public void setContext(Context context) {
log = Log.instance(context);
options = Options.instance(context);
classLoaderClass = options.get("procloader");
locations.update(log, options, Lint.instance(context), FSInfo.instance(context));
}
示例4: testCacheEnabled
import com.sun.tools.javac.file.FSInfo; //导入依赖的package包/类
@Test
void testCacheEnabled() throws IOException {
String[] args = { };
String[] files = { "C.java"};
TestResult tr = runMain(args, files);
FSInfo info = tr.context.get(FSInfo.class);
if (!(info instanceof CacheFSInfo))
error("unexpected FSInfo; found " + info.getClass() + ", expected CacheFSInfo");
}
示例5: testCacheDisabled
import com.sun.tools.javac.file.FSInfo; //导入依赖的package包/类
@Test
void testCacheDisabled() throws IOException {
writeFile("C.java", "class C { }");
String[] args = { "-XDnonBatchMode" };
String[] files = { "C.java"};
TestResult tr = runMain(args, files);
FSInfo info = tr.context.get(FSInfo.class);
if (info instanceof CacheFSInfo)
error("unexpected CacheFSInfo found");
}