Skip to content

Commit a3af969

Browse files
committed
Print a header on the files
1 parent 0bdf458 commit a3af969

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

codegen.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,39 @@ def java_field_type(spec, domain):
9595

9696
#---------------------------------------------------------------------------
9797

98+
def printFileHeader():
99+
print """// NOTE: This -*- java -*- source code is autogenerated from the AMQP
100+
// specification!
101+
//
102+
// The contents of this file are subject to the Mozilla Public License
103+
// Version 1.1 (the "License"); you may not use this file except in
104+
// compliance with the License. You may obtain a copy of the License at
105+
// http://www.mozilla.org/MPL/
106+
//
107+
// Software distributed under the License is distributed on an "AS IS"
108+
// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
109+
// License for the specific language governing rights and limitations
110+
// under the License.
111+
//
112+
// The Original Code is RabbitMQ.
113+
//
114+
// The Initial Developers of the Original Code are LShift Ltd.,
115+
// Cohesive Financial Technologies LLC., and Rabbit Technologies Ltd.
116+
//
117+
// Portions created by LShift Ltd., Cohesive Financial Technologies
118+
// LLC., and Rabbit Technologies Ltd. are Copyright (C) 2007-2008
119+
// LShift Ltd., Cohesive Financial Technologies LLC., and Rabbit
120+
// Technologies Ltd.;
121+
//
122+
// All Rights Reserved.
123+
//
124+
// Contributor(s): ______________________________________.
125+
//
126+
"""
127+
98128
def genJavaApi(spec):
99129
def printHeader():
130+
printFileHeader()
100131
print """package com.rabbitmq.client;
101132
102133
import java.io.IOException;
@@ -223,6 +254,7 @@ def printClassProperties(c):
223254

224255
def genJavaImpl(spec):
225256
def printHeader():
257+
printFileHeader()
226258
print """package com.rabbitmq.client.impl;
227259
228260
import java.io.IOException;

0 commit comments

Comments
 (0)