Part of formless.annotate View Source View In Hierarchy
Known subclasses: formless.annotate.Argument, formless.annotate.ElementBinding, formless.annotate.GroupBinding, formless.annotate.MethodBinding, formless.annotate.Property
Implements interfaces: formless.iformless.IBinding
Bindings bind a Typed instance to a name. When TypedInterface is subclassed, the metaclass looks through the dict looking for all properties and methods.
If a properties is a Typed instance, a Property Binding is constructed, passing the name of the binding and the Typed instance.
If a method has been wrapped with the "autocallable" function adapter, a Method Binding is constructed, passing the name of the binding and the Typed instance. Then, getargspec is called. For each keyword argument in the method definition, an Argument is constructed, passing the name of the keyword argument as the binding name, and the value of the keyword argument, a Typed instance, as the binding typeValue.
One more thing. When an autocallable method is found, it is called with None as the self argument. The return value is passed the the Method Binding when it is constructed to keep track of what the method is supposed to return.| Line # | Kind | Name | Docs |
|---|---|---|---|
| 516 | Method | __init__ | Undocumented |
| 531 | Method | __repr__ | Undocumented |
| 534 | Method | getArgs | Return a *copy* of this Binding. |
| 539 | Method | getViewName | Todo: remove? |
| 542 | Method | configure | Configure the object "boundTo" in the manner appropriate |
| 545 | Method | coerce | TODO This is dumb. remove it and leave it on ITyped |
TODO This is dumb. remove it and leave it on ITyped
Make the code that calls coerce call it on the typed directly