ZaphodBBX / eidlib

Automatically exported from code.google.com/p/eidlib
0 stars 0 forks source link

Annotation driven TLV parsing #5

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The IDData parser (and address file parser) could be driven by Java 5
annotations which would make it some more elegant and would prepare the
eidlib for future versions of the eID card (if the file content changes).
For example:

@FileLocation({0xfile, 0xid, 0xhere})
class ID {
 @TLVField(0xthe_tag_id)
 String name;
 ...
}

The generic parser could use the Java reflection API to convert the TLV
file to an ID object. Example:

ID id = TLVParser.parse(ID.class, ...);

Original issue reported on code.google.com by frank.co...@gmail.com on 11 Nov 2008 at 9:10