// Needed to query some special information
final PluginManagerImpl pmi = (PluginManagerImpl) this.pluginManager;
// To handle annotations, we need to obtain the true class
final Pluggable pluggable = (_plugin instanceof PluginWrapper) ? ((PluginWrapper) _plugin).getWrappedPlugin() : _plugin;
// Prepare return values ...
final Collection<String> rval = new ArrayList<String>();
switch (item) {
case CAPABILITIES:
// Caps are only supported for plugins currently
final String[] caps = getCaps(pluggable);
for (final String string : caps) {
rval.add(string);
}
break;
case AUTHORS:
Author author = pluggable.getClass().getAnnotation(Author.class);
if (author == null) break;
rval.add(author.name());
break;
case VERSION:
Version version = pluggable.getClass().getAnnotation(Version.class);
if (version == null) break;
rval.add(Integer.toString(version.version()));
break;
case CLASSPATH_ORIGIN: