Skip to content

Instantly share code, notes, and snippets.

@michael-galpin
Created December 10, 2012 04:07
Show Gist options
  • Save michael-galpin/4248327 to your computer and use it in GitHub Desktop.
Save michael-galpin/4248327 to your computer and use it in GitHub Desktop.
public static MessageMicro getProto(ParcelableMessage message) {
switch (message.messageType) {
case ALPHA :
return Alpha.AlphaParser.parse(response.protoBytes);
case BETA :
return Beta.BetaParser.parse(response.protoBytes);
default :
return null;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment