摘要:
Enumeration(枚举)接口的作用和Iterator类似,只提供了遍历Vector和Hashtable类型集合元素的功能,不支持元素的移除操作。 Java8中Enumeration接口的源码: package java.util; public interface Enumeration<E> 阅读全文
摘要:
前言: SPI是jdk内置的服务发现机制, 全称叫Service Provider Interface. SPI的工作原理, 就是ClassPath路径下的META-INF/services文件夹中, 以接口的全限定名来命名文件名, 文件里面写该接口的实现。 然后再资源加载的方式,读取文件的内容(接 阅读全文