| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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)) |
| OLD | NEW |