CPL - Chalmers Publication Library
| Utbildning | Forskning | Styrkeområden | Om Chalmers | In English In English Ej inloggad.

A Pattern for Static Reflection on Fields: Sharing Internal Representations in Indexed Family Containers

Andreas Priesnitz (Institutionen för data- och informationsteknik, Datavetenskap (Chalmers)) ; Sibylle Schupp (Institutionen för data- och informationsteknik, Datavetenskap (Chalmers))
2nd International Conference on Software and Data Technologies, ICSOFT 2007; Barcelona; Spain; 22 July 2007 through 25 July 2007 (2007)
[Konferensbidrag, refereegranskat]

Reflection allows defining generic operations in terms of the constituents of objects. These definitions incur overhead if reflection takes place at run time, which is the common case in popular languages. If performance matters, some compile-time means of reflection is desired to obviate that penalty. Furthermore, the information provided by static reflection can be utilised for class generation, e.g., to optimize internal representation. We demonstrate how to provide static reflection on class field properties by means of generic components in an OO language with static meta-programming facilities. Surprisingly, a major part of the solution is not specific to the particular task of providing reflection. We define the internal representation of classes by a reworked implementation of a generic container that models the concept of a statically indexed family. The proposed features of this implementation are also beneficial to its use as a common container.

Nyckelord: Static Reflection, Serialization, Container, Generative Programming, High Performance

Denna post skapades 2007-09-21. Senast ändrad 2016-06-03.
CPL Pubid: 49419


Läs direkt!

Länk till annan sajt (kan kräva inloggning)

Institutioner (Chalmers)

Institutionen för data- och informationsteknik, Datavetenskap (Chalmers)



Chalmers infrastruktur