Java Code Examples for javax.tools.JavaFileObject#getLastModified()

The following examples show how to use javax.tools.JavaFileObject#getLastModified() . 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: ClassReader.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/** Implement policy to choose to derive information from a source
 *  file or a class file when both are present.  May be overridden
 *  by subclasses.
 */
protected JavaFileObject preferredFileObject(JavaFileObject a,
                                       JavaFileObject b) {

    if (preferSource)
        return (a.getKind() == JavaFileObject.Kind.SOURCE) ? a : b;
    else {
        long adate = a.getLastModified();
        long bdate = b.getLastModified();
        // 6449326: policy for bad lastModifiedTime in ClassReader
        //assert adate >= 0 && bdate >= 0;
        return (adate > bdate) ? a : b;
    }
}
 
Example 2
Source File: ClassFinder.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/** Implement policy to choose to derive information from a source
 *  file or a class file when both are present.  May be overridden
 *  by subclasses.
 */
protected JavaFileObject preferredFileObject(JavaFileObject a,
                                       JavaFileObject b) {

    if (preferSource)
        return (a.getKind() == JavaFileObject.Kind.SOURCE) ? a : b;
    else {
        long adate = a.getLastModified();
        long bdate = b.getLastModified();
        // 6449326: policy for bad lastModifiedTime in ClassReader
        //assert adate >= 0 && bdate >= 0;
        return (adate > bdate) ? a : b;
    }
}
 
Example 3
Source File: ClassReader.java    From java-n-IDE-for-Android with Apache License 2.0 5 votes vote down vote up
/**
 * Implement policy to choose to derive information from a source
 * file or a class file when both are present.  May be overridden
 * by subclasses.
 */
protected JavaFileObject preferredFileObject(JavaFileObject a,
                                             JavaFileObject b) {

    if (preferSource)
        return (a.getKind() == JavaFileObject.Kind.SOURCE) ? a : b;
    else {
        long adate = a.getLastModified();
        long bdate = b.getLastModified();
        // 6449326: policy for bad lastModifiedTime in ClassReader
        //assert adate >= 0 && bdate >= 0;
        return (adate > bdate) ? a : b;
    }
}
 
Example 4
Source File: ClassReader.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/** Implement policy to choose to derive information from a source
 *  file or a class file when both are present.  May be overridden
 *  by subclasses.
 */
protected JavaFileObject preferredFileObject(JavaFileObject a,
                                       JavaFileObject b) {

    if (preferSource)
        return (a.getKind() == JavaFileObject.Kind.SOURCE) ? a : b;
    else {
        long adate = a.getLastModified();
        long bdate = b.getLastModified();
        // 6449326: policy for bad lastModifiedTime in ClassReader
        //assert adate >= 0 && bdate >= 0;
        return (adate > bdate) ? a : b;
    }
}
 
Example 5
Source File: ClassReader.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/** Implement policy to choose to derive information from a source
 *  file or a class file when both are present.  May be overridden
 *  by subclasses.
 */
protected JavaFileObject preferredFileObject(JavaFileObject a,
                                       JavaFileObject b) {

    if (preferSource)
        return (a.getKind() == JavaFileObject.Kind.SOURCE) ? a : b;
    else {
        long adate = a.getLastModified();
        long bdate = b.getLastModified();
        // 6449326: policy for bad lastModifiedTime in ClassReader
        //assert adate >= 0 && bdate >= 0;
        return (adate > bdate) ? a : b;
    }
}
 
Example 6
Source File: ClassReader.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/** Implement policy to choose to derive information from a source
 *  file or a class file when both are present.  May be overridden
 *  by subclasses.
 */
protected JavaFileObject preferredFileObject(JavaFileObject a,
                                       JavaFileObject b) {

    if (preferSource)
        return (a.getKind() == JavaFileObject.Kind.SOURCE) ? a : b;
    else {
        long adate = a.getLastModified();
        long bdate = b.getLastModified();
        // 6449326: policy for bad lastModifiedTime in ClassReader
        //assert adate >= 0 && bdate >= 0;
        return (adate > bdate) ? a : b;
    }
}
 
Example 7
Source File: ClassReader.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/** Implement policy to choose to derive information from a source
 *  file or a class file when both are present.  May be overridden
 *  by subclasses.
 */
protected JavaFileObject preferredFileObject(JavaFileObject a,
                                       JavaFileObject b) {

    if (preferSource)
        return (a.getKind() == JavaFileObject.Kind.SOURCE) ? a : b;
    else {
        long adate = a.getLastModified();
        long bdate = b.getLastModified();
        // 6449326: policy for bad lastModifiedTime in ClassReader
        //assert adate >= 0 && bdate >= 0;
        return (adate > bdate) ? a : b;
    }
}
 
Example 8
Source File: BaseFileManager.java    From javaide with GNU General Public License v3.0 4 votes vote down vote up
ContentCacheEntry(JavaFileObject file, CharBuffer cb) {
    this.timestamp = file.getLastModified();
    this.ref = new SoftReference<CharBuffer>(cb);
}
 
Example 9
Source File: BaseFileManager.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
ContentCacheEntry(JavaFileObject file, CharBuffer cb) {
    this.timestamp = file.getLastModified();
    this.ref = new SoftReference<CharBuffer>(cb);
}
 
Example 10
Source File: BaseFileManager.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
boolean isValid(JavaFileObject file) {
    return timestamp == file.getLastModified();
}
 
Example 11
Source File: BaseFileManager.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
ContentCacheEntry(JavaFileObject file, CharBuffer cb) {
    this.timestamp = file.getLastModified();
    this.ref = new SoftReference<CharBuffer>(cb);
}
 
Example 12
Source File: BaseFileManager.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
ContentCacheEntry(JavaFileObject file, CharBuffer cb) {
    this.timestamp = file.getLastModified();
    this.ref = new SoftReference<>(cb);
}
 
Example 13
Source File: BaseFileManager.java    From lua-for-android with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
ContentCacheEntry(JavaFileObject file, CharBuffer cb) {
    this.timestamp = file.getLastModified();
    this.ref = new SoftReference<>(cb);
}
 
Example 14
Source File: BaseFileManager.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
boolean isValid(JavaFileObject file) {
    return timestamp == file.getLastModified();
}
 
Example 15
Source File: BaseFileManager.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
boolean isValid(JavaFileObject file) {
    return timestamp == file.getLastModified();
}
 
Example 16
Source File: BaseFileManager.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
boolean isValid(JavaFileObject file) {
    return timestamp == file.getLastModified();
}
 
Example 17
Source File: BaseFileManager.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
boolean isValid(JavaFileObject file) {
    return timestamp == file.getLastModified();
}
 
Example 18
Source File: BaseFileManager.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
ContentCacheEntry(JavaFileObject file, CharBuffer cb) {
    this.timestamp = file.getLastModified();
    this.ref = new SoftReference<CharBuffer>(cb);
}
 
Example 19
Source File: BaseFileManager.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
boolean isValid(JavaFileObject file) {
    return timestamp == file.getLastModified();
}
 
Example 20
Source File: BaseFileManager.java    From javaide with GNU General Public License v3.0 4 votes vote down vote up
boolean isValid(JavaFileObject file) {
    return timestamp == file.getLastModified();
}