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

The following examples show how to use javax.tools.JavaFileObject#getClass() . 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: JavacFileManager.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public String inferBinaryName(Location location, JavaFileObject file) {
    file.getClass(); // null check
    location.getClass(); // null check
    // Need to match the path semantics of list(location, ...)
    Iterable<? extends File> path = getLocation(location);
    if (path == null) {
        return null;
    }

    if (file instanceof BaseFileObject) {
        return ((BaseFileObject) file).inferBinaryName(path);
    } else
        throw new IllegalArgumentException(file.getClass().getName());
}
 
Example 2
Source File: JavacFileManager.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public String inferBinaryName(Location location, JavaFileObject file) {
    file.getClass(); // null check
    location.getClass(); // null check
    // Need to match the path semantics of list(location, ...)
    Iterable<? extends File> path = getLocation(location);
    if (path == null) {
        return null;
    }

    if (file instanceof BaseFileObject) {
        return ((BaseFileObject) file).inferBinaryName(path);
    } else
        throw new IllegalArgumentException(file.getClass().getName());
}
 
Example 3
Source File: JavacFileManager.java    From java-n-IDE-for-Android with Apache License 2.0 5 votes vote down vote up
public String inferBinaryName(Location location, JavaFileObject file) {
    file.getClass(); // null check
    location.getClass(); // null check
    // Need to match the path semantics of list(location, ...)
    Iterable<? extends File> path = getLocation(location);
    if (path == null) {
        return null;
    }

    if (file instanceof BaseFileObject) {
        return ((BaseFileObject) file).inferBinaryName(path);
    } else
        throw new IllegalArgumentException(file.getClass().getName());
}
 
Example 4
Source File: JavacFileManager.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public String inferBinaryName(Location location, JavaFileObject file) {
    file.getClass(); // null check
    location.getClass(); // null check
    // Need to match the path semantics of list(location, ...)
    Iterable<? extends File> path = getLocation(location);
    if (path == null) {
        return null;
    }

    if (file instanceof BaseFileObject) {
        return ((BaseFileObject) file).inferBinaryName(path);
    } else
        throw new IllegalArgumentException(file.getClass().getName());
}
 
Example 5
Source File: JavacFileManager.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public String inferBinaryName(Location location, JavaFileObject file) {
    file.getClass(); // null check
    location.getClass(); // null check
    // Need to match the path semantics of list(location, ...)
    Iterable<? extends File> path = getLocation(location);
    if (path == null) {
        return null;
    }

    if (file instanceof BaseFileObject) {
        return ((BaseFileObject) file).inferBinaryName(path);
    } else
        throw new IllegalArgumentException(file.getClass().getName());
}
 
Example 6
Source File: JavacFileManager.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public String inferBinaryName(Location location, JavaFileObject file) {
    file.getClass(); // null check
    location.getClass(); // null check
    // Need to match the path semantics of list(location, ...)
    Iterable<? extends File> path = getLocation(location);
    if (path == null) {
        return null;
    }

    if (file instanceof BaseFileObject) {
        return ((BaseFileObject) file).inferBinaryName(path);
    } else
        throw new IllegalArgumentException(file.getClass().getName());
}
 
Example 7
Source File: JavacFileManager.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public String inferBinaryName(Location location, JavaFileObject file) {
    file.getClass(); // null check
    location.getClass(); // null check
    // Need to match the path semantics of list(location, ...)
    Iterable<? extends File> path = getLocation(location);
    if (path == null) {
        return null;
    }

    if (file instanceof BaseFileObject) {
        return ((BaseFileObject) file).inferBinaryName(path);
    } else
        throw new IllegalArgumentException(file.getClass().getName());
}
 
Example 8
Source File: JavacFileManager.java    From javaide with GNU General Public License v3.0 5 votes vote down vote up
public String inferBinaryName(Location location, JavaFileObject file) {
    file.getClass(); // null check
    location.getClass(); // null check
    // Need to match the path semantics of list(location, ...)
    Iterable<? extends File> path = getLocation(location);
    if (path == null) {
        return null;
    }

    if (file instanceof BaseFileObject) {
        return ((BaseFileObject) file).inferBinaryName(path);
    } else
        throw new IllegalArgumentException(file.getClass().getName());
}
 
Example 9
Source File: JavacFileManager.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public String inferBinaryName(Location location, JavaFileObject file) {
    file.getClass(); // null check
    location.getClass(); // null check
    // Need to match the path semantics of list(location, ...)
    Iterable<? extends File> path = getLocation(location);
    if (path == null) {
        return null;
    }

    if (file instanceof BaseFileObject) {
        return ((BaseFileObject) file).inferBinaryName(path);
    } else
        throw new IllegalArgumentException(file.getClass().getName());
}
 
Example 10
Source File: Log.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public void setEndPosTable(JavaFileObject name, EndPosTable endPosTable) {
    name.getClass(); // null check
    getSource(name).setEndPosTable(endPosTable);
}
 
Example 11
Source File: Log.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public void setEndPosTable(JavaFileObject name, EndPosTable endPosTable) {
    name.getClass(); // null check
    getSource(name).setEndPosTable(endPosTable);
}
 
Example 12
Source File: Log.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
public void setEndPosTable(JavaFileObject name, EndPosTable endPosTable) {
    name.getClass(); // null check
    getSource(name).setEndPosTable(endPosTable);
}
 
Example 13
Source File: Log.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public void setEndPosTable(JavaFileObject name, EndPosTable endPosTable) {
    name.getClass(); // null check
    getSource(name).setEndPosTable(endPosTable);
}
 
Example 14
Source File: Log.java    From javaide with GNU General Public License v3.0 4 votes vote down vote up
public void setEndPosTable(JavaFileObject name, Map<JCTree, Integer> table) {
    name.getClass(); // null check
    getSource(name).setEndPosTable(table);
}
 
Example 15
Source File: Log.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public void setEndPosTable(JavaFileObject name, EndPosTable endPosTable) {
    name.getClass(); // null check
    getSource(name).setEndPosTable(endPosTable);
}
 
Example 16
Source File: Log.java    From java-n-IDE-for-Android with Apache License 2.0 4 votes vote down vote up
public void setEndPosTable(JavaFileObject name, Map<JCTree, Integer> table) {
    name.getClass(); // null check
    getSource(name).setEndPosTable(table);
}
 
Example 17
Source File: Log.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public void setEndPosTable(JavaFileObject name, EndPosTable endPosTable) {
    name.getClass(); // null check
    getSource(name).setEndPosTable(endPosTable);
}
 
Example 18
Source File: Log.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
public void setEndPosTable(JavaFileObject name, EndPosTable endPosTable) {
    name.getClass(); // null check
    getSource(name).setEndPosTable(endPosTable);
}