| 398 | | for (APIName a : gi) { |
| 399 | | AliasedAPIName aan = NodeFactory.makeAliasedAPIName(a); |
| 400 | | /* |
| 401 | | * Hoping to lie, slightly, to static analysis. This is |
| 402 | | * technically speaking a "foreign" import, but the import is |
| 403 | | * already known to the ForeignJava data structures, and this |
| 404 | | * allows use of fully qualified (hence unambiguous) references |
| 405 | | * to classes from other packages in the generated API. |
| 406 | | * |
| 407 | | * So, one lie -- no foreign annotation. |
| 408 | | */ |
| 409 | | ImportApi iapi = NodeFactory.makeImportApi(span, Option |
| 410 | | .<String> none(), Useful.list(aan)); |
| 411 | | imports.add(iapi); |
| 412 | | } |
| 413 | | |
| | 403 | for (APIName a : gi) { |
| | 404 | importAnApi(imports, a); |
| | 405 | } |
| | 406 | // Implicitly import. |
| | 407 | importAnApi(imports, NodeFactory.makeAPIName(span, "FortressLibrary")); |
| | 408 | |
| 424 | | |
| | 419 | |
| | 420 | } |
| | 421 | |
| | 422 | private void importAnApi(List<Import> imports, APIName a) { |
| | 423 | AliasedAPIName aan = NodeFactory.makeAliasedAPIName(a); |
| | 424 | /* |
| | 425 | * Hoping to lie, slightly, to static analysis. This is |
| | 426 | * technically speaking a "foreign" import, but the import |
| | 427 | * is already known to the ForeignJava data structures, and |
| | 428 | * this allows use of fully qualified (hence unambiguous) |
| | 429 | * references to classes from other packages in the |
| | 430 | * generated API. |
| | 431 | * |
| | 432 | * So, one lie -- no foreign annotation. |
| | 433 | */ |
| | 434 | ImportApi iapi = NodeFactory.makeImportApi(span, Option |
| | 435 | .<String> none(), Useful.list(aan)); |
| | 436 | imports.add(iapi); |