| OLD | NEW |
| 1 // Protocol Buffers - Google's data interchange format | 1 // Protocol Buffers - Google's data interchange format |
| 2 // Copyright 2008 Google Inc. All rights reserved. | 2 // Copyright 2008 Google Inc. All rights reserved. |
| 3 // https://developers.google.com/protocol-buffers/ | 3 // https://developers.google.com/protocol-buffers/ |
| 4 // | 4 // |
| 5 // Redistribution and use in source and binary forms, with or without | 5 // Redistribution and use in source and binary forms, with or without |
| 6 // modification, are permitted provided that the following conditions are | 6 // modification, are permitted provided that the following conditions are |
| 7 // met: | 7 // met: |
| 8 // | 8 // |
| 9 // * Redistributions of source code must retain the above copyright | 9 // * Redistributions of source code must retain the above copyright |
| 10 // notice, this list of conditions and the following disclaimer. | 10 // notice, this list of conditions and the following disclaimer. |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 | 67 |
| 68 protected: | 68 protected: |
| 69 const ServiceDescriptor* descriptor_; | 69 const ServiceDescriptor* descriptor_; |
| 70 | 70 |
| 71 private: | 71 private: |
| 72 GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ServiceGenerator); | 72 GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ServiceGenerator); |
| 73 }; | 73 }; |
| 74 | 74 |
| 75 class ImmutableServiceGenerator : public ServiceGenerator { | 75 class ImmutableServiceGenerator : public ServiceGenerator { |
| 76 public: | 76 public: |
| 77 ImmutableServiceGenerator(const ServiceDescriptor* descriptor, | 77 explicit ImmutableServiceGenerator(const ServiceDescriptor* descriptor, |
| 78 Context* context); | 78 Context* context); |
| 79 virtual ~ImmutableServiceGenerator(); | 79 virtual ~ImmutableServiceGenerator(); |
| 80 | 80 |
| 81 virtual void Generate(io::Printer* printer); | 81 virtual void Generate(io::Printer* printer); |
| 82 | 82 |
| 83 private: | 83 private: |
| 84 | 84 |
| 85 // Generate the getDescriptorForType() method. | 85 // Generate the getDescriptorForType() method. |
| 86 void GenerateGetDescriptorForType(io::Printer* printer); | 86 void GenerateGetDescriptorForType(io::Printer* printer); |
| 87 | 87 |
| 88 // Generate a Java interface for the service. | 88 // Generate a Java interface for the service. |
| (...skipping 26 matching lines...) Expand all Loading... |
| 115 const MethodDescriptor* method, | 115 const MethodDescriptor* method, |
| 116 IsAbstract is_abstract); | 116 IsAbstract is_abstract); |
| 117 | 117 |
| 118 // Generate a blocking stub interface and implementation of the service. | 118 // Generate a blocking stub interface and implementation of the service. |
| 119 void GenerateBlockingStub(io::Printer* printer); | 119 void GenerateBlockingStub(io::Printer* printer); |
| 120 | 120 |
| 121 // Generate the method signature for one method of a blocking stub. | 121 // Generate the method signature for one method of a blocking stub. |
| 122 void GenerateBlockingMethodSignature(io::Printer* printer, | 122 void GenerateBlockingMethodSignature(io::Printer* printer, |
| 123 const MethodDescriptor* method); | 123 const MethodDescriptor* method); |
| 124 | 124 |
| 125 // Return the output type of the method. | |
| 126 string GetOutput(const MethodDescriptor* method); | |
| 127 | |
| 128 Context* context_; | 125 Context* context_; |
| 129 ClassNameResolver* name_resolver_; | 126 ClassNameResolver* name_resolver_; |
| 130 GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ImmutableServiceGenerator); | 127 GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ImmutableServiceGenerator); |
| 131 }; | 128 }; |
| 132 | 129 |
| 133 } // namespace java | 130 } // namespace java |
| 134 } // namespace compiler | 131 } // namespace compiler |
| 135 } // namespace protobuf | 132 } // namespace protobuf |
| 136 | 133 |
| 137 #endif // NET_PROTO2_COMPILER_JAVA_SERVICE_H__ | 134 #endif // NET_PROTO2_COMPILER_JAVA_SERVICE_H__ |
| 138 } // namespace google | 135 } // namespace google |
| OLD | NEW |