org.apache.catalina.WebResourceRoot.getClassLoaderResources()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(2.5k)|赞(0)|评价(0)|浏览(87)

本文整理了Java中org.apache.catalina.WebResourceRoot.getClassLoaderResources()方法的一些代码示例,展示了WebResourceRoot.getClassLoaderResources()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebResourceRoot.getClassLoaderResources()方法的具体详情如下:
包路径:org.apache.catalina.WebResourceRoot
类名称:WebResourceRoot
方法名:getClassLoaderResources

WebResourceRoot.getClassLoaderResources介绍

[英]Obtain the objects that represent the class loader resource at the given path. Note that the resource at that path may not exist. If the path does not exist, the WebResource returned will be associated with the main WebResourceSet. This will include all matches even if the resource would not normally be accessible (e.g. because it was overridden by another resource)
[中]获取表示给定路径上的类加载器资源的对象。请注意,该路径上的资源可能不存在。如果路径不存在,则返回的WebResource将与主WebResourceSet关联。这将包括所有匹配项,即使资源通常不可访问(例如,因为它被另一个资源覆盖)

代码示例

代码示例来源:origin: org.apache.tomee/tomee-catalina

@Override
public WebResource[] getClassLoaderResources(final String path) {
  return delegate.getClassLoaderResources(path);
}

代码示例来源:origin: codefollower/Tomcat-Research

/**
 * Return an enumeration of <code>URLs</code> representing all of the
 * resources with the given name.  If no resources with this name are
 * found, return an empty enumeration.
 *
 * @param name Name of the resources to be found
 *
 * @exception IOException if an input/output error occurs
 */
@Override
public Enumeration<URL> findResources(String name) throws IOException {
  if (log.isDebugEnabled())
    log.debug("    findResources(" + name + ")");
  LinkedHashSet<URL> result = new LinkedHashSet<>();
  String path = nameToPath(name);
  WebResource[] webResources = resources.getClassLoaderResources(path);
  for (WebResource webResource : webResources) {
    if (webResource.exists()) {
      result.add(webResource.getURL());
    }
  }
  return Collections.enumeration(result);
}

代码示例来源:origin: org.apache.tomcat/tomcat-catalina

WebResource[] webResources = resources.getClassLoaderResources(path);
for (WebResource webResource : webResources) {
  if (webResource.exists()) {

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

WebResource[] webResources = resources.getClassLoaderResources(path);
for (WebResource webResource : webResources) {
  if (webResource.exists()) {

代码示例来源:origin: org.apache.tomcat/tomcat-catalina

resources.getClassLoaderResources("/META-INF/MANIFEST.MF");
for (WebResource manifestResource : manifestResources) {
  if (manifestResource.isFile()) {

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

resources.getClassLoaderResources("/META-INF/MANIFEST.MF");
for (WebResource manifestResource : manifestResources) {
  if (manifestResource.isFile()) {

相关文章

微信公众号

最新文章

更多