Package google :: Package protobuf :: Module descriptor :: Class FileDescriptor
[frames] | no frames]

Class FileDescriptor

source code

    object --+    
             |    
DescriptorBase --+
                 |
                FileDescriptor

Descriptor for a file. Mimics the descriptor_pb2.FileDescriptorProto.

name: name of file, relative to root of source tree.
package: name of the package
serialized_pb: (str) Byte string of serialized
  descriptor_pb2.FileDescriptorProto.

Instance Methods
a new object with type S, a subtype of T
__new__(cls, name, package, options=None, serialized_pb=None, dependencies=None, public_dependencies=None, syntax=None, pool=None) source code
 
__init__(self, name, package, options=None, serialized_pb=None)
Constructor.
source code
 
CopyToProto(self, proto)
Copies this to a descriptor_pb2.FileDescriptorProto.
source code

Inherited from DescriptorBase: GetOptions

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

__new__(cls, name, package, options=None, serialized_pb=None, dependencies=None, public_dependencies=None, syntax=None, pool=None)

source code 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__
(inherited documentation)

__init__(self, name, package, options=None, serialized_pb=None)
(Constructor)

source code 

Constructor.

Overrides: object.__init__

CopyToProto(self, proto)

source code 
Copies this to a descriptor_pb2.FileDescriptorProto.

Args:
  proto: An empty descriptor_pb2.FileDescriptorProto.