| Home | Trees | Index | Help |
|---|
| Package twisted :: Package python :: Module components :: Class AdapterRegistry |
|
| Method Summary | |
|---|---|
__init__(self)
| |
Return an object that implements the given interface. | |
Return registered adapter for a given class and interface. | |
Return registered adapter for a given class and interface. | |
Register an adapter class. | |
| Method Details |
|---|
getAdapter(self, obj, interfaceClass, default=<class twisted.python.components._Nothing at..., adapterClassLocator=None)Return an object that implements the given interface. The result will be a wrapper around the object passed as a paramter, or the parameter itself if it already implements the interface. If no adapter can be found, the 'default' parameter will be returned. |
getAdapterClass(self, klass, interfaceClass, default)Return registered adapter for a given class and interface. |
getAdapterClassWithInheritance(self, klass, interfaceClass, default)Return registered adapter for a given class and interface. |
registerAdapter(self, adapterClass, origClass, *interfaceClasses)Register an adapter class. An adapter class is expected to implement the given interface, by adapting instances of paramter 'origClass'. An adapter class's __init__ method should accept one parameter, an instance of 'origClass'. |
| Home | Trees | Index | Help |
|---|
| Generated by Epydoc 1.1 on Thu Apr 17 12:55:42 2003 | http://epydoc.sf.net |