Search in sources :

Example 6 with RelativeFile

use of com.sun.tools.javac.file.RelativePath.RelativeFile in project ceylon-compiler by ceylon.

the class JavacFileManager method getFileForInput.

public FileObject getFileForInput(Location location, String packageName, String relativeName) throws IOException {
    nullCheck(location);
    // validatePackageName(packageName);
    nullCheck(packageName);
    if (!isRelativeUri(relativeName))
        throw new IllegalArgumentException("Invalid relative name: " + relativeName);
    RelativeFile name = packageName.length() == 0 ? new RelativeFile(relativeName) : new RelativeFile(RelativeDirectory.forPackage(packageName), relativeName);
    return getFileForInput(location, name);
}
Also used : RelativeFile(com.sun.tools.javac.file.RelativePath.RelativeFile)

Aggregations

RelativeFile (com.sun.tools.javac.file.RelativePath.RelativeFile)6 File (java.io.File)2 JavaFileObject (javax.tools.JavaFileObject)2 JavacFileManager (com.sun.tools.javac.file.JavacFileManager)1 RelativeDirectory (com.sun.tools.javac.file.RelativePath.RelativeDirectory)1 ZipFileIndex (com.sun.tools.javac.file.ZipFileIndex)1 ZipFileIndexArchive (com.sun.tools.javac.file.ZipFileIndexArchive)1 ZipFileIndexCache (com.sun.tools.javac.file.ZipFileIndexCache)1 Context (com.sun.tools.javac.util.Context)1 JarEntry (java.util.jar.JarEntry)1 JarFile (java.util.jar.JarFile)1 ZipEntry (java.util.zip.ZipEntry)1 ZipFile (java.util.zip.ZipFile)1