Java Code Examples for javax.tools.FileObject#equals()

The following examples show how to use javax.tools.FileObject#equals() . 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: DynaFileManager.java    From kan-java with Eclipse Public License 1.0 5 votes vote down vote up
public boolean isSameFile(FileObject a, FileObject b) {
    if (a == b)
        return true;
    Class<?> ac = a.getClass();
    Class<?> bc = b.getClass();
    if (ac.equals(bc)) {
        if (JavaClassFile.class.equals(ac) || JavaSourceFile.class.equals(ac)) {
            return a.equals(b);
        } else {
            return super.isSameFile(a, b);
        }
    } else {
        return false;
    }
}
 
Example 2
Source File: JavacFileManager.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public boolean isSameFile(FileObject a, FileObject b) {
    nullCheck(a);
    nullCheck(b);
    if (!(a instanceof BaseFileObject))
        throw new IllegalArgumentException("Not supported: " + a);
    if (!(b instanceof BaseFileObject))
        throw new IllegalArgumentException("Not supported: " + b);
    return a.equals(b);
}
 
Example 3
Source File: PackageDocImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * set doc path for an unzipped directory
 */
public void setDocPath(FileObject path) {
    setDocPath = true;
    if (path == null)
        return;
    if (!path.equals(docPath)) {
        docPath = path;
        checkDoc();
    }
}
 
Example 4
Source File: JavacFileManager.java    From lua-for-android with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@Override
@DefinedBy(Api.COMPILER)
public boolean isSameFile(FileObject a, FileObject b) {
    nullCheck(a);
    nullCheck(b);
    if (a instanceof PathFileObject && b instanceof PathFileObject)
        return ((PathFileObject) a).isSameFile((PathFileObject) b);
    return a.equals(b);
}
 
Example 5
Source File: JavacFileManager.java    From javaide with GNU General Public License v3.0 5 votes vote down vote up
public boolean isSameFile(FileObject a, FileObject b) {
    nullCheck(a);
    nullCheck(b);
    if (!(a instanceof BaseFileObject))
        throw new IllegalArgumentException("Not supported: " + a);
    if (!(b instanceof BaseFileObject))
        throw new IllegalArgumentException("Not supported: " + b);
    return a.equals(b);
}
 
Example 6
Source File: JavacFileManager.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public boolean isSameFile(FileObject a, FileObject b) {
    nullCheck(a);
    nullCheck(b);
    if (!(a instanceof BaseFileObject))
        throw new IllegalArgumentException("Not supported: " + a);
    if (!(b instanceof BaseFileObject))
        throw new IllegalArgumentException("Not supported: " + b);
    return a.equals(b);
}
 
Example 7
Source File: JavacFileManager.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public boolean isSameFile(FileObject a, FileObject b) {
    nullCheck(a);
    nullCheck(b);
    if (!(a instanceof BaseFileObject))
        throw new IllegalArgumentException("Not supported: " + a);
    if (!(b instanceof BaseFileObject))
        throw new IllegalArgumentException("Not supported: " + b);
    return a.equals(b);
}
 
Example 8
Source File: PackageDocImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * set doc path for an unzipped directory
 */
public void setDocPath(FileObject path) {
    setDocPath = true;
    if (path == null)
        return;
    if (!path.equals(docPath)) {
        docPath = path;
        checkDoc();
    }
}
 
Example 9
Source File: PackageDocImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * set doc path for an unzipped directory
 */
public void setDocPath(FileObject path) {
    setDocPath = true;
    if (path == null)
        return;
    if (!path.equals(docPath)) {
        docPath = path;
        checkDoc();
    }
}
 
Example 10
Source File: PackageDocImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * set doc path for an unzipped directory
 */
public void setDocPath(FileObject path) {
    setDocPath = true;
    if (path == null)
        return;
    if (!path.equals(docPath)) {
        docPath = path;
        checkDoc();
    }
}
 
Example 11
Source File: PackageDocImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * set doc path for an unzipped directory
 */
public void setDocPath(FileObject path) {
    setDocPath = true;
    if (path == null)
        return;
    if (!path.equals(docPath)) {
        docPath = path;
        checkDoc();
    }
}
 
Example 12
Source File: JavacFileManager.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public boolean isSameFile(FileObject a, FileObject b) {
    nullCheck(a);
    nullCheck(b);
    if (!(a instanceof BaseFileObject))
        throw new IllegalArgumentException("Not supported: " + a);
    if (!(b instanceof BaseFileObject))
        throw new IllegalArgumentException("Not supported: " + b);
    return a.equals(b);
}
 
Example 13
Source File: Processor.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
@Override
public boolean isSameFile(FileObject a, FileObject b) {
    return a.equals(b);
}
 
Example 14
Source File: Processor.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
@Override
public boolean isSameFile(FileObject a, FileObject b) {
    return a.equals(b);
}
 
Example 15
Source File: Processor.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
@Override
public boolean isSameFile(FileObject a, FileObject b) {
    return a.equals(b);
}
 
Example 16
Source File: Processor.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
@Override
public boolean isSameFile(FileObject a, FileObject b) {
    return a.equals(b);
}
 
Example 17
Source File: Processor.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
@Override
public boolean isSameFile(FileObject a, FileObject b) {
    return a.equals(b);
}
 
Example 18
Source File: Processor.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
@Override
public boolean isSameFile(FileObject a, FileObject b) {
    return a.equals(b);
}
 
Example 19
Source File: Processor.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
@Override
public boolean isSameFile(FileObject a, FileObject b) {
    return a.equals(b);
}
 
Example 20
Source File: VerifySuppressWarnings.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
@Override
public boolean isSameFile(FileObject a, FileObject b) {
    return a.equals(b);
}