Replace @Generated annotation by notice (#19941)
This commit is contained in:
parent
c241e9bc57
commit
5fa7b03a25
@ -376,9 +376,6 @@ void GenerateOp(const OpSpec& op, const EndpointSpec& endpoint,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// op annotations
|
// op annotations
|
||||||
op_class.add_annotation(
|
|
||||||
Annotation::Create("Generated", "javax.annotation")
|
|
||||||
.attributes("value = \"TensorFlow Java Op Generator\""));
|
|
||||||
if (endpoint.deprecated()) {
|
if (endpoint.deprecated()) {
|
||||||
op_class.add_annotation(Annotation::Create("Deprecated"));
|
op_class.add_annotation(Annotation::Create("Deprecated"));
|
||||||
string explanation;
|
string explanation;
|
||||||
@ -415,8 +412,12 @@ void GenerateOp(const OpSpec& op, const EndpointSpec& endpoint,
|
|||||||
SourceFileWriter writer(op_file.get());
|
SourceFileWriter writer(op_file.get());
|
||||||
std::list<Type> dependencies;
|
std::list<Type> dependencies;
|
||||||
CollectOpDependencies(op, mode, &dependencies);
|
CollectOpDependencies(op, mode, &dependencies);
|
||||||
writer.Write(kLicense).EndLine().BeginType(op_class, PUBLIC | FINAL,
|
writer.Write(kLicense)
|
||||||
&dependencies, &op_javadoc);
|
.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()) {
|
if (!op.optional_attributes().empty()) {
|
||||||
RenderOptionsClass(op, op_class, &writer);
|
RenderOptionsClass(op, op_class, &writer);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user