Extract and apply all 'field' names to user Fields in a hierarchy of objects.
Extract and apply all 'field' names to user Fields in a hierarchy of objects. This causes each discovered Field to be given the name of the corresponding 'field'.
The top object from which to start the search for Fields.
Scans a tree of objects looking for Field instances and array of instances and binds the user's 'field' name (discovered through reflection) to that Field.
There is a name conflict here since Field in Cog means something different from Field in Scala. I'll use 'field' to refer to a Scala field and Field to refer to a Cog field. The idea is that user Fields which have been declared as val
fields
can be detected at runtime through reflection, and the user's name forfield
can be bound to the Field. This is useful for debuggers since it allows them to display Fields with a user's programmatic name.