public class ApolloConfigDataInjectorCustomizer extends Object implements com.ctrip.framework.apollo.spi.ApolloInjectorCustomizer
| Modifier and Type | Field and Description |
|---|---|
static int |
ORDER
the order of the injector customizer
|
| Constructor and Description |
|---|
ApolloConfigDataInjectorCustomizer() |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
getInstance(Class<T> clazz) |
<T> T |
getInstance(Class<T> clazz,
String name) |
int |
getOrder() |
static <T> boolean |
isRegistered(Class<T> type)
Return if a registration exists for the given type.
|
static <T> void |
register(Class<T> type,
Supplier<T> instanceSupplier)
Register a specific type with the registry.
|
static <T> void |
registerIfAbsent(Class<T> type,
Supplier<T> instanceSupplier)
Register a specific type with the registry if one is not already present.
|
public static final int ORDER
public static <T> void register(Class<T> type, Supplier<T> instanceSupplier)
T - the instance typetype - the instance typeinstanceSupplier - the instance supplierpublic static <T> void registerIfAbsent(Class<T> type, Supplier<T> instanceSupplier)
T - the instance typetype - the instance typeinstanceSupplier - the instance supplierpublic static <T> boolean isRegistered(Class<T> type)
T - the instance typetype - the instance typetrue if the type has already been registeredpublic <T> T getInstance(Class<T> clazz)
getInstance in interface com.ctrip.framework.apollo.internals.Injectorpublic <T> T getInstance(Class<T> clazz, String name)
getInstance in interface com.ctrip.framework.apollo.internals.Injectorpublic int getOrder()
getOrder in interface com.ctrip.framework.apollo.core.spi.OrderedCopyright © 2021 Ctrip, Inc.. All rights reserved.