public interface Binder<T>
Runtime contract a build-time-generated component binder implements for one
@Bindable class.
Application code rarely references Binder directly – it goes through
Binders#bind. The interface exists so generated code has a single
ServiceLoader-friendly shape and hand-written extensions can sit on the
same type.
Methods
public abstract Class<T> type() | The class this binder handles. |
public abstract Binding bind(T model, Container container) | Pushes every @Bind field on model into the matching component in container. |
Method details
type
public abstract Class<T> type()The class this binder handles.
bind
public abstract Binding bind(T model, Container container)Pushes every
@Bind field on model into the matching component in
container. Components are located by name via a recursive scan that
matches Component#getName() against @Bind(name=...). Wires up
two-way listeners on editable text fields and toggle buttons so
subsequent user input updates the model.