Skip to content

Commit

Permalink
#41 - Polishing.
Browse files Browse the repository at this point in the history
Javadoc.
  • Loading branch information
odrotbohm committed Apr 21, 2017
1 parent 856f662 commit 1298d05
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ protected OrderAwarePluginRegistry(List<? extends T> plugins, Comparator<? super
/**
* Creates a new {@link OrderAwarePluginRegistry} using the {@code #DEFAULT_COMPARATOR}.
*
* @param <T>
* @param <S>
* @return
*/
public static <S, T extends Plugin<S>> OrderAwarePluginRegistry<T, S> create() {
Expand All @@ -77,8 +75,6 @@ public static <S, T extends Plugin<S>> OrderAwarePluginRegistry<T, S> create() {
* Creates a new {@link OrderAwarePluginRegistry} using the given {@link Comparator} for ordering contained
* {@link Plugin}s.
*
* @param <T>
* @param <S>
* @return
*/
public static <S, T extends Plugin<S>> OrderAwarePluginRegistry<T, S> create(Comparator<? super T> comparator) {
Expand All @@ -88,8 +84,6 @@ public static <S, T extends Plugin<S>> OrderAwarePluginRegistry<T, S> create(Com
/**
* Creates a new {@link OrderAwarePluginRegistry} with the given plugins.
*
* @param <S>
* @param <T>
* @param plugins
* @return
*/
Expand All @@ -100,8 +94,6 @@ public static <S, T extends Plugin<S>> OrderAwarePluginRegistry<T, S> create(Lis
/**
* Creates a new {@link OrderAwarePluginRegistry} with the given plugins and the order of the plugins reverted.
*
* @param <S>
* @param <T>
* @param plugins
* @return
*/
Expand All @@ -112,8 +104,6 @@ public static <S, T extends Plugin<S>> OrderAwarePluginRegistry<T, S> createReve
/**
* Creates a new {@link OrderAwarePluginRegistry} with the given plugins.
*
* @param <S>
* @param <T>
* @param plugins
* @return
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,21 @@
import java.util.function.Supplier;

/**
* Registry for plugins. Allows sophisticated typesafe access to implementations of interfaces extending {link Plugin}.
* Registry for {@link Plugin}s. Allows sophisticated typesafe access to implementations of interfaces extending {link
* Plugin}.
*
* @param <T> the concrete plugin interface
* @param <T> the concrete {@link Plugin} interface
* @param <S> the delimiter type
* @author Oliver Gierke
*/
public interface PluginRegistry<T extends Plugin<S>, S> extends Iterable<T> {

/**
* Returns the first plugin found for the given originating system. Thus, further configured plugins are ignored.
* Returns the first {@link Plugin} found for the given delimiter. Thus, further configured {@link Plugin}s are
* ignored.
*
* @param originatingSystem
* @return a plugin for the given originating system or {@code null} if none found
* @param delimiter
* @return a plugin for the given delimiter or {@link Optional#empty()} if none found.
*/
Optional<T> getPluginFor(S delimiter);

Expand Down Expand Up @@ -102,7 +104,7 @@ public interface PluginRegistry<T extends Plugin<S>, S> extends Iterable<T> {
* found.
*
* @param delimiter can be {@literal null}.
* @param plugin must not be {@literal null}.
* @param defaultSupplier must not be {@literal null}.
* @return a single {@link Plugin} supporting the given delimiter or the given lazily provided {@link Plugin} if none
* found.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
* Basic implementation of {@link PluginRegistry}. Simply holds all given plugins in a list dropping {@literal null}
* values silently on adding.
*
* @param <T> the concrete plugin interface
* @param <S> the delimiter type
* @author Oliver Gierke
*/
public class SimplePluginRegistry<T extends Plugin<S>, S> extends PluginRegistrySupport<T, S> {
Expand All @@ -46,8 +44,6 @@ protected SimplePluginRegistry(List<? extends T> plugins) {
/**
* Creates a new {@link SimplePluginRegistry}.
*
* @param <T> the plugin type
* @param <S> the delimiter type
* @return
*/
public static <S, T extends Plugin<S>> SimplePluginRegistry<T, S> create() {
Expand All @@ -57,8 +53,6 @@ public static <S, T extends Plugin<S>> SimplePluginRegistry<T, S> create() {
/**
* Creates a new {@link SimplePluginRegistry} with the given {@link Plugin} s.
*
* @param <T> the plugin type
* @param <S> the delimiter type
* @return
*/
public static <S, T extends Plugin<S>> SimplePluginRegistry<T, S> create(List<? extends T> plugins) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.springframework.plugin.core;

import static org.hamcrest.CoreMatchers.*;
Expand Down

0 comments on commit 1298d05

Please sign in to comment.