toStringMethodBody.add(appendChain);
toStringMethodBody._return(stringBuilderVar.invoke("toString"));
}
private static Class<?> convertFieldTypeToClass(PacketFieldType field) {
PacketSimpleTypes type = field.getType();
if (type == null) {
throw new IllegalArgumentException("Type cannot be null");
}
boolean isArray = field.getOccurs() != null;