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

The following examples show how to use com.sun.tools.javac.file.FSInfo. 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 File: T7018098.java    From TencentKona-8 with 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 File: T7018098.java    From openjdk-8 with 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 File: T7018098.java    From openjdk-8-source with 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
Source File: T7018098.java    From hottub with 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 #5
Source File: T7018098.java    From openjdk-jdk9 with 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 File: T7018098.java    From openjdk-jdk8u-backup with 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 File: T7018098.java    From openjdk-jdk8u with 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 File: T7018098.java    From jdk8u60 with 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
Source File: BaseFileManager.java    From openjdk-jdk8u-backup with 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 #10
Source File: FSInfoTest.java    From openjdk-jdk9 with 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 #11
Source File: FSInfoTest.java    From openjdk-jdk9 with 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 #12
Source File: BaseFileManager.java    From openjdk-jdk8u with 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 #13
Source File: BaseFileManager.java    From hottub with 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 #14
Source File: BaseFileManager.java    From openjdk-8-source with 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 #15
Source File: BaseFileManager.java    From jdk8u60 with 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
Source File: BaseFileManager.java    From openjdk-8 with 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 #17
Source File: BaseFileManager.java    From TencentKona-8 with 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));
}