Package aquarium :: Package util :: Module AutoLoader :: Class AutoLoader
[show private | hide private]
[frames | no frames]

Class AutoLoader

Known Subclasses:
DatabaseAssistant

This mixin supports autoloading.

That means if you try to access an undefined attribute (e.g. self.Spam), an aquarium.util.AquariumClass instance which uses this mixin will automatically import and instantiate the AquariumClass called Spam that is the same type of module as it is (e.g. a database module instance would try to import and instantiate aquarium.database.Spam). This mixin is used by aquarium.database.DatabaseAssistant, etc.


Method Summary
  __getattr__(self, attr)
Import, instantiate, and return the desired instance.
  getModuleType(self)
Return the type of Aquarium module this instance is.

Method Details

__getattr__(self, attr)
(Qualification operator)

Import, instantiate, and return the desired instance.

Note, these instances will be cached in self._autoLoaderCache.

getModuleType(self)

Return the type of Aquarium module this instance is.

Usually, I can automatically figure out what type of module you are, but if you need to get fancy, override this.


Generated by Epydoc 2.1 on Mon Jan 1 16:34:19 2007 http://epydoc.sf.net