[Japi-cvs] SF.net SVN: japi: [444] libs/registry/trunk/src/net/sf/japi/registry/ NamedRegistry.java
Status: Beta
Brought to you by:
christianhujer
From: <chr...@us...> - 2007-06-25 19:58:40
|
Revision: 444 http://svn.sourceforge.net/japi/?rev=444&view=rev Author: christianhujer Date: 2007-06-25 12:58:39 -0700 (Mon, 25 Jun 2007) Log Message: ----------- Fixed checkstyle issues. Modified Paths: -------------- libs/registry/trunk/src/net/sf/japi/registry/NamedRegistry.java Modified: libs/registry/trunk/src/net/sf/japi/registry/NamedRegistry.java =================================================================== --- libs/registry/trunk/src/net/sf/japi/registry/NamedRegistry.java 2007-06-25 19:57:02 UTC (rev 443) +++ libs/registry/trunk/src/net/sf/japi/registry/NamedRegistry.java 2007-06-25 19:58:39 UTC (rev 444) @@ -33,8 +33,12 @@ * Future implementations (Java 1.6+) will be based on the corresponding replacement. * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ -public class NamedRegistry { +public final class NamedRegistry { + /** Utility class - don't instanciate. */ + private NamedRegistry() { + } + /** * Returns the implementation of the supplied {@link NamedService} with the specified name. * @param service NamedService to get @@ -42,7 +46,7 @@ * @return Implementation or <code>null</code> if none found. */ @Nullable public static <T extends NamedService> T getInstance(@NotNull final Class<T> service, @NotNull final String name) { - for (final Iterator<T> it = Service.providers(service); it.hasNext(); ) { + for (final Iterator<T> it = Service.providers(service); it.hasNext();) { final T t = it.next(); if (t.getName().equals(name)) { return t; @@ -61,7 +65,7 @@ */ @NotNull public static <T> Collection<T> getAllInstances(@NotNull final Class<T> service) { final List<T> instances = new ArrayList<T>(); - for (final Iterator<T> it = Service.providers(service); it.hasNext(); ) { + for (final Iterator<T> it = Service.providers(service); it.hasNext();) { instances.add(it.next()); } return instances; @@ -75,7 +79,7 @@ * @return Implementation or <code>null</code> if none found. */ @Nullable public static <T extends NamedService> T getInstance(@NotNull final Class<T> service, @NotNull final String name, @NotNull final ClassLoader classLoader) { - for (final Iterator<T> it = Service.providers(service, classLoader); it.hasNext(); ) { + for (final Iterator<T> it = Service.providers(service, classLoader); it.hasNext();) { final T t = it.next(); if (t.getName().equals(name)) { return t; @@ -95,7 +99,7 @@ */ @NotNull public static <T> Collection<T> getAllInstances(@NotNull final Class<T> service, @NotNull final ClassLoader classLoader) { final List<T> instances = new ArrayList<T>(); - for (final Iterator<T> it = Service.providers(service, classLoader); it.hasNext(); ) { + for (final Iterator<T> it = Service.providers(service, classLoader); it.hasNext();) { instances.add(it.next()); } return instances; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |