Thank you all for those helpful information.
Rovas,
I am not using ObjectOutputStream/ObjectInputStream because I want to squeeze the maximum performance possible in my implemantation. Those objects are going to be written on disk, and I believe ObjectOutputStream/ObjectInputStream writes the variable names to the stream, this is something for example that I don't need.
Ernest,
I like this idiom and this is what I will use. It forces me to use reflection, but it is clean.
Tony,
In fact I do not need to access any object's member, I just wanted to force an object to be able to re-construct itself from a ByteBuffer. Calling a constructor with a ByteBuffer as an argument seemed the most logical way, but as I cannot enforce this design I will use Ernest's suggestion.
Thank you again and best regards.