out.writeRawBytes(bytes);
} else if (t instanceof Enum) {
// use an enum encoder
EnumMarshaller enumMarshaller = (EnumMarshaller) ctx.getMarshaller((Class<Enum>) t.getClass());
out.writeString(WRAPPED_DESCRIPTOR_FULL_NAME, enumMarshaller.getTypeName());
out.writeEnum(WRAPPED_ENUM, enumMarshaller.encode((Enum) t));
} else {
// this is either an unknown primitive type or a message type
// try to use a message marshaller
BaseMarshaller marshaller = ctx.getMarshaller(t.getClass());
out.writeString(WRAPPED_DESCRIPTOR_FULL_NAME, marshaller.getTypeName());