|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.sshd.common.NamedFactory.Utils
public static class NamedFactory.Utils
Utility class to help using NamedFactories
Constructor Summary | |
---|---|
NamedFactory.Utils()
|
Method Summary | ||
---|---|---|
static
|
create(List<NamedFactory<T>> factories,
String name)
Create an instance of the specified name by looking up the needed factory in the list. |
|
static
|
get(List<NamedFactory<T>> factories,
String name)
Retrieve the factory identified by its name from the list. |
|
static
|
getNames(List<NamedFactory<T>> factories)
Get a comma separated list of the factory names from the given list. |
|
static
|
remove(List<NamedFactory<T>> factories,
String name)
Remove the factory identified by the name from the list. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NamedFactory.Utils()
Method Detail |
---|
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 use
null
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 factories
public 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 remove
null
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 retrieve
null
if not found in the list
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |