title: Java Serialization with Protocol Buffer
body: <p>I want to use protobuff in a Java application to facilitate serialization and I have a question about this quote from the Google web site</p>
  
  <blockquote>
    <p>Protocol Buffers and O-O Design
    Protocol buffer classes are basically
    dumb data holders (like structs in
    C++); they don't make good first class
    citizens in an object model. If you
    want to add richer behaviour to a
    generated class, the best way to do
    this is to wrap the generated protocol
    buffer class in an
    application-specific class. Wrapping
    protocol buffers is also a good idea
    if you don't have control over the
    design of the .proto file (if, say,
    you're reusing one from another
    project). In that case, you can use
    the wrapper class to craft an
    interface better suited to the unique
    environment of your application:
    hiding some data and methods, exposing
    convenience functions, etc. You should
    never add behaviour to the generated
    classes by inheriting from them. This
    will break internal mechanisms and is
    not good object-oriented practice
    anyway.</p>
  </blockquote>
  
  <p>from: <a href="http://code.google.com/apis/protocolbuffers/docs/javatutorial.html" rel="noreferrer">http://code.google.com/apis/protocolbuffers/docs/javatutorial.html</a></p>
  
  <p>What does it mean when it says to wrap the created class? </p>