Mechanism for storing additional information about objects without modifying their classes