public static class NamedFactory.Utils
extends java.lang.Object
| Constructor and Description |
|---|
NamedFactory.Utils() |
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
create(java.util.List<NamedFactory<T>> factories,
java.lang.String name)
Create an instance of the specified name by looking up the needed factory
in the list.
|
static <T> NamedFactory<T> |
get(java.util.List<NamedFactory<T>> factories,
java.lang.String name)
Retrieve the factory identified by its name from the list.
|
static <T> java.lang.String |
getNames(java.util.List<NamedFactory<T>> factories)
Get a comma separated list of the factory names from the given list.
|
static <T> NamedFactory<T> |
remove(java.util.List<NamedFactory<T>> factories,
java.lang.String name)
Remove the factory identified by the name from the list.
|
public static <T> T create(java.util.List<NamedFactory<T>> factories, java.lang.String name)
T - type of object to createfactories - list of available factoriesname - the factory name to usenull if the factory is not in the listpublic static <T> java.lang.String getNames(java.util.List<NamedFactory<T>> factories)
T - type of object to createfactories - list of available factoriespublic static <T> NamedFactory<T> remove(java.util.List<NamedFactory<T>> factories, java.lang.String name)
T - type of object to createfactories - list of factoriesname - the name of the factory to removenull if not in the listpublic static <T> NamedFactory<T> get(java.util.List<NamedFactory<T>> factories, java.lang.String name)
T - type of object create by the factoriesfactories - list of available factoriesname - the name of the factory to retrievenull if not found in the listCopyright © 2008-2014 The Apache Software Foundation. All Rights Reserved.