开源 企业版 高校版 私有云 模力方舟 AI 队友
代码拉取完成,页面将自动刷新
forked from Stefan/Java8Source
加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
已有帐号? 立即登录
文件
master
分支 (2)
master
develop
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
项目仓库所选许可证以仓库主分支所使用许可证为准
master
分支 (2)
master
develop
克隆/下载
克隆/下载
提示
下载代码请复制以下命令到终端执行
为确保你提交的代码身份被 Gitee 正确识别,请执行以下命令完成配置
初次使用 SSH 协议进行代码克隆、推送等操作时,需按下述提示完成 SSH 配置
1 生成 RSA 密钥
2 获取 RSA 公钥内容,并配置到 SSH公钥
在 Gitee 上使用 SVN,请访问 使用指南
使用 HTTPS 协议时,命令行会出现如下账号密码验证步骤。基于安全考虑,Gitee 建议 配置并使用私人令牌 替代登录密码进行克隆、推送等操作
Username for 'https://gitee.com': userName
Password for 'https://userName@gitee.com': # 私人令牌
master
分支 (2)
master
develop
Java8Source
/
src
/
javax
/
tools
/
StandardJavaFileManager.java
Java8Source
/
src
/
javax
/
tools
/
StandardJavaFileManager.java
StandardJavaFileManager.java 7.79 KB
一键复制 编辑 原始数据 按行查看 历史
Stefan 提交于 2020年08月11日 23:17 +08:00 . 初始化
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239
/*
* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package javax.tools;
import java.io.File;
import java.io.IOException;
import java.util.*;
/**
* File manager based on {@linkplain File java.io.File}. A common way
* to obtain an instance of this class is using {@linkplain
* JavaCompiler#getStandardFileManager
* getStandardFileManager}, for example:
*
* <pre>
* JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
* {@code DiagnosticCollector<JavaFileObject>} diagnostics =
* new {@code DiagnosticCollector<JavaFileObject>()};
* StandardJavaFileManager fm = compiler.getStandardFileManager(diagnostics, null, null);
* </pre>
*
* This file manager creates file objects representing regular
* {@linkplain File files},
* {@linkplain java.util.zip.ZipEntry zip file entries}, or entries in
* similar file system based containers. Any file object returned
* from a file manager implementing this interface must observe the
* following behavior:
*
* <ul>
* <li>
* File names need not be canonical.
* </li>
* <li>
* For file objects representing regular files
* <ul>
* <li>
* the method <code>{@linkplain FileObject#delete()}</code>
* is equivalent to <code>{@linkplain File#delete()}</code>,
* </li>
* <li>
* the method <code>{@linkplain FileObject#getLastModified()}</code>
* is equivalent to <code>{@linkplain File#lastModified()}</code>,
* </li>
* <li>
* the methods <code>{@linkplain FileObject#getCharContent(boolean)}</code>,
* <code>{@linkplain FileObject#openInputStream()}</code>, and
* <code>{@linkplain FileObject#openReader(boolean)}</code>
* must succeed if the following would succeed (ignoring
* encoding issues):
* <blockquote>
* <pre>new {@linkplain java.io.FileInputStream#FileInputStream(File) FileInputStream}(new {@linkplain File#File(java.net.URI) File}({@linkplain FileObject fileObject}.{@linkplain FileObject#toUri() toUri}()))</pre>
* </blockquote>
* </li>
* <li>
* and the methods
* <code>{@linkplain FileObject#openOutputStream()}</code>, and
* <code>{@linkplain FileObject#openWriter()}</code> must
* succeed if the following would succeed (ignoring encoding
* issues):
* <blockquote>
* <pre>new {@linkplain java.io.FileOutputStream#FileOutputStream(File) FileOutputStream}(new {@linkplain File#File(java.net.URI) File}({@linkplain FileObject fileObject}.{@linkplain FileObject#toUri() toUri}()))</pre>
* </blockquote>
* </li>
* </ul>
* </li>
* <li>
* The {@linkplain java.net.URI URI} returned from
* <code>{@linkplain FileObject#toUri()}</code>
* <ul>
* <li>
* must be {@linkplain java.net.URI#isAbsolute() absolute} (have a schema), and
* </li>
* <li>
* must have a {@linkplain java.net.URI#normalize() normalized}
* {@linkplain java.net.URI#getPath() path component} which
* can be resolved without any process-specific context such
* as the current directory (file names must be absolute).
* </li>
* </ul>
* </li>
* </ul>
*
* According to these rules, the following URIs, for example, are
* allowed:
* <ul>
* <li>
* <code>file:///C:/Documents%20and%20Settings/UncleBob/BobsApp/Test.java</code>
* </li>
* <li>
* <code>jar:///C:/Documents%20and%20Settings/UncleBob/lib/vendorA.jar!com/vendora/LibraryClass.class</code>
* </li>
* </ul>
* Whereas these are not (reason in parentheses):
* <ul>
* <li>
* <code>file:BobsApp/Test.java</code> (the file name is relative
* and depend on the current directory)
* </li>
* <li>
* <code>jar:lib/vendorA.jar!com/vendora/LibraryClass.class</code>
* (the first half of the path depends on the current directory,
* whereas the component after ! is legal)
* </li>
* <li>
* <code>Test.java</code> (this URI depends on the current
* directory and does not have a schema)
* </li>
* <li>
* <code>jar:///C:/Documents%20and%20Settings/UncleBob/BobsApp/../lib/vendorA.jar!com/vendora/LibraryClass.class</code>
* (the path is not normalized)
* </li>
* </ul>
*
* @author Peter von der Ah&eacute;
* @since 1.6
*/
public interface StandardJavaFileManager extends JavaFileManager {
/**
* Compares two file objects and return true if they represent the
* same canonical file, zip file entry, or entry in any file
* system based container.
*
* @param a a file object
* @param b a file object
* @return true if the given file objects represent the same
* canonical file or zip file entry; false otherwise
*
* @throws IllegalArgumentException if either of the arguments
* were created with another file manager implementation
*/
boolean isSameFile(FileObject a, FileObject b);
/**
* Gets file objects representing the given files.
*
* @param files a list of files
* @return a list of file objects
* @throws IllegalArgumentException if the list of files includes
* a directory
*/
Iterable<? extends JavaFileObject> getJavaFileObjectsFromFiles(
Iterable<? extends File> files);
/**
* Gets file objects representing the given files.
* Convenience method equivalent to:
*
* <pre>
* getJavaFileObjectsFromFiles({@linkplain java.util.Arrays#asList Arrays.asList}(files))
* </pre>
*
* @param files an array of files
* @return a list of file objects
* @throws IllegalArgumentException if the array of files includes
* a directory
* @throws NullPointerException if the given array contains null
* elements
*/
Iterable<? extends JavaFileObject> getJavaFileObjects(File... files);
/**
* Gets file objects representing the given file names.
*
* @param names a list of file names
* @return a list of file objects
* @throws IllegalArgumentException if the list of file names
* includes a directory
*/
Iterable<? extends JavaFileObject> getJavaFileObjectsFromStrings(
Iterable<String> names);
/**
* Gets file objects representing the given file names.
* Convenience method equivalent to:
*
* <pre>
* getJavaFileObjectsFromStrings({@linkplain java.util.Arrays#asList Arrays.asList}(names))
* </pre>
*
* @param names a list of file names
* @return a list of file objects
* @throws IllegalArgumentException if the array of file names
* includes a directory
* @throws NullPointerException if the given array contains null
* elements
*/
Iterable<? extends JavaFileObject> getJavaFileObjects(String... names);
/**
* Associates the given path with the given location. Any
* previous value will be discarded.
*
* @param location a location
* @param path a list of files, if {@code null} use the default
* path for this location
* @see #getLocation
* @throws IllegalArgumentException if location is an output
* location and path does not contain exactly one element
* @throws IOException if location is an output location and path
* does not represent an existing directory
*/
void setLocation(Location location, Iterable<? extends File> path)
throws IOException;
/**
* Gets the path associated with the given location.
*
* @param location a location
* @return a list of files or {@code null} if this location has no
* associated path
* @see #setLocation
*/
Iterable<? extends File> getLocation(Location location);
}
Loading...
举报
举报成功
我们将于2个工作日内通过站内信反馈结果给你!
请认真填写举报原因,尽可能描述详细。
请选择举报类型
取消
发送
误判申诉

此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。

如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。

取消
提交

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
编辑仓库简介
简介内容
主页
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/yxljava/Java8Source.git
git@gitee.com:yxljava/Java8Source.git
yxljava
Java8Source
Java8Source
master
点此查找更多帮助

搜索帮助

评论
仓库举报
回到顶部
登录提示
该操作需登录 Gitee 帐号,请先登录后再操作。
立即登录
没有帐号,去注册

AltStyle によって変換されたページ (->オリジナル) /