Patent ID: 8527942

Claim:
A method comprising: acquiring a class definition associated with a class, the class definition including: first information associated with an enumeration, the enumeration listing one or more instances of the class, and second information associated with one or more superclasses to which the one or more instances belong; transforming the class definition into a data structure that includes information associated with the class, transforming the class definition including: generating a plurality of tokens based on the first information and the second information, identifying, in the plurality of tokens, at least one token that corresponds to at least one allowable expression, and forming the data structure based on the at least one token; associating, respectively, at least one instance, of the one or more instances listed in the enumeration, with at least one identifier in the data structure; generating, based on the data structure, metadata associated with the enumeration; generating a constructor function for the enumeration, the constructor function being used to construct an instance of the class; and associating the constructor function with the metadata associated with the enumeration, the acquiring, the transforming, the associating the at least one instance, the generating the metadata, generating the constructor function, and the associating the constructor function being performed by one or more processors.