public static class Factory.Named.Util extends Object
| Constructor and Description |
|---|
Util() |
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
create(List<Factory.Named<T>> factories,
String name)
Creates an object by picking a factory from
factories that is identified by name from a
list of named factories. |
static <T> Factory.Named<T> |
get(List<Factory.Named<T>> factories,
String name)
Retrieve a particular factory as identified by
name from a list of named factories. |
static <T> List<String> |
getNames(List<Factory.Named<T>> factories)
Get a comma-delimited string containing the factory names from the given list of
factories. |
public static <T> T create(List<Factory.Named<T>> factories, String name)
factories that is identified by name from a
list of named factories. Uses the first match.T - type of the factoriesfactories - list of available factoriesname - name of the desired factoryT or null if there was no matchpublic static <T> Factory.Named<T> get(List<Factory.Named<T>> factories, String name)
name from a list of named factories.
Returns the first match.T - type of the factoriesfactories - list of factoriesname - the name of the factory to retrievenull if there was no matchpublic static <T> List<String> getNames(List<Factory.Named<T>> factories)
factories.T - type of the factoriesfactories - list of available factoriesCopyright © 2009–2014. All rights reserved.