+2  A: 

You can start here : http://www.graniteds.org/confluence/display/DOC/2.+Gas3+Code+Generator

Antoine Claval
A: 

The only tools that I know of are for generating AS classes from server code are the wizards built into Flex builder for autogenerating AS remote classes from ColdFusion CFC's for use with a ColdFusion based AMF service.

What may be useful to remember though is that once the serialized object has been received by Flex and an instance of mx.utils.ObjectProxy has been created for it (this relates to the flex RemoteObject class and AMF based services, but I imagine that a Protocol Buffer extension would follow the same pattern), the process of casting the proxy to an Actionscript class isn't all that complicated. As long as your Actionscript class has properties or accessors with names that match the properties on the serialized object, and an Remote Object alias that matches the type of the serialized object, then you can cast the object proxy to the remote class without having to do any extra work.

Like I said, I'm not aware of a tool that does what you want, but It wouldn't be too difficult to create a tool to read the type and public properties from your Java classes, or extract that same metadata from your protocol buffer files, and write some Actionscript code off that Metadata. If you can't find a solution that fits your needs, you might consider writing an Ant task or a script or something to do it for you. Thats what I would do anyway.

Ryan Lynch