/**
* Add a {@link Plugin} class to the list of known plugins
*
* @param plugin the plugin class
* @param priority the priority to give the plugin
*/
private void addPlugin(Class<? extends Plugin> plugin, PluginPriority priority) {
switch (priority) {
case LOW:
lowPriorityPlugins.add(plugin);
break;
case HIGH:
highPriorityPlugins.add(plugin);
break;
case NORMAL:
default:
normalPriorityPlugins.add(plugin);
break;
}
SupportedOptions supportedOptionsAnnotation = plugin.getAnnotation(SupportedOptions.class);
if (supportedOptionsAnnotation != null) {
String[] options = supportedOptionsAnnotation.value();
Collections.addAll(pluginSupportedOptions, options);
}
}
java类javax.annotation.processing.SupportedOptions的实例源码
PluginEnvironment.java 文件源码
项目:squidb
阅读 26
收藏 0
点赞 0
评论 0