out.writeRawBytes(bytes);
} else if (t instanceof Enum) {
// use an enum encoder
EnumEncoder enumEncoder = ctx.getEnumEncoder((Class<Enum>) t.getClass());
out.writeString(wrappedDescriptorFullName, enumEncoder.getFullName());
out.writeEnum(wrappedEnum, enumEncoder.encode((Enum) t));
} else {
// this is either an unknown primitive type or a message type
// try to use a message marshaller
MessageMarshaller marshaller = ctx.getMarshaller(t.getClass());
out.writeString(wrappedDescriptorFullName, marshaller.getFullName());