snaju / artemis-framework

Automatically exported from code.google.com/p/artemis-framework
0 stars 0 forks source link

Support component mappers with @Mapper in super classes #5

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The provided patch scans any super class of the provided entity system for 
fields with the @Mapper annotation. This allows the super class to declare 
component mappers and have them instanced by reflection.

I've also added a check to see if the field has already been instantiated 
(field.get (target) == null). This could be useful if a super class declares a 
static component mapper.
Declaring a static component mapper is not recommended, I suppose, but I figure 
its best to cover all bases in this case.

Original issue reported on code.google.com by seraphim...@gmail.com on 15 Oct 2012 at 1:12

Attachments: