public interface ComponentsFactory
AppBeans
.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAME |
Modifier and Type | Method and Description |
---|---|
<T extends Component> |
createComponent(java.lang.Class<T> type)
Create a component instance by its type.
|
Component |
createComponent(ComponentGenerationContext context)
Creates a component according to the given
ComponentGenerationContext . |
Component |
createComponent(java.lang.String name)
Create a component instance by its name.
|
Timer |
createTimer()
Create a timer instance.
|
static final java.lang.String NAME
Component createComponent(java.lang.String name)
name
- component name. It is usually defined in NAME constant inside the component interface,
e.g. Label.NAME
.
It is also usually equal to component's XML name.<T extends Component> T createComponent(java.lang.Class<T> type)
type
- component typeComponent createComponent(ComponentGenerationContext context)
ComponentGenerationContext
.
Trying to find ComponentGenerationStrategy
implementations. If at least one strategy exists, then:
Ordered
interface.null
component.context
- the ComponentGenerationContext
instancejava.lang.IllegalArgumentException
- if no component can be created for a given contextTimer createTimer()