Closeable, AutoCloseable, Supplier<O>public class ApplicationComponent<O> extends Object implements Supplier<O>, Closeable
ApplicationContext.
To generate a such component, just place the GenerateApplicationComponent annotation on it.
GenerateApplicationComponent| Modifier | Constructor | Description |
|---|---|---|
protected |
ApplicationComponent(String name,
Class<O> componentType,
boolean requireNotNull,
ApplicationComponentInstantiateStrategy instantiateStrategy,
Class<?>[] hints,
Class<?>[] dependencies) |
|
protected |
ApplicationComponent(String name,
Class<O> componentType,
boolean requireNotNull,
ApplicationComponentInstantiateStrategy instantiateStrategy,
Class<?>[] hints,
Class<?>[] dependencies,
ApplicationComponentValueSupplier<O> supplier) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
addExtraHints(Class<?>... hints) |
|
void |
close() |
|
O |
get() |
|
Class<O> |
getComponentType() |
|
List<Class<?>> |
getDependencies() |
|
List<Class<?>> |
getHints() |
|
String |
getName() |
|
void |
setValue(O value) |
|
String |
toString() |
|
boolean |
withDependencies() |
protected ApplicationComponent(String name, Class<O> componentType, boolean requireNotNull, ApplicationComponentInstantiateStrategy instantiateStrategy, Class<?>[] hints, Class<?>[] dependencies)
protected ApplicationComponent(String name, Class<O> componentType, boolean requireNotNull, ApplicationComponentInstantiateStrategy instantiateStrategy, Class<?>[] hints, Class<?>[] dependencies, ApplicationComponentValueSupplier<O> supplier)
public String getName()
public void setValue(O value)
public void close()
throws IOException
close in interface AutoCloseableclose in interface CloseableIOExceptionpublic boolean withDependencies()
public void addExtraHints(Class<?>... hints)
Copyright © 2019–2020 Ultreia.io. All rights reserved.