首页 > 编程语言 > 详细

java常用关键词关键字,方法源码解析

时间:2019-09-13 21:43:54      阅读:170      评论:0      收藏:0      [点我收藏+]
  • transient
  • volatile
  • native
  • final
  • Integer
  • String
  • Class &&Object
  • newInstance Class.forName,ClassLoader.loadClass
  • ClassLoader .getResources(), ClassLoader.getSystemResources()

 

ClassLoader .getResources(), ClassLoader.getSystemResources()

 public Enumeration<URL> getResources(String name) throws IOException {
        @SuppressWarnings("unchecked")
        Enumeration<URL>[] tmp = (Enumeration<URL>[]) new Enumeration<?>[2];
        if (parent != null) {
            tmp[0] = parent.getResources(name);
        } else {
            tmp[0] = getBootstrapResources(name);
        }
        tmp[1] = findResources(name);

        return new CompoundEnumeration<>(tmp);
    }
 public static Enumeration<URL> getSystemResources(String name)
        throws IOException
    {
        ClassLoader system = getSystemClassLoader();
        if (system == null) {
            return getBootstrapResources(name);
        }
        return system.getResources(name);
    }

 

java常用关键词关键字,方法源码解析

原文:https://www.cnblogs.com/wongandy/p/11517622.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!