首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > Java > java注释和处理器简化服务提供者接口的使用

java注释和处理器简化服务提供者接口的使用

资 源 简 介

The usage of the Service Provider Interface in Java is a great way to make your program more extensible. However, implementing and distributing such an Interface is error prone. One of the reasons is that the system depends on naming schemes and text files. The name of an implementation should be put in a text file, located on the classpath in a folder called META-INF/services/. This project allows the programmer to use an Annotation, @ProviderFor, to flag a class as an implementation of a certain interface. During compilation, the necessary files are created at the appropriate locations. Also, the class is inspected to see if it follows all rules applicable to Service Providers. Compile time errors will be generated if those rules are broken, assisting the programmer to create more robust code.

文 件 列 表

META-INF
services
org
mangosdk

相 关 资 源

您 可 能 感 兴 趣 的

同 类 别 推 荐

VIP VIP