|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsk.baka.ambient.commons.Binder
public final class Binder
Binds a POJO bean to a view. Currently only public fields are supported - no getters/setters.
| Method Summary | ||
|---|---|---|
static java.util.Map<java.lang.Integer,java.lang.String> |
bindBeanMap(java.lang.Object bean,
java.util.Map<java.lang.String,java.lang.Object> map,
boolean beanToMap,
boolean validate)
Copies all properties annotated by Bind to a map. |
|
static java.util.Map<java.lang.Integer,java.lang.String> |
bindBeanToEditor(java.lang.Object bean,
android.content.SharedPreferences.Editor editor,
boolean validate)
Copies all properties annotated by Bind to an editor. |
|
static java.util.Map<java.lang.Integer,java.lang.String> |
bindBeanView(java.lang.Object bean,
android.view.View parent,
boolean beanToView,
boolean validate)
Copies all properties annotated by Bind to the view. |
|
static
|
copy(T from,
T to)
Copies all bindable properties from given bean to given bean. |
|
static
|
put(java.lang.String k,
V v,
java.lang.Class<? extends V> type,
android.content.SharedPreferences.Editor editor)
Puts given object into an editor. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.util.Map<java.lang.Integer,java.lang.String> bindBeanMap(java.lang.Object bean,
java.util.Map<java.lang.String,java.lang.Object> map,
boolean beanToMap,
boolean validate)
Bind to a map.
bean - the bean to copy from/tomap - the map to usebeanToMap - if true then data from the bean are copied into
the map. If false then map's data will be
copied into the bean.validate - if true then validation constraints are
checked.
public static java.util.Map<java.lang.Integer,java.lang.String> bindBeanToEditor(java.lang.Object bean,
android.content.SharedPreferences.Editor editor,
boolean validate)
Bind to an editor.
bean - the bean to copy fromeditor - the map to usevalidate - if true then validation constraints are
checked.
public static <V> void put(java.lang.String k,
V v,
java.lang.Class<? extends V> type,
android.content.SharedPreferences.Editor editor)
V - the value typek - key namev - valuetype - the value classeditor - the editor.
public static java.util.Map<java.lang.Integer,java.lang.String> bindBeanView(java.lang.Object bean,
android.view.View parent,
boolean beanToView,
boolean validate)
Bind to the view.
bean - the bean to copy from/toparent - the view to use for performing View lookup.beanToView - if true then data from the bean are copied into
the view. If false then view's data will be
copied into the bean.validate - if true then validation constraints are
checked.
public static <T> void copy(T from,
T to)
T - the bean typefrom - source beanto - target bean
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||