public class SingletonServiceFactory extends Object
| Constructor and Description |
|---|
SingletonServiceFactory() |
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
getBean(Class<T> interfaceClass)
Get a cached singleton object from service map by interface class.
|
static <T> T |
getBean(Class<T> interfaceClass,
Class typeClass)
Get a cached singleton object from service map by interface class and generic type class.
|
static <T> T[] |
getBeans(Class<T> interfaceClass)
Get a list of cached singleton objects from service map by interface class.
|
static void |
setBean(String className,
Object object)
This is a testing API that you can manipulate serviceMap by inject an object
into it programmatically.
|
public static <T> T getBean(Class<T> interfaceClass, Class typeClass)
T - class typeinterfaceClass - Interface classtypeClass - Generic type classpublic static <T> T getBean(Class<T> interfaceClass)
T - class typeinterfaceClass - Interface classpublic static <T> T[] getBeans(Class<T> interfaceClass)
T - class typeinterfaceClass - Interface classpublic static void setBean(String className, Object object)
className - full classname with packageobject - The object that you want to binding to the classCopyright © 2019. All rights reserved.