#41 - Polishing.

Javadoc.
This commit is contained in:
Oliver Gierke
2017-04-21 08:02:49 +02:00
parent 856f662cf9
commit 1298d05e9f
4 changed files with 8 additions and 23 deletions

View File

@@ -65,8 +65,6 @@ public class OrderAwarePluginRegistry<T extends Plugin<S>, S> extends SimplePlug
/**
* 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() {
@@ -77,8 +75,6 @@ public class OrderAwarePluginRegistry<T extends Plugin<S>, S> extends SimplePlug
* 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) {
@@ -88,8 +84,6 @@ public class OrderAwarePluginRegistry<T extends Plugin<S>, S> extends SimplePlug
/**
* Creates a new {@link OrderAwarePluginRegistry} with the given plugins.
*
* @param <S>
* @param <T>
* @param plugins
* @return
*/
@@ -100,8 +94,6 @@ public class OrderAwarePluginRegistry<T extends Plugin<S>, S> extends SimplePlug
/**
* Creates a new {@link OrderAwarePluginRegistry} with the given plugins and the order of the plugins reverted.
*
* @param <S>
* @param <T>
* @param plugins
* @return
*/
@@ -112,8 +104,6 @@ public class OrderAwarePluginRegistry<T extends Plugin<S>, S> extends SimplePlug
/**
* Creates a new {@link OrderAwarePluginRegistry} with the given plugins.
*
* @param <S>
* @param <T>
* @param plugins
* @return
*/

View File

@@ -20,19 +20,21 @@ import java.util.Optional;
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);
@@ -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.
*/

View File

@@ -28,8 +28,6 @@ import org.springframework.util.Assert;
* 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> {
@@ -46,8 +44,6 @@ public class SimplePluginRegistry<T extends Plugin<S>, S> extends PluginRegistry
/**
* 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() {
@@ -57,8 +53,6 @@ public class SimplePluginRegistry<T extends Plugin<S>, S> extends PluginRegistry
/**
* 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) {

View File

@@ -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.*;