if (isNested) {
String nestedPacketName = "Nested" + name;
JDefinedClass nestedClass = packetClass._class(JMod.FINAL | JMod.PUBLIC, nestedPacketName);
processFields(nestedPacketName, field.getField(), nestedClass, codeModel, fromClient);
fieldType = isArray ? nestedClass.array() : nestedClass;
} else {
fieldType = codeModel._ref(fieldClass);
}
JFieldVar packetField = packetClass.field(JMod.PRIVATE, fieldType, fieldName);