Java Code Examples for javax.tools.JavaFileManager#getLocationForModule()

The following examples show how to use javax.tools.JavaFileManager#getLocationForModule() . 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: ProxyFileManager.java    From netbeans with Apache License 2.0 6 votes vote down vote up
@Override
@CheckForNull
public Location getLocationForModule(Location location, String moduleName) throws IOException {
    checkSingleOwnerThread();
    try {
        for (JavaFileManager jfm : cfg.getFileManagers(location, null)) {
            final Location res = jfm.getLocationForModule(location, moduleName);
            if (res != null) {
                return res;
            }
        }
        return  null;
    } finally {
        clearOwnerThread();
    }
}
 
Example 2
Source File: ProxyFileManager.java    From netbeans with Apache License 2.0 6 votes vote down vote up
@Override
@CheckForNull
public Location getLocationForModule(Location location, JavaFileObject fo) throws IOException {
    checkSingleOwnerThread();
    try {
        for (JavaFileManager jfm : cfg.getFileManagers(location, null)) {
            final Location res = jfm.getLocationForModule(location, fo);
            if (res != null) {
                return res;
            }
         }
        return null;
    } finally {
        clearOwnerThread();
    }
}