Construct a class object for a protobuf described by descriptor. DEPRECATED: use MessageFactory.GetPrototype() instead. Args: descriptor: A descriptor.Descriptor object describing the protobuf. Returns: The Message class object described by the descriptor.
(descriptor)
| 80 | |
| 81 | # Deprecated. Please NEVER use reflection.MakeClass(). |
| 82 | def MakeClass(descriptor): |
| 83 | """Construct a class object for a protobuf described by descriptor. |
| 84 | |
| 85 | DEPRECATED: use MessageFactory.GetPrototype() instead. |
| 86 | |
| 87 | Args: |
| 88 | descriptor: A descriptor.Descriptor object describing the protobuf. |
| 89 | Returns: |
| 90 | The Message class object described by the descriptor. |
| 91 | """ |
| 92 | # Original implementation leads to duplicate message classes, which won't play |
| 93 | # well with extensions. Message factory info is also missing. |
| 94 | # Redirect to message_factory. |
| 95 | return symbol_database.Default().GetPrototype(descriptor) |
no test coverage detected