Package formless :: Module annotate :: Class MetaTypedInterface
[show private | hide private]
[frames | no frames]

Type MetaTypedInterface

object --+        
         |        
      type --+    
             |    
 MetaInterface --+
                 |
                MetaTypedInterface


The metaclass for TypedInterface. When TypedInterface is subclassed,
this metaclass' __new__ method is invoked. The Typed Binding introspection
described in the Binding docstring occurs, and when it is all done, there will
be three attributes on the TypedInterface class:

__methods__: An ordered list of all the MethodBinding instances produced
    by introspecting all autocallable methods on this TypedInterface

__properties__: An ordered list of all the Property Binding instances produced
    by introspecting all properties which have Typed values on this TypedInterface

__spec__: An ordered list of all methods and properties

These lists are sorted in the order that the methods and properties appear
in the TypedInterface definition.

For example:

class Foo(TypedInterface):
    bar = String()
    baz = Integer()
    
    def frotz(self): pass
    frotz = autocallable(frotz)
    
    xyzzy = Float()
    
    def blam(self): pass
    blam = autocallable(blam)

Once the metaclass __new__ is done, the Foo class instance will have three
properties, __methods__, __properties__, and __spec__,

Method Summary
  __new__(cls, name, bases, dct)
(Static method)
    Inherited from type
  __cmp__(x, y)
x.__cmp__(y) <==> cmp(x,y)
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __repr__(x)
x.__repr__() <==> repr(x)
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
list of immediate subclasses __subclasses__()
__subclasses__() -> list of immediate subclasses
list mro()
return a type's method resolution order
    Inherited from object
  __init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __str__(x)
x.__str__() <==> str(x)

Class Variable Summary
bool complexType = True
str default = 'DEFAULT'
str description = 'DESCRIPTION'
str label = 'LABEL'
str name = 'NAME'
    Inherited from type
tuple __bases__ = (<type 'object'>,)
int __basicsize__ = 420                                                                   
int __dictoffset__ = 132                                                                   
int __flags__ = 21995                                                                 
int __itemsize__ = 20                                                                    
tuple __mro__ = (<type 'type'>, <type 'object'>)
str __name__ = 'type'
int __weakrefoffset__ = 184                                                                   

Class Variable Details

complexType

Type:
bool
Value:
True                                                                   

default

Type:
str
Value:
'DEFAULT'                                                              

description

Type:
str
Value:
'DESCRIPTION'                                                          

label

Type:
str
Value:
'LABEL'                                                                

name

Type:
str
Value:
'NAME'                                                                 

Generated by Epydoc 2.1 on Fri May 6 14:57:58 2005 http://epydoc.sf.net