Gather information about a Python class from its parse tree.
Methods
|
|
__init__
_extractBaseClasses
_extractClassMembers
getBaseClassNames
getExceptionNames
getMethodInfo
getMethodNames
|
|
__init__
|
__init__ (
self,
parent=None,
tree=None,
commentInfo={},
)
Initialize the info extractor.
Parameters:
- parent
- parent object for this class (e.g. Module)
- tree
- parse tree from which to extract information
- commentInfo
- comments extracted from the source file
for this class
|
|
_extractBaseClasses
|
_extractBaseClasses ( self, tree )
Returns a list of all base classes from which this class is derived.
|
|
_extractClassMembers
|
_extractClassMembers ( self, tree )
Returns a list of all variable assignments
in the class member context.
|
|
getBaseClassNames
|
getBaseClassNames ( self )
Returns a list of the names of the base classes for this class.
|
|
getExceptionNames
|
getExceptionNames ( self )
Returns a list of the names of all exceptions raised by this class.
|
|
getMethodInfo
|
getMethodInfo ( self, name )
Returns a FunctionInfo object for the method name , if it exists.
|
|
getMethodNames
|
getMethodNames ( self )
Returns a list of the names of methods defined for this class.
|