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. | |
Return registered adapter for a given class and interface. | |
persistAdapter(self,
original,
iface,
adapter)
| |
Register an adapter class. |
Method Details |
---|
getAdapter(self, obj, interfaceClass, default=<class twisted.python.components._Nothing at..., adapterClassLocator=None, persist=None)Return an object that implements the given interface. The result will be a wrapper around the object passed as a parameter, or the parameter itself if it already implements the interface. If no adapter can be found, the 'default' parameter will be returned. |
getAdapterClass(self, fromInterface, toInterface, default)Return registered adapter for a given class and interface. |
getAdapterClassWithInheritance(self, klass, interfaceClass, default)Return registered adapter for a given class and interface. |
getAdapterFactory(self, fromInterface, toInterface, default)Return registered adapter for a given class and interface. |
registerAdapter(self, adapterFactory, origInterface, *interfaceClasses)Register an adapter class. An adapter class is expected to implement the given interface, by adapting instances implementing 'origInterface'. An adapter class's __init__ method should accept one parameter, an instance implementing 'origInterface'. |
Home | Trees | Index | Help |
---|
Generated by Epydoc 1.1 on Thu May 8 13:18:56 2003 | http://epydoc.sf.net |