public static class NamedFactory.Utils extends Object
Constructor and Description |
---|
NamedFactory.Utils() |
Modifier and Type | Method and Description |
---|---|
static <T> T |
create(List<NamedFactory<T>> factories,
String name)
Create an instance of the specified name by looking up the needed factory
in the list.
|
static <T> NamedFactory<T> |
get(List<NamedFactory<T>> factories,
String name)
Retrieve the factory identified by its name from the list.
|
static <T> String |
getNames(List<NamedFactory<T>> factories)
Get a comma separated list of the factory names from the given list.
|
static <T> NamedFactory<T> |
remove(List<NamedFactory<T>> factories,
String name)
Remove the factory identified by the name from the list.
|
public static <T> T create(List<NamedFactory<T>> factories, 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> String getNames(List<NamedFactory<T>> factories)
T
- type of object to createfactories
- list of available factoriespublic static <T> NamedFactory<T> remove(List<NamedFactory<T>> factories, 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(List<NamedFactory<T>> factories, 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–2013 The Apache Software Foundation. All rights reserved.