public class ReflectionBindingProcessor extends Object implements AdvancedWidgetProcessor<android.view.View,AndroidMetawidget>
This is the typical Android approach to binding UI buttons to Java objects using reflection.
Constructor and Description |
---|
ReflectionBindingProcessor() |
Modifier and Type | Method and Description |
---|---|
void |
onEndBuild(AndroidMetawidget metawidget)
Event called at the end of widget building, after all widgets have been built and added to
the
Layout . |
void |
onStartBuild(AndroidMetawidget metawidget)
Event called at the start of the widget building process, before the
WidgetBuilder is called. |
android.view.View |
processWidget(android.view.View view,
String elementName,
Map<String,String> attributes,
AndroidMetawidget metawidget)
Process the given widget.
|
public void onStartBuild(AndroidMetawidget metawidget)
AdvancedWidgetProcessor
WidgetBuilder
is called. WidgetProcessor
s may wish to act on this
event to initialize themselves ready for processing. This event is only called once per
inspection, not once per widget built.onStartBuild
in interface AdvancedWidgetProcessor<android.view.View,AndroidMetawidget>
metawidget
- the parent Metawidget. Never nullpublic android.view.View processWidget(android.view.View view, String elementName, Map<String,String> attributes, AndroidMetawidget metawidget)
WidgetProcessor
WidgetBuilder
, and before it is added to the Layout
.processWidget
in interface WidgetProcessor<android.view.View,AndroidMetawidget>
view
- the widget to process. Never nullelementName
- XML node name of the business field. Typically 'entity', 'property' or 'action'.
Never nullattributes
- attributes of the widget to process. Never null. This Map is modifiable - changes
will be passed to subsequent WidgetProcessors and Layoutsmetawidget
- the parent Metawidget. Never nullpublic void onEndBuild(AndroidMetawidget metawidget)
AdvancedWidgetProcessor
Layout
. WidgetProcessor
s may wish to act on this event to clean
themselves up after processing. This event is only called once per inspection, not once per
widget built.onEndBuild
in interface AdvancedWidgetProcessor<android.view.View,AndroidMetawidget>
metawidget
- the parent Metawidget. Never nullCopyright © 2015. All Rights Reserved.