I've written a generic database that indexes all the fields of an instance of a class that have a specific annotation. I need to be able to write an instance of this database to a file, but the Field object doesn't implement serializable and is final.
¿Hay alguna forma de evitar esto?
preguntado el 05 de mayo de 13 a las 15:05
You could get away with storing just the nombres of the fields (as strings, of course), since names must be unique within their declaring class. If you need to handle static members as well – and it's not clear that you do – store an additional
isStatic boolean with each string.