diff options
author | Karl Lessard <karllessard@users.noreply.github.com> | 2018-06-12 10:29:09 -0400 |
---|---|---|
committer | Shanqing Cai <cais@google.com> | 2018-06-12 10:29:09 -0400 |
commit | 5fa7b03a255d3c0d05aa48e7604a94185ef6b9e2 (patch) | |
tree | 9cad41b2f10139af5935f17425897911af1dd17f /tensorflow/java/src | |
parent | c241e9bc57d1f3855d55d440ebbe4189fae6ea8b (diff) |
Replace @Generated annotation by notice (#19941)
Diffstat (limited to 'tensorflow/java/src')
-rw-r--r-- | tensorflow/java/src/gen/cc/op_generator.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tensorflow/java/src/gen/cc/op_generator.cc b/tensorflow/java/src/gen/cc/op_generator.cc index debd95fc62..9b171f66ec 100644 --- a/tensorflow/java/src/gen/cc/op_generator.cc +++ b/tensorflow/java/src/gen/cc/op_generator.cc @@ -376,9 +376,6 @@ void GenerateOp(const OpSpec& op, const EndpointSpec& endpoint, } } // op annotations - op_class.add_annotation( - Annotation::Create("Generated", "javax.annotation") - .attributes("value = \"TensorFlow Java Op Generator\"")); if (endpoint.deprecated()) { op_class.add_annotation(Annotation::Create("Deprecated")); string explanation; @@ -415,8 +412,12 @@ void GenerateOp(const OpSpec& op, const EndpointSpec& endpoint, SourceFileWriter writer(op_file.get()); std::list<Type> dependencies; CollectOpDependencies(op, mode, &dependencies); - writer.Write(kLicense).EndLine().BeginType(op_class, PUBLIC | FINAL, - &dependencies, &op_javadoc); + writer.Write(kLicense) + .EndLine() + .Write("// This class has been generated, DO NOT EDIT!") + .EndLine() + .EndLine() + .BeginType(op_class, PUBLIC | FINAL, &dependencies, &op_javadoc); if (!op.optional_attributes().empty()) { RenderOptionsClass(op, op_class, &writer); } |