* added @getPlugins@ method to @PluginRegistry@ interface
git-svn-id: svn+ssh://svn.synyx.de/var/svn/synyx/opensource/hera/trunk@8542 5a64d73e-33d6-4ccc-9058-23f8668ecac9
This commit is contained in:
@@ -109,4 +109,14 @@ public interface PluginRegistry<T extends Plugin<S>, S> extends Iterable<T> {
|
||||
* @return
|
||||
*/
|
||||
boolean hasPluginFor(S delimiter);
|
||||
|
||||
|
||||
/**
|
||||
* Returns all {@link Plugin}s contained in this registry. Will return an
|
||||
* immutable {@link List} to prevent outside modifications of the
|
||||
* {@link PluginRegistry} content.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<? extends Plugin<S>> getPlugins();
|
||||
}
|
||||
@@ -229,14 +229,12 @@ public class SimplePluginRegistry<T extends Plugin<S>, S> implements
|
||||
* to access all plugins. For distinguished access to certain plugins favour
|
||||
* accessor methods like {link #getPluginFor} over this one. This method
|
||||
* should only be used for testing purposes to check registry configuration.
|
||||
* <p>
|
||||
* TODO: decide whether to make this method public
|
||||
*
|
||||
* @return all plugins of the registry
|
||||
*/
|
||||
protected List<? extends T> getPlugins() {
|
||||
public List<? extends T> getPlugins() {
|
||||
|
||||
return plugins;
|
||||
return Collections.unmodifiableList(plugins);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user