Java Code Examples for com.sun.tools.javac.file.RelativePath.RelativeDirectory#forPackage()
The following examples show how to use
com.sun.tools.javac.file.RelativePath.RelativeDirectory#forPackage() .
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 openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
@Override @DefinedBy(Api.COMPILER) public FileObject getFileForInput(Location location, String packageName, String relativeName) throws IOException { checkNotModuleOrientedLocation(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); }
Example 2
Source File: JavacFileManager.java From hottub with GNU General Public License v2.0 | 6 votes |
public Iterable<JavaFileObject> list(Location location, String packageName, Set<JavaFileObject.Kind> kinds, boolean recurse) throws IOException { // validatePackageName(packageName); nullCheck(packageName); nullCheck(kinds); Iterable<? extends File> path = getLocation(location); if (path == null) return List.nil(); RelativeDirectory subdirectory = RelativeDirectory.forPackage(packageName); ListBuffer<JavaFileObject> results = new ListBuffer<JavaFileObject>(); for (File directory : path) listContainer(directory, subdirectory, kinds, recurse, results); return results.toList(); }
Example 3
Source File: JavacFileManager.java From javaide with GNU General Public License v3.0 | 6 votes |
public Iterable<JavaFileObject> list(Location location, String packageName, Set<JavaFileObject.Kind> kinds, boolean recurse) throws IOException { // validatePackageName(packageName); nullCheck(packageName); nullCheck(kinds); Iterable<? extends File> path = getLocation(location); if (path == null) return List.nil(); RelativeDirectory subdirectory = RelativeDirectory.forPackage(packageName); ListBuffer<JavaFileObject> results = new ListBuffer<JavaFileObject>(); for (File directory : path) listContainer(directory, subdirectory, kinds, recurse, results); return results.toList(); }
Example 4
Source File: JavacFileManager.java From java-n-IDE-for-Android with Apache License 2.0 | 6 votes |
public Iterable<JavaFileObject> list(Location location, String packageName, Set<JavaFileObject.Kind> kinds, boolean recurse) throws IOException { // validatePackageName(packageName); nullCheck(packageName); nullCheck(kinds); Iterable<? extends File> path = getLocation(location); if (path == null) return List.nil(); RelativeDirectory subdirectory = RelativeDirectory.forPackage(packageName); ListBuffer<JavaFileObject> results = new ListBuffer<JavaFileObject>(); for (File directory : path) listContainer(directory, subdirectory, kinds, recurse, results); return results.toList(); }
Example 5
Source File: JavacFileManager.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
public FileObject getFileForOutput(Location location, String packageName, String relativeName, FileObject sibling) 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 getFileForOutput(location, name, sibling); }
Example 6
Source File: JavacFileManager.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
public Iterable<JavaFileObject> list(Location location, String packageName, Set<JavaFileObject.Kind> kinds, boolean recurse) throws IOException { // validatePackageName(packageName); nullCheck(packageName); nullCheck(kinds); Iterable<? extends File> path = getLocation(location); if (path == null) return List.nil(); RelativeDirectory subdirectory = RelativeDirectory.forPackage(packageName); ListBuffer<JavaFileObject> results = new ListBuffer<JavaFileObject>(); for (File directory : path) listContainer(directory, subdirectory, kinds, recurse, results); return results.toList(); }
Example 7
Source File: JavacFileManager.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
@Override @DefinedBy(Api.COMPILER) public Iterable<JavaFileObject> list(Location location, String packageName, Set<JavaFileObject.Kind> kinds, boolean recurse) throws IOException { checkNotModuleOrientedLocation(location); // validatePackageName(packageName); nullCheck(packageName); nullCheck(kinds); Iterable<? extends Path> path = getLocationAsPaths(location); if (path == null) return List.nil(); RelativeDirectory subdirectory = RelativeDirectory.forPackage(packageName); ListBuffer<JavaFileObject> results = new ListBuffer<>(); for (Path directory : path) { Container container = getContainer(directory); container.list(directory, subdirectory, kinds, recurse, results); } return results.toList(); }
Example 8
Source File: JavacFileManager.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
@Override @DefinedBy(Api.COMPILER) public FileObject getFileForOutput(Location location, String packageName, String relativeName, FileObject sibling) throws IOException { checkOutputLocation(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 getFileForOutput(location, name, sibling); }
Example 9
Source File: JavacFileManager.java From lua-for-android with BSD 3-Clause "New" or "Revised" License | 6 votes |
@Override @DefinedBy(Api.COMPILER) public Iterable<JavaFileObject> list(Location location, String packageName, Set<JavaFileObject.Kind> kinds, boolean recurse) throws IOException { checkNotModuleOrientedLocation(location); // validatePackageName(packageName); nullCheck(packageName); nullCheck(kinds); Iterable<? extends File> path = getLocation(location); if (path == null) return List.nil(); RelativeDirectory subdirectory = RelativeDirectory.forPackage(packageName); ListBuffer<JavaFileObject> results = new ListBuffer<>(); for (File directory : path) { Container container = getContainer(directory); container.list(directory, subdirectory, kinds, recurse, results); } return results.toList(); }
Example 10
Source File: JavacFileManager.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
public Iterable<JavaFileObject> list(Location location, String packageName, Set<JavaFileObject.Kind> kinds, boolean recurse) throws IOException { // validatePackageName(packageName); nullCheck(packageName); nullCheck(kinds); Iterable<? extends File> path = getLocation(location); if (path == null) return List.nil(); RelativeDirectory subdirectory = RelativeDirectory.forPackage(packageName); ListBuffer<JavaFileObject> results = new ListBuffer<JavaFileObject>(); for (File directory : path) listContainer(directory, subdirectory, kinds, recurse, results); return results.toList(); }
Example 11
Source File: JavacFileManager.java From lua-for-android with BSD 3-Clause "New" or "Revised" License | 6 votes |
@Override @DefinedBy(Api.COMPILER) public FileObject getFileForOutput(Location location, String packageName, String relativeName, FileObject sibling) throws IOException { checkOutputLocation(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 getFileForOutput(location, name, sibling); }
Example 12
Source File: JavacFileManager.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
public Iterable<JavaFileObject> list(Location location, String packageName, Set<JavaFileObject.Kind> kinds, boolean recurse) throws IOException { // validatePackageName(packageName); nullCheck(packageName); nullCheck(kinds); Iterable<? extends File> path = getLocation(location); if (path == null) return List.nil(); RelativeDirectory subdirectory = RelativeDirectory.forPackage(packageName); ListBuffer<JavaFileObject> results = new ListBuffer<JavaFileObject>(); for (File directory : path) listContainer(directory, subdirectory, kinds, recurse, results); return results.toList(); }
Example 13
Source File: JavacFileManager.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
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); }
Example 14
Source File: JavacFileManager.java From javaide with GNU General Public License v3.0 | 5 votes |
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); }
Example 15
Source File: JavacFileManager.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
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); }
Example 16
Source File: JavacFileManager.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
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); }
Example 17
Source File: JavacFileManager.java From java-n-IDE-for-Android with Apache License 2.0 | 5 votes |
public FileObject getFileForOutput(Location location, String packageName, String relativeName, FileObject sibling) 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 getFileForOutput(location, name, sibling); }
Example 18
Source File: JavacFileManager.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
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); }
Example 19
Source File: JavacFileManager.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
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); }
Example 20
Source File: JavacFileManager.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
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); }