Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(541)

Side by Side Diff: base/android/jni_generator/jni_generator.py

Issue 1641513004: Update //base to chromium 9659b08ea5a34f889dc4166217f438095ddc10d2 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Extracts native methods from a Java file and generates the JNI bindings. 6 """Extracts native methods from a Java file and generates the JNI bindings.
7 If you change this, please run and update the tests.""" 7 If you change this, please run and update the tests."""
8 8
9 import collections 9 import collections
10 import errno 10 import errno
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 'byte': 'B', 229 'byte': 'B',
230 'void': 'V', 230 'void': 'V',
231 } 231 }
232 object_param_list = [ 232 object_param_list = [
233 'Ljava/lang/Boolean', 233 'Ljava/lang/Boolean',
234 'Ljava/lang/Integer', 234 'Ljava/lang/Integer',
235 'Ljava/lang/Long', 235 'Ljava/lang/Long',
236 'Ljava/lang/Object', 236 'Ljava/lang/Object',
237 'Ljava/lang/String', 237 'Ljava/lang/String',
238 'Ljava/lang/Class', 238 'Ljava/lang/Class',
239 'Ljava/lang/CharSequence',
240 'Ljava/lang/Runnable',
241 'Ljava/lang/Throwable',
239 ] 242 ]
240 243
241 prefix = '' 244 prefix = ''
242 # Array? 245 # Array?
243 while param[-2:] == '[]': 246 while param[-2:] == '[]':
244 prefix += '[' 247 prefix += '['
245 param = param[:-2] 248 param = param[:-2]
246 # Generic? 249 # Generic?
247 if '<' in param: 250 if '<' in param:
248 param = param[:param.index('<')] 251 param = param[:param.index('<')]
(...skipping 1299 matching lines...) Expand 10 before | Expand all | Expand 10 after
1548 GenerateJNIHeader(input_file, output_file, options) 1551 GenerateJNIHeader(input_file, output_file, options)
1549 1552
1550 if options.depfile: 1553 if options.depfile:
1551 build_utils.WriteDepfile( 1554 build_utils.WriteDepfile(
1552 options.depfile, 1555 options.depfile,
1553 build_utils.GetPythonDependencies()) 1556 build_utils.GetPythonDependencies())
1554 1557
1555 1558
1556 if __name__ == '__main__': 1559 if __name__ == '__main__':
1557 sys.exit(main(sys.argv)) 1560 sys.exit(main(sys.argv))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698