StoredClass and StoredField interfaces

(IStoredClass and IStoredField in .NET)

Let's look closer at the class meta-information interfaces.

They look quite similar to reflection API, but unlike reflection there is no information about methods and constructors.

You can only use StoredClass to get the class's fields:

Java: StoredClass#getStoredFields()

returns all stored fields of this stored class.

Java: StoredClass#storedField(name, type)

returns an existing stored field of this stored class.

You can also use this interface to explore classes hierarchy.

Java: StoredClass#getParentStoredClass

returns the parent of the class.

StoredField interface gives you access to various meta-field information, such as field name, field type. It also provides some helpful methods for manipulating fields accepting their object as a variable (see db4o API for more information).

Code attachment not found: /Resources/Reference/Implementation_Strategies/Db4o_Meta-Information/MetainfJava.Zip