| Home | Trees | Index | Help |
|---|
| Package twisted :: Package python :: Module components |
|
| Classes | |
|---|---|
Interface |
Base class for interfaces. |
Componentized |
I am a mixin to allow you to be adapted in various ways persistently. |
| Function Summary | |
|---|---|
Return boolean indicating if obj implements the given interface. | |
Return list of all interfaces a class implements. | |
Given an interface, return list of super-interfaces (including itself). | |
Register an adapter class. | |
Return registered adapter for a given class and interface. | |
Return an object that implements the given interface. | |
| Function Details |
|---|
getAdapter(obj, interfaceClass, default=<class twisted.python.components._default 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(klass, interfaceClass, default)Return registered adapter for a given class and interface. |
getInterfaces(obj)Return list of all interfaces a class implements. |
implements(obj, interfaceClass)Return boolean indicating if obj implements the given interface. |
registerAdapter(adapterClass, origClass, interfaceClass)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'. |
superInterfaces(interface)Given an interface, return list of super-interfaces (including itself). |
| Home | Trees | Index | Help |
|---|
| Generated by Epydoc 1.2 prerelease on Wed Jan 29 06:25:56 2003 | http://epydoc.sf.net |