Java Code Examples for com.sun.tools.javac.file.FSInfo

The following examples show how to use com.sun.tools.javac.file.FSInfo. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: TencentKona-8   Source File: T7018098.java    License: GNU General Public License v2.0 6 votes vote down vote up
@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;
}
 
Example 2
Source Project: jdk8u60   Source File: T7018098.java    License: GNU General Public License v2.0 6 votes vote down vote up
@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;
}
 
Example 3
Source Project: openjdk-jdk8u   Source File: T7018098.java    License: GNU General Public License v2.0 6 votes vote down vote up
@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;
}
 
Example 4
@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;
}
 
Example 5
Source Project: openjdk-jdk9   Source File: T7018098.java    License: GNU General Public License v2.0 6 votes vote down vote up
@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;
}
 
Example 6
Source Project: hottub   Source File: T7018098.java    License: GNU General Public License v2.0 6 votes vote down vote up
@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;
}
 
Example 7
Source Project: openjdk-8-source   Source File: T7018098.java    License: GNU General Public License v2.0 6 votes vote down vote up
@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;
}
 
Example 8
Source Project: openjdk-8   Source File: T7018098.java    License: GNU General Public License v2.0 6 votes vote down vote up
@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;
}
 
Example 9
/**
 * 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));
}
 
Example 10
Source Project: jdk8u60   Source File: BaseFileManager.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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));
}
 
Example 11
/**
 * 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));
}
 
Example 12
/**
 * 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));
}
 
Example 13
Source Project: openjdk-jdk9   Source File: FSInfoTest.java    License: GNU General Public License v2.0 5 votes vote down vote up
@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");
}
 
Example 14
Source Project: openjdk-jdk9   Source File: FSInfoTest.java    License: GNU General Public License v2.0 5 votes vote down vote up
@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");
}
 
Example 15
Source Project: hottub   Source File: BaseFileManager.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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));
}
 
Example 16
/**
 * 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));
}
 
Example 17
Source Project: openjdk-8   Source File: BaseFileManager.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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));
}