Representation of the MetaData of a class. Extends the abstract definition to include implementations, fields, embedded-only tags. Has a parent PackageMetaData that can contain the metadata for several classes.
Lifecycle state
This object supports 3 lifecycle states. The first is the raw constructed object which represents pure MetaData (maybe from a MetaData file). The second is a "populated" object which represents MetaData for a Class with the metadata aligned to be appropriate for that Class. The third is "initialised" once the internal arrays are created. This object, once populated, will represent ALL fields in the class (including static, final and transient fields).
Fields/Properties
This object keeps a list of FieldMetaData/PropertyMetaData objects for the fields of this class. In addition it has an array of FieldMetaData objects representing those that are actually managed by JDO ("managedFields"). This second set does not contain things like static, final or transient fields since JDO doesn't support those yet.
Fields are of 2 types. The first are normal fields of this class. These have their own "relative" field number, relative to this class. The second type are "overriding" fields which override the baseline field in a superclass. These fields have no "relative" field number since they are relative to this class (and such a relative field number would make no sense). Fields are all added through addField() during the parse process, and are updated during the populate/initialise process to define their relative field numbers. Please refer to FieldMetaData for more details of fields.
Numbering of fields
Fields of the class are numbered in 2 ways. The first way is the numbering within a class. In a class, the field 'id's will start at 0. If a class is inherited, it will also have a second numbering for its fields - the "absolute" numbering. With "absolute" numbering, the fields start at the first field in the root superclass which has absolute number 0, and they are numbered from there, navigating down the hierarchy. In terms of what is stored in the records, the FieldMetaData stores fieldId as the first method (relative to the class it is in). The "absolute" numbering is always derived from this and the inheritance hierarchy.