|
|
|
@ -11,21 +11,18 @@ |
|
|
|
|
|
|
|
|
|
#include "google/protobuf/compiler/java/full/enum.h" |
|
|
|
|
|
|
|
|
|
#include <algorithm> |
|
|
|
|
#include <cmath> |
|
|
|
|
#include <string> |
|
|
|
|
#include <utility> |
|
|
|
|
#include <vector> |
|
|
|
|
|
|
|
|
|
#include "absl/container/flat_hash_map.h" |
|
|
|
|
#include "absl/strings/str_cat.h" |
|
|
|
|
#include "absl/strings/str_format.h" |
|
|
|
|
#include "absl/strings/str_join.h" |
|
|
|
|
#include "absl/strings/string_view.h" |
|
|
|
|
#include "google/protobuf/compiler/java/context.h" |
|
|
|
|
#include "google/protobuf/compiler/java/doc_comment.h" |
|
|
|
|
#include "google/protobuf/compiler/java/helpers.h" |
|
|
|
|
#include "google/protobuf/compiler/java/internal_helpers.h" |
|
|
|
|
#include "google/protobuf/compiler/java/name_resolver.h" |
|
|
|
|
#include "google/protobuf/descriptor.h" |
|
|
|
|
#include "google/protobuf/descriptor.pb.h" |
|
|
|
|
#include "google/protobuf/io/printer.h" |
|
|
|
|
|
|
|
|
@ -37,7 +34,6 @@ namespace protobuf { |
|
|
|
|
namespace compiler { |
|
|
|
|
namespace java { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
EnumNonLiteGenerator::EnumNonLiteGenerator(const EnumDescriptor* descriptor, |
|
|
|
|
bool immutable_api, Context* context) |
|
|
|
|
: descriptor_(descriptor), |
|
|
|
@ -383,7 +379,6 @@ void EnumNonLiteGenerator::Generate(io::Printer* printer) { |
|
|
|
|
printer->Print("}\n\n"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool EnumNonLiteGenerator::CanUseEnumValues() { |
|
|
|
|
if (canonical_values_.size() != descriptor_->value_count()) { |
|
|
|
|
return false; |
|
|
|
|