在Java社区,有那么一小撮人,觉得Java API还不足用,至少还不够好用,就起了给增强Java API的念头,于是Apache Commons项目诞生了。为了便于被使用,Apache Commons项目采用了与Java API的包一致的方式组织,于是出现了一系列子项目。
伴随着Apache Commons项目的发展,有些子项目保持了顽强的生命力,而有些则慢慢沦为弃子,还有些新的子项目不断产生。于是,Apache Commons项目首先被分为如下3个独立的组件库:
- Apache Commons Sandbox,Java组件开发的试验空间
- Apache Commons Dormant,遗留Java组件库(不建议使用)
- Apache Commons Proper,Java组件库
事实上,大家开发过程中,通常能够想起来的都属于Apache Commons Proper库,这也是我们后续要讨论的库。所以,默认提到Apache Commons项目都是指Apache Commons Proper库中的组件。
Apache Commons Proper库中的组件都是以子项目的形式组织,列表如下:
Components | Description | Latest Version | Released |
---|---|---|---|
BCEL | Byte Code Engineering Library - analyze, create, and manipulate Java class files | 6.2 | 2017-11-08 |
BeanUtils | Easy-to-use wrappers around the Java reflection and introspection APIs. 为Java Bean的动态属性(运行时才确定的属性)提供getter/setter方法。 主要工具类:PropertyUtils(推荐),BeanUtils |
1.9.3 | 2016-09-26 |
BSF | Bean Scripting Framework - interface to scripting languages, including JSR-223 | 3.1 | 2010-06-24 |
Chain | Chain of Responsibility pattern implemention. | 1.2 | 2008-06-02 |
CLI | Command Line arguments parser. | 1.4 | 2017-03-09 |
Codec |