@Component(value="cuba_UiControllerPropertyInjector")
@Scope(value="prototype")
public class UiControllerPropertyInjector
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected FrameOwner |
frameOwner |
static java.lang.String |
NAME |
protected java.util.List<UiControllerProperty> |
properties |
protected UiControllerReflectionInspector |
reflectionInspector |
protected Screen |
sourceScreen |
Constructor and Description |
---|
UiControllerPropertyInjector(FrameOwner frameOwner,
java.util.List<UiControllerProperty> properties)
Creates UiControllerPropertyInjector to inject properties into fragments
|
UiControllerPropertyInjector(FrameOwner frameOwner,
Screen sourceScreen,
java.util.List<UiControllerProperty> properties)
Creates UiControllerPropertyInjector to inject properties into
ScreenFacet . |
Modifier and Type | Method and Description |
---|---|
protected Component |
findComponent(java.lang.String componentId) |
protected InstanceContainer |
findDataContainer(java.lang.String containerId) |
protected Datasource |
findDatasource(java.lang.String datasourceId) |
protected DataLoader |
findLoader(java.lang.String loaderId) |
protected java.lang.Object |
findObjectByRef(UiControllerProperty property,
java.lang.Class<?> propType) |
protected java.lang.reflect.Method |
findSuitableSetter(java.lang.String propName) |
protected java.lang.String |
getSetterName(java.lang.String name) |
void |
inject() |
protected java.lang.Object |
parseNumber(UiControllerProperty property,
java.lang.Class<? extends java.lang.Number> numberType) |
protected java.lang.Object |
parseParamValue(UiControllerProperty property,
java.lang.Class<?> propType) |
protected java.lang.Object |
parsePrimitive(UiControllerProperty property,
java.lang.Class propType) |
void |
setReflectionInspector(UiControllerReflectionInspector reflectionInspector) |
public static final java.lang.String NAME
protected final FrameOwner frameOwner
protected final Screen sourceScreen
protected final java.util.List<UiControllerProperty> properties
protected UiControllerReflectionInspector reflectionInspector
public UiControllerPropertyInjector(FrameOwner frameOwner, java.util.List<UiControllerProperty> properties)
frameOwner
- target screenproperties
- properties to injectpublic UiControllerPropertyInjector(FrameOwner frameOwner, Screen sourceScreen, java.util.List<UiControllerProperty> properties)
ScreenFacet
.frameOwner
- target screensourceScreen
- source screen that is used to load ref propertiesproperties
- properties to inject@Inject public void setReflectionInspector(UiControllerReflectionInspector reflectionInspector)
public void inject()
@Nullable protected java.lang.reflect.Method findSuitableSetter(java.lang.String propName)
@Nullable protected java.lang.Object parseParamValue(UiControllerProperty property, java.lang.Class<?> propType)
protected java.lang.Object parsePrimitive(UiControllerProperty property, java.lang.Class propType)
protected java.lang.Object parseNumber(UiControllerProperty property, java.lang.Class<? extends java.lang.Number> numberType)
@Nullable protected java.lang.Object findObjectByRef(UiControllerProperty property, java.lang.Class<?> propType)
protected java.lang.String getSetterName(java.lang.String name)
@Nullable protected Component findComponent(java.lang.String componentId)
@Nullable protected InstanceContainer findDataContainer(java.lang.String containerId)
@Nullable protected Datasource findDatasource(java.lang.String datasourceId)
@Nullable protected DataLoader findLoader(java.lang.String loaderId)