libnb-javaparser-java_7.4.orig/.hg_archival.txt0000644000000000000000000000022512214026367017764 0ustar 00000000000000repo: 9a66ca7c79fab293c1bb0534e0d208c7e4f58b01 node: bf149ece9888c021529b10395ce16b772521f817 branch: default tag: release74_base tag: release74_fcs libnb-javaparser-java_7.4.orig/.hgignore0000644000000000000000000000032712214026367016504 0ustar 00000000000000^make/netbeans/nb-javac/build/ ^make/netbeans/nb-javac/dist/ ^make/netbeans/nb-javac/nbproject/private/ ^make/netbeans/hudson/cache/ ^build/ ^dist/ ^make/netbeans/nb-javac/ext/ /nbproject/private/ ^.hgtip .DS_Store libnb-javaparser-java_7.4.orig/.hgmail0000644000000000000000000000004712214026367016142 0ustar 00000000000000[usersubs] commits@java.netbeans.org=* libnb-javaparser-java_7.4.orig/.hgtags0000644000000000000000000002757212214026367016172 0ustar 00000000000000d7f65248c0b2a472a0a5a97cca95210ebd87ad90 release61_base ed452dfda4c8149c5cf281c48bc1a29977423950 release65_beta_base 4d206181439a98a02bac5a1cd0341c5a2ffa5cbd release65_base 9a143c3d9b99699214d0e1e5206d6ab850d2585a release67_base 1c46268162cd5673a4c890f9e7177c596e7ab461 release68_base 556dfbf9a5d0120c6fcb21bee847e95ad09976f4 before_jdk7m5_javac 9603caec64a892ef4079eccad2f70b005650d511 after_jdk7m5_javac a03e945cceaa902b144989bb76216b2bd174ff91 release69_base a5ca9c2dcc78db1644157c8afdea37653379e3de release70_base 923f5fa30e1353e04696d6a350cba7dd9e9d451f release701_base 939d2012e9a5bb8835cb77516e996cb26681c0de release71_base 8c7740fb544f72c79c6bd6dc3b7bd58d824de321 release72_base 38fd251c6715c7ef58fe42a7d0e2214facc41ca6 release73_base 38fd251c6715c7ef58fe42a7d0e2214facc41ca6 release73_fcs 09f65aad475903e2f418ca25c68ad4cc244f7e88 last_langtools 9a66ca7c79fab293c1bb0534e0d208c7e4f58b01 jdk7-b24 58039502942e52f4144a33f36290a2bd2f3581e6 jdk7-b25 c46d25a2350ac147d0121d9c9725af6fcb1b4dbe jdk7-b26 a17265993253d61becd04fe7d96d1fe8b4bd6dff jdk7-b27 4ef4bd31856949554967fbf22783babb21a62a0e jdk7-b28 dec081837b01d509dcc2b9de86a4299c1ec17e04 jdk7-b29 eaf608c64fecf70f955dc9f29f94c055b183aeec jdk7-b30 07c916ecfc71f6bf432e4ff09bfbfb6290b5703c jdk7-b31 13aee98cc0d8e24a084b62ad1d48d2a49792416c jdk7-b32 0a5f04fb72825302a80a67c636a7ddc410ead266 jdk7-b33 4026dece07e86ae75154c05b98ba342d00828ed7 jdk7-b34 81f66dd906eb28e43bcaa66c092e794f59a4e52d jdk7-b35 258af9b67b7cb4262ab1b5424160c9ad22d52e8f jdk7-b36 24a47c3062fe8869fcfb533ce0ff770c8ceb550d jdk7-b37 3fd42dfa6f27f2767a241fb82bc01a613f0c2096 jdk7-b38 3fb51e47622bb771571680bc6a7b64c6172b482d jdk7-b39 32e30988324601d08b87989f0821d99aa8534511 jdk7-b40 ded6b40f558e8d19b3c17715b3d67ee001606645 jdk7-b41 5e5567c2db56a931cf07768218c20903d9828b5f jdk7-b42 e2f8f6daee9decd5721d598dacf4d0b5915651df jdk7-b43 28f0b10d6c1afc106465c13b8c663a6afa4fb1a1 jdk7-b44 30db5e0aaf83fe262d9a7227d3fc3e451cd5d459 jdk7-b45 be546a6c08e3c31fba2edcae1de43ae3515d2e59 jdk7-b46 2b8f6bab23926aa32b9cf7e4c540b9d1ce74b7d5 jdk7-b47 c53007f34195f69223bdd4125ec6c0740f7d6736 jdk7-b48 d17d927ad9bdfafae32451645d182acb7bed7be6 jdk7-b49 46f2f6ed96f13fc49fec3d1b6aa616686128cb57 jdk7-b50 8c55d5b0ed71ed3a749eb97e4eab79b4831649b8 jdk7-b51 29329051d483d39f66073752ba4afbf29d893cfe jdk7-b52 dbdeb4a7581b2a8699644b91cae6793cb01953f7 jdk7-b53 197a7f881937d406a01214aa9ded49c073f7d380 jdk7-b54 7394a8694cedea574c7dbd38de87f4cbe0e27b8a jdk7-b55 825f23a4f262eb06cfc94406140f3bfecb17ffe8 jdk7-b56 4030cc469205bbd517ca629fb170afb81760bbc5 jdk7-b57 5bcac54d408b436d2364925ee7947b5609e07962 jdk7-b58 88bcb6772159602317f2e184a69010737db72270 jdk7-b59 5cdce469ea2ad90d308c9abe420fd0643c0a6b9e jdk7-b60 522520757dd34321b27a7145ecbd24ac4fb64f34 jdk7-b61 6855e5aa3348f185fe5b443ee43a1b00ec5d390e jdk7-b62 5c2c8112055565b4980b6756e001e45eb7b88d6e jdk7-b63 d8f23a81d46f47a4186f1044dd9e44841bbeab84 jdk7-b64 7e0056ded28c802609d2bd79bfcda551d72a3fec jdk7-b65 634f519d6f9a602b16bba1c7cd4a17242a8f6889 jdk7-b66 14b1a8ede95493fc53c37ff2626f1f98ce94d108 jdk7-b67 95c1212b07e33b1b8c689b1d279d82ffd5a56e43 jdk7-b68 ce9bcdcb7859bb7ef10afd078ad59ba7847f208d jdk7-b69 97d06f3e87873e310aa2f3fbca58fc8872d86b9f jdk7-b70 33c8c38e1757006c17d80499fb3347102501fae5 jdk7-b71 261c54b2312ed26d6ec45c675831375460250519 jdk7-b72 9596dff460935f09684c11d156ce591f92584f0d jdk7-b73 1a66b08deed0459054b5b1bea3dfbead30d258fa jdk7-b74 2485f5641ed0829205aaaeb31ad711c2c2ef0de3 jdk7-b75 8fb9b4be3cb1574302acde90549a4d333ef51e93 jdk7-b76 0398ae15b90ac76d87ee21844453e95ff8613e43 jdk7-b77 acc1e40a5874ebf32bebcb6ada565b3b40b7461c jdk7-b78 ac5b4c5644ce54585e5287563dde2b006fa664f4 jdk7-b79 f0074aa48d4e2a4c03c92b9c4f880679fea0306c jdk7-b80 cfabfcf9f110ef896cbdd382903d20eefbceefe0 jdk7-b81 47003a3622f6a17756ab0338bfa8a43e36549e99 jdk7-b82 c9f4ae1f1480e89aaf7e72173184089d9cea397a jdk7-b83 d9cd5b8286e44f3baf90da290cd295433e21c05a jdk7-b84 136bfc67946219fb02ee223984540a4a9c5b209f jdk7-b85 ef07347428f2198ae6b8144ac0b9086bbe39fd16 jdk7-b86 409db93d19c002333980df5b797c6b965150c7a0 jdk7-b87 f9b5d4867a26f8c4b90ad37fe2c345b721e93d6b jdk7-b88 6cea9a143208bc1185ced046942c0f4e45dbeba5 jdk7-b89 71c2c23a7c35b2896c87004023b9743b6d1b7758 jdk7-b90 97b6fa97b8ddb3a49394011c2a0ec5d6535e594c jdk7-b91 98cba5876cb50fa3c58a313ddd668f5014ff14f6 jdk7-b92 683cd1f6bc4b562b0ddf29d5f80f05c2123b76b0 jdk7-b93 bb3d7c75a56df0c00246072b996fad1858a771a1 jdk7-b94 752bb790fc2d6df91e91d84420c9c87136eb81eb jdk7-b95 89cd267c216751bdacf8629bb07a40c0950fc4f2 jdk7-b96 c0a41294297ed397098dd92b647f481f0e1bb8fa jdk7-b97 3b38f3aa3dc388eef0737a9fba99f54a1602ee3b jdk7-b98 005bec70ca27239bdd4e6169b9b078507401aa72 jdk7-b99 d1d7595fa824925651f09b8ffcb86c9cf39807be jdk7-b100 20a8fe72ee7b673f59c319a5222fe0eebbd92082 jdk7-b101 ff9c0a0bf7edf637a7dac5062b920924536ed79c jdk7-b102 bd85271c580ce4600b1b2d5598daa19d02174cf7 jdk7-b103 fc7219517ec16b28d729d259020a25b05ffdf0b6 jdk7-b104 aaecac256d39c7cb536e70d20ddd833fc118e43a jdk7-b105 112fcc00659dda1a356ec75d964584e4dae0228f jdk7-b106 2c1c657f69a4ff608a43e1ac61baf3294cd55797 jdk7-b107 a408ebb8b3d427dbb3d8ce153dfaeb060564a0a4 jdk7-b108 4826378eaade4c6676c452efe954be4ee113cc11 jdk7-b109 32da0f38d2fe96c558492b8707b40da24643d41e jdk7-b110 8bec624274ef8535720cff553374347c2f4f5fb2 jdk7-b111 fd2579b80b83bf5d4289426016c7d29174ba5dd9 jdk7-b112 6dbd2d869b0573fa5b799a23cccff47d20c12696 jdk7-b113 e4e7408cdc5b3d91d39161e1e94aad576ecc2dcd jdk7-b114 01e8ac5fbefd35d2d9a0996213cf2390fd164e57 jdk7-b115 857bfcea3f30cb5f4ae96f46a53ae1c772f9b0e5 jdk7-b116 2129a046f117547fc8a5cb3397a767e6d528f5b6 jdk7-b117 c491eec0acc73fa41b77e1619ed03e56d8a75b83 jdk7-b118 814561077c448292f78de461b6de5d78d57c2089 jdk7-b119 1dd813a529cfa06d850ee7dc42da42efb8f6af0e jdk7-b120 1bf969e9792f977a8593496681539840a54fe644 jdk7-b121 11e7b4c0476e4d6085d8d28c4aa2833d46714a2a jdk7-b122 a3b5b531542a372f30e014b1543a619a15a90780 jdk7-b123 4868a36f6fd8972505c466013813eeb28f0482ea jdk7-b124 4b0560c72b529d4b952924b2da94d8436af79d05 jdk7-b125 438a8ad60f7ae7aa897663148fd43fe85ef05e5b jdk7-b126 1e6094c33187f6c3dca55ced3701ee1f9d73a77d jdk7-b127 d7225b476a5d1aebffb8827e7c72ba2e1651f4e7 jdk7-b128 1383d1ee8b5db13d5df9523d1760df17b9d228d4 jdk7-b129 7a98db8cbfce77a619057aa4fdde69d2a06d4101 jdk7-b130 67221b8643b478c4fceacc89240db876455aae76 jdk7-b131 e3d011d59a33acef79eff7523bef069557e91002 jdk7-b132 e77e98f936e83d94c9b56cc7af218dc822a06122 jdk7-b133 3d7acdbb72cab55deedfd35f60d4732abc9d6ac4 jdk7-b134 9d0a61ac567b983da7cc8f4a7030f2245bb6dbab jdk7-b135 ed0f7f1f9511db4f9615b1426d22f8b961629275 jdk7-b136 a15c9b058ae007d4ccb7e35ce44e4dfa977f090b jdk7-b137 53f212bed4f4304dce7f0bf0fa01c998c65bacd6 jdk7-b138 853b6bb99f9b58eb7cf8211c67d3b6e4f1228a3e jdk7-b139 258e6654aba25aab91c9ba3b4c53d05bc895a86c jdk7-b140 90adb5d6adc7d99d27c8b142a31ac8921070274f jdk7-b141 7476b164194c1814704153e74d5ff7e965c6fdbf jdk7-b142 5faa9eedc44e201f2b13ad837e9077668b823d28 jdk7-b143 8eb952f43b117d538f6ca5e9e43ff9ce7646c7ee jdk7-b144 c455e2ae5c93014ae3fc475aba4509b5f70465f7 jdk7-b145 9425dd4f53d5bfcd992d9aecea0eb7d8b2d4f62b jdk7-b146 58bc532d63418ac3c9b42460d89cdaf595c6f3e1 jdk7-b147 e9f118c2bd3c4690d8d2e6b108b5bad7e226634c jdk8-b01 b3c059de2a61fc122c99d555cdd8b85f112393c1 jdk8-b02 f497fac86cf9ada4801ecaf49eb0d2307a2b61c8 jdk8-b03 5df63fd8fa64741e829281ee6febe9954932841b jdk8-b04 5304c2a17d4b001e365a8f0163082dc375f1abab jdk8-b05 d2422276f9dabc848b7a079025719826d2f9a30f jdk8-b06 116980ecec5cc7d52736f09cf332321e0773265f jdk8-b07 e8acc2d6c32f0c8321e642e1a86672a2e196a056 jdk8-b08 b7a7e47c8d3daf7822abf7c37e5179ccbbf53008 jdk8-b09 f6c783e18bdf4d46a0ab273868afebbf32600ff7 jdk8-b10 4bf01f1c4e3464f378959d10f3983a0469181d94 jdk8-b11 f2d6ed25857dfa7f269ac66e13666d648cb988c6 jdk8-b12 ae25163501bc7477cd907e26a006a6f1b05fdb6d jdk8-b13 58f1325d72b2bacc901f5189ee5e4e81e81ea657 jdk8-b14 07599bd780cab1f40da7915e1dc6774629b0cf8c jdk8-b15 1cbe86c11ba69521875c0b0357d7540781eb334d jdk8-b17 ec2c0973cc31e143cffc05ceb63d98fae76f97d4 jdk8-b16 ab1b1cc7857716914f2bb20b3128e5a8978290f7 jdk8-b18 77b2c066084cbc75150efc6603a713c558329813 jdk8-b19 ffd294128a48cbb90ce8f0569f82b61f1f164a18 jdk8-b20 bcb21abf1c4177baf4574f99709513dcd4474727 jdk8-b21 390a7828ae18324030c0546b6452d51093ffa451 jdk8-b22 601ffcc6551d5414ef871be306c3a26396cf16a7 jdk8-b23 6c9d21ca92c41ff5fcfa76c5b7fafe0f042f4aef jdk8-b24 520c30f85bb529a3daf5d7623764c2464f00fd19 jdk8-b25 b556aa8a99c358469861770aebdce884e06fa178 jdk8-b26 be456f9c64e818161c789252145d4ddc292ae863 jdk8-b27 5bed623b0c773aa8a8d5f8d4004ce9d3974143cc jdk8-b28 e974e82abe51ef66dc32bb6ab5d0733753d3c7d7 jdk8-b29 08a3425f39f829502ca0ddbfb2d051c31710cb19 jdk8-b30 b28cfbe7e8b196da954bed9a22bfd790e55333aa jdk8-b31 be069d72dde2bfe6f996c46325a320961ca854c2 jdk8-b32 46831c72b7f6c69fef2cc2935001863643a65f94 jdk8-b33 6b105afbb77ca9600a99eade31f686d070c70581 jdk8-b34 defd666a786334465496c8901fa302b779c7e045 jdk8-b35 94bbaa67686f44a124cd16fd9f1e8a6a3f684d2d jdk8-b36 5891b38985e8b2502296fc29e726b527d03116d2 jdk8-b37 1f224f160aa852c9541380735a27a3439dfb7217 jdk8-b38 a9f547c218d957306dfc0cdd710be041bb62a555 jdk8-b39 86e0dad6aadf626bf5755f503aee2d0da525d9d5 jdk8-b40 179fa85aeefab338cccf1cbe8b494c59bc5df122 jdk8-b41 02c5a3575539e737a1855b31287654e843edd6da jdk8-b42 f8c64d835b2806293b8e924b44f0e32b20657ed3 jdk8-b43 59cbead12ff46dbb397120bd26635bcd7d41ff21 jdk8-b44 e111e4587ccada8eb93f72e834e378c76256f4b7 jdk8-b45 4ca5994971724731233735f055f33d4936fd11d3 jdk8-b46 7e6be2f239c9a4ac6dec280bd18ec296dd78e464 jdk8-b47 afb0a523155727d42b1c773f783ff3a7cfab8e86 jdk8-b48 c72c164ced676d3c360d99b1c52cc80940fc3122 jdk8-b49 b2d8a270f5f2144e14a1fe97fbda9e4391a5332e jdk8-b50 c4cd4cab2220817c88c8c139c9bfc91c36b48826 jdk8-b51 1d2db0e5eabc2eaf865986f7b7ffbf7b14b00232 jdk8-b52 d3d0b9cd76e04bf9e381b402630ac3cfe464bb38 jdk8-b53 9cf72631baf5cb1ebd8736c5efeab7746977ea68 jdk8-b54 e48e7e1f026b82d921433150180799898c088890 jdk8-b55 363e9198b9de68ebf37a3e2c2f3f23543d3915cd jdk8-b56 86d5740b9fdc20ababb8aefde89ae1509ff216a9 jdk8-b57 804a3fbc86e28a4d9e77c30aa0bd4aa68056f23f jdk8-b58 f299927fc31689385f67ab7322c18eb41d8bd71e jdk8-b59 3d2b98ffcb534b0e5be87bb1f9f68d1518ad7729 jdk8-b60 26020b247ad3806dbca33e029ee12e1b191f59f9 jdk8-b61 b47bb81ba962ef80bb6f0b863c33a0afcfb0b49e jdk8-b62 92e6f2190ca0567c857f85c3fb7a2be5adf079d0 jdk8-b63 e6ee43b3e2473798b17a556e9f11eebe25ab81d4 jdk8-b64 5f2faba89cac665e365c05074064ffc934a495eb jdk8-b65 20230f8b0eef92a57043735fc2ca00fea7e510a0 jdk8-b66 303b09787a69136cd2019f9edfed3f308572e9fc jdk8-b67 014a6a11dfe5ddc23ec8c76bb42ac998dbf49acb jdk8-b68 d7360bf35ee1f40ff78c2e83a22b5446ee464346 jdk8-b69 47f71d7c124f24c2fe2dfc49865b332345b458ed jdk8-b70 467e4d9281bcf119eaec42af1423c96bd401871c jdk8-b71 6f0986ed9b7e11d6eb06618f27e20b18f19fb797 jdk8-b72 8d0baee36c7184d55c80354b45704c37d6b7ac79 jdk8-b73 56c97aff46bb577b8668874154c24115a7e8a3e8 jdk8-b74 c2e11e2ec4a3682513e566849e5562f31ded8c65 jdk8-b75 e81839b3233792415daaab051698edc6067f1a16 jdk8-b76 89c66415168925dffe492356ff893ff248bb5603 jdk8-b77 af8417e590f4e76e0dfed09e71239fb102ef0d43 jdk8-b78 56dfafbb9e1ad7548a4415316dc003296fb498cb jdk8-b79 a8227c61768499dac847ea718af6719027c949f2 jdk8-b80 ed69d087fdfd394491657a28ba9bc58e7849b7db jdk8-b81 825da6847791994a8f405ee397df9e7fa638a458 jdk8-b82 22ba3f92d4ae43bbc19793e854171cae2586f644 jdk8-b83 cfb65ca92082b2412aed66c8422c2466bde544ef jdk8-b84 4a48f31735349782ad13980267358c97076adc66 jdk8-b85 6ab578e141dfd17c4dc03869bb204aafa490c9f4 jdk8-b86 1329f9c38d93c8caf339d7687df8371d06fe9e56 jdk8-b87 a1e10f3adc47c8602a72e43a41403a642e73e0b1 jdk8-b88 ec434cfd2752a7742c875c2fe7d556d8b81c0f3a jdk8-b89 e19283cd30a43fca94d8f7639c73ef66db493b1e jdk8-b90 997c0fae2b12108959387862be54b78ca0ae3fca jdk8-b91 149890642a0ed5138a4f16fe08ddbfeb8f8a1cb4 jdk8-b92 2c5a568ee36eb2d9471483b7a310c49ed545db55 jdk8-b93 48c6e6ab7c815fd41d747f0218f8041c22f3a460 jdk8-b94 4cb1136231275a1f8af53f5bfdef0b488e4b5bab jdk8-b95 988aef3a8c3adac482363293f65e77ec4c5ce98d jdk8-b96 6a11a81a8824c17f6cd2ec8f8492e1229b694e96 jdk8-b97 ce5a90df517bdceb2739d7dd3e6764b070def802 jdk8-b98 6d85acab769eb79bc058f5640fa86a6ef096a583 jdk8-b99 82f68da70e471ee5640016e3f38c014347a5c785 jdk8-b100 0324dbf07b0f1cc51ad9fa18976489d02d23b60d jdk8-b101 libnb-javaparser-java_7.4.orig/.jcheck/conf0000644000000000000000000000001512214026367017050 0ustar 00000000000000project=jdk8 libnb-javaparser-java_7.4.orig/ASSEMBLY_EXCEPTION0000644000000000000000000000273712214026367017470 0ustar 00000000000000 OPENJDK ASSEMBLY EXCEPTION The OpenJDK source code made available by Sun at openjdk.java.net and openjdk.dev.java.net ("OpenJDK Code") is distributed under the terms of the GNU General Public License version 2 only ("GPL2"), with the following clarification and special exception. Linking this OpenJDK Code statically or dynamically with other code is making a combined work based on this library. Thus, the terms and conditions of GPL2 cover the whole combination. As a special exception, Sun gives you permission to link this OpenJDK Code with certain code licensed by Sun as indicated at http://openjdk.java.net/legal/exception-modules-2007-05-08.html ("Designated Exception Modules") to produce an executable, regardless of the license terms of the Designated Exception Modules, and to copy and distribute the resulting executable under GPL2, provided that the Designated Exception Modules continue to be governed by the licenses under which they were offered by Sun. As such, it allows licensees and sublicensees of Sun's GPL2 OpenJDK Code to build an executable that includes those portions of necessary code that Sun could not provide under GPL2 (or that Sun has provided under GPL2 with the Classpath exception). If you modify or add to the OpenJDK code, that new GPL2 code may still be combined with Designated Exception Modules if the new code is made subject to this exception by its copyright holder. libnb-javaparser-java_7.4.orig/LICENSE0000644000000000000000000004547712214026367015725 0ustar 00000000000000The GNU General Public License (GPL) Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. One line to give the program's name and a brief idea of what it does. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free software, and you are welcome to redistribute it under certain conditions; type 'show c' for details. The hypothetical commands 'show w' and 'show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than 'show w' and 'show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program 'Gnomovision' (which makes passes at compilers) written by James Hacker. signature of Ty Coon, 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. "CLASSPATH" EXCEPTION TO THE GPL Certain source files distributed by Oracle America and/or its affiliates are subject to the following clarification and special exception to the GPL, but only where Oracle has expressly included in the particular source file's header the words "Oracle designates this particular file as subject to the "Classpath" exception as provided by Oracle in the LICENSE file that accompanied this code." Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. libnb-javaparser-java_7.4.orig/README0000644000000000000000000000351512214026367015563 0ustar 00000000000000Building the "langtools" workspace. The "langtools" workspace can be built from the command line with Ant. The build file is make/build.xml, in conjunction with make/build.properties. Some additional user-specific properties files are also read, to allow you to customize selected properties as needed. Individual tools within the workspace can also be built and worked on with NetBeans, using the projects in the make/netbeans directory. The "langtools" workspace can also be built from the command line with GNU Make, although the Makefile is simply a wrapper around the Ant build file. This is provided for systems (such as the full OpenJDK build) that expect to be able to build this workspace with GNU Make. System Requirements: Ant: version 1.6.5 or later NetBeans: version 6.0 or later (optional) JDK: currently version 1.5.0, although 1.6.0 is recommended OS: any system supporting the above tools For more information: Ant: http://ant.apache.org/ GNU Make: http://www.gnu.org/software/make/ NetBeans: http://www.netbeans.org/ Testing the "langtools" workspace. The primary set of tests for the compiler is the compiler TCK. This tests that the compiler performs according to the specifications in JLS and JVMS. In addition, there is a substantial collection of regression and unit tests for all the tools in the maain langtools test/ directory. Finally, there is a small set of tests to do basic validation of a build of the langtools workspace for use by JDK. These tests check the contents of the dist/ directory generated by the build, and verify that the various tools can do basic "Hello World"-style processing. These tests should be run by jtreg, with the -jdk option set a version of JDK capable of running the default output of the javac compiler in this workspace. Currently, this means JDK 6 or better. libnb-javaparser-java_7.4.orig/THIRD_PARTY_README0000644000000000000000000052014712214026367017501 0ustar 00000000000000DO NOT TRANSLATE OR LOCALIZE. ----------------------------- %% This notice is provided with respect to ASM Bytecode Manipulation Framework v3.1, which is included with JRE 7, JDK 7, and OpenJDK 7. --- begin of LICENSE --- Copyright (c) 2000-2005 INRIA, France Telecom All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holders nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --- end of LICENSE --- -------------------------------------------------------------------------------- %% This notice is provided with respect to CodeViewer 1.0, which is included with JDK 7. --- begin of LICENSE --- Copyright 1999 by CoolServlets.com. Any errors or suggested improvements to this class can be reported as instructed on CoolServlets.com. We hope you enjoy this program... your comments will encourage further development! This software is distributed under the terms of the BSD License. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither name of CoolServlets.com nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY COOLSERVLETS.COM AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." --- end of LICENSE --- ------------------------------------------------------------------------------- %% This notice is provided with respect to Cryptix AES 3.2.0, which is included with JRE 7, JDK 7, and OpenJDK 7. --- begin of LICENSE --- Cryptix General License Copyright (c) 1995-2005 The Cryptix Foundation Limited. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE CRYPTIX FOUNDATION LIMITED AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE CRYPTIX FOUNDATION LIMITED OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --- end of LICENSE --- ------------------------------------------------------------------------------- %% This notice is provided with respect to CUP Parser Generator for Java 0.10k, which is included with JRE 7, JDK 7, and OpenJDK 7. --- begin of LICENSE --- Copyright 1996-1999 by Scott Hudson, Frank Flannery, C. Scott Ananian Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both the copyright notice and this permission notice and warranty disclaimer appear in supporting documentation, and that the names of the authors or their employers not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. The authors and their employers disclaim all warranties with regard to this software, including all implied warranties of merchantability and fitness. In no event shall the authors or their employers be liable for any special, indirect or consequential damages or any damages whatsoever resulting from loss of use, data or profits, whether in an action of contract, negligence or other tortious action, arising out of or in connection with the use or performance of this software. --- end of LICENSE --- ------------------------------------------------------------------------------- %% This notice is provided with respect to Document Object Model (DOM) Level 2 & 3, which is included with JRE 7, JDK 7, and OpenJDK 7. --- begin of LICENSE --- W3C SOFTWARE NOTICE AND LICENSE http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 This work (and included software, documentation such as READMEs, or other related items) is being provided by the copyright holders under the following license. By obtaining, using and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions. Permission to copy, modify, and distribute this software and its documentation, with or without modification, for any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies of the software and documentation or portions thereof, including modifications: 1.The full text of this NOTICE in a location viewable to users of the redistributed or derivative work. 2.Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, the W3C Software Short Notice should be included (hypertext is preferred, text is permitted) within the body of any redistributed or derivative code. 3.Notice of any changes or modifications to the files, including the date changes were made. (We recommend you provide URIs to the location from which the code is derived.) THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS,COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION. The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the software without specific, written prior permission. Title to copyright in this software and any associated documentation will at all times remain with copyright holders. ____________________________________ This formulation of W3C's notice and license became active on December 31 2002. This version removes the copyright ownership notice such that this license can be used with materials other than those owned by the W3C, reflects that ERCIM is now a host of the W3C, includes references to this specific dated version of the license, and removes the ambiguous grant of "use". Otherwise, this version is the same as the previous version and is written so as to preserve the Free Software Foundation's assessment of GPL compatibility and OSI's certification under the Open Source Definition. Please see our Copyright FAQ for common questions about using materials from our site, including specific terms and conditions for packages like libwww, Amaya, and Jigsaw. Other questions about this notice can be directed to site-policy@w3.org. --- end of LICENSE --- ------------------------------------------------------------------------------- %% This notice is provided with respect to Elliptic Curve Cryptography, which is included with JRE 7, JDK 7, and OpenJDK 7. You are receiving a copy of the Elliptic Curve Cryptography library in source form with the JDK 7 source distribution and object code in the JRE 7 & JDK 7 runtime. The terms of the Oracle license do NOT apply to the Elliptic Curve Cryptography library program; it is licensed under the following license, separately from the Oracle programs you receive. If you do not wish to install this program, you may delete the library named libsunec.so (on Solaris and Linux systems) or sunec.dll (on Windows systems) from the JRE bin directory reserved for native libraries. --- begin of LICENSE --- GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! --- end of LICENSE --- ------------------------------------------------------------------------------- %% This notice is provided with respect to FontConfig 2.5, which is included with JRE 7, JDK 7, and OpenJDK 7 source distributions on Linux and Solaris. --- begin of LICENSE --- Copyright © 2001,2003 Keith Packard Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Keith Packard not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. Keith Packard makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. --- end of LICENSE --- ------------------------------------------------------------------------------- %% This notice is provided with respect to IAIK PKCS#11 Wrapper, which is included with JRE 7, JDK 7, and OpenJDK 7. --- begin of LICENSE --- IAIK PKCS#11 Wrapper License Copyright (c) 2002 Graz University of Technology. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The end-user documentation included with the redistribution, if any, must include the following acknowledgment: "This product includes software developed by IAIK of Graz University of Technology." Alternately, this acknowledgment may appear in the software itself, if and wherever such third-party acknowledgments normally appear. 4. The names "Graz University of Technology" and "IAIK of Graz University of Technology" must not be used to endorse or promote products derived from this software without prior written permission. 5. Products derived from this software may not be called "IAIK PKCS Wrapper", nor may "IAIK" appear in their name, without prior written permission of Graz University of Technology. THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE LICENSOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --- end of LICENSE --- ------------------------------------------------------------------------------- %% This notice is provided with respect to ICU4C 4.0.1 and ICU4J 4.4, which is included with JRE 7, JDK 7, and OpenJDK 7. --- begin of LICENSE --- Copyright (c) 1995-2010 International Business Machines Corporation and others All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, provided that the above copyright notice(s) and this permission notice appear in all copies of the Software and that both the above copyright notice(s) and this permission notice appear in supporting documentation. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. Except as contained in this notice, the name of a copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization of the copyright holder. All trademarks and registered trademarks mentioned herein are the property of their respective owners. --- end of LICENSE --- ------------------------------------------------------------------------------- %% This notice is provided with respect to IJG JPEG 6b, which is included with JRE 7, JDK 7, and OpenJDK 7. --- begin of LICENSE --- This software is copyright (C) 1991-1998, Thomas G. Lane. All Rights Reserved except as specified below. Permission is hereby granted to use, copy, modify, and distribute this software (or portions thereof) for any purpose, without fee, subject to these conditions: (1) If any part of the source code for this software is distributed, then this README file must be included, with this copyright and no-warranty notice unaltered; and any additions, deletions, or changes to the original files must be clearly indicated in accompanying documentation. (2) If only executable code is distributed, then the accompanying documentation must state that "this software is based in part on the work of the Independent JPEG Group". (3) Permission for use of this software is granted only if the user accepts full responsibility for any undesirable consequences; the authors accept NO LIABILITY for damages of any kind. These conditions apply to any software derived from or based on the IJG code, not just to the unmodified library. If you use our work, you ought to acknowledge us. Permission is NOT granted for the use of any IJG author's name or company name in advertising or publicity relating to this software or products derived from it. This software may be referred to only as "the Independent JPEG Group's software". We specifically permit and encourage the use of this software as the basis of commercial products, provided that all warranty or liability claims are assumed by the product vendor. --- end of LICENSE --- -------------------------------------------------------------------------------- %% This notice is provided with respect to JOpt-Simple v3.0, which is included with JRE 7, JDK 7, and OpenJDK 7. --- begin of LICENSE --- Copyright (c) 2004-2009 Paul R. Holser, Jr. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --- end of LICENSE --- -------------------------------------------------------------------------------- %% This notice is provided with respect to Kerberos functionality, which which is included with JRE 7, JDK 7, and OpenJDK 7. --- begin of LICENSE --- (C) Copyright IBM Corp. 1999 All Rights Reserved. Copyright 1997 The Open Group Research Institute. All rights reserved. --- end of LICENSE --- ------------------------------------------------------------------------------- %% This notice is provided with respect to Kerberos functionality from FundsXpress, INC., which is included with JRE 7, JDK 7, and OpenJDK 7. --- begin of LICENSE --- Copyright (C) 1998 by the FundsXpress, INC. All rights reserved. Export of this software from the United States of America may require a specific license from the United States Government. It is the responsibility of any person or organization contemplating export to obtain such a license before exporting. WITHIN THAT CONSTRAINT, permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of FundsXpress. not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. FundsXpress makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. --- end of LICENSE --- ------------------------------------------------------------------------------- %% This notice is provided with respect to Kronos OpenGL headers, which is included with JDK 7 and OpenJDK 7 source distributions. --- begin of LICENSE --- Copyright (c) 2007 The Khronos Group Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and/or associated documentation files (the "Materials"), to deal in the Materials without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Materials, and to permit persons to whom the Materials are furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Materials. THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. --- end of LICENSE --- ------------------------------------------------------------------------------- %% Portions Copyright Eastman Kodak Company 1992 ------------------------------------------------------------------------------- %% This notice is provided with respect to libpng 1.2.18, which is included with JRE 7, JDK 7, and OpenJDK 7. --- begin of LICENSE --- This copy of the libpng notices is provided for your convenience. In case of any discrepancy between this copy and the notices in the file png.h that is included in the libpng distribution, the latter shall prevail. COPYRIGHT NOTICE, DISCLAIMER, and LICENSE: If you modify libpng you may insert additional notices immediately following this sentence. libpng versions 1.2.6, August 15, 2004, through 1.2.18, May 15, 2007, are Copyright (c) 2004, 2006-2007 Glenn Randers-Pehrson, and are distributed according to the same disclaimer and license as libpng-1.2.5 with the following individual added to the list of Contributing Authors Cosmin Truta libpng versions 1.0.7, July 1, 2000, through 1.2.5 - October 3, 2002, are Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are distributed according to the same disclaimer and license as libpng-1.0.6 with the following individuals added to the list of Contributing Authors Simon-Pierre Cadieux Eric S. Raymond Gilles Vollant and with the following additions to the disclaimer: There is no warranty against interference with your enjoyment of the library or against infringement. There is no warranty that our efforts or the library will fulfill any of your particular purposes or needs. This library is provided with all faults, and the entire risk of satisfactory quality, performance, accuracy, and effort is with the user. libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are Copyright (c) 1998, 1999 Glenn Randers-Pehrson, and are distributed according to the same disclaimer and license as libpng-0.96, with the following individuals added to the list of Contributing Authors: Tom Lane Glenn Randers-Pehrson Willem van Schaik libpng versions 0.89, June 1996, through 0.96, May 1997, are Copyright (c) 1996, 1997 Andreas Dilger Distributed according to the same disclaimer and license as libpng-0.88, with the following individuals added to the list of Contributing Authors: John Bowler Kevin Bracey Sam Bushell Magnus Holmgren Greg Roelofs Tom Tanner libpng versions 0.5, May 1995, through 0.88, January 1996, are Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. For the purposes of this copyright and license, "Contributing Authors" is defined as the following set of individuals: Andreas Dilger Dave Martindale Guy Eric Schalnat Paul Schmidt Tim Wegner The PNG Reference Library is supplied "AS IS". The Contributing Authors and Group 42, Inc. disclaim all warranties, expressed or implied, including, without limitation, the warranties of merchantability and of fitness for any purpose. The Contributing Authors and Group 42, Inc. assume no liability for direct, indirect, incidental, special, exemplary, or consequential damages, which may result from the use of the PNG Reference Library, even if advised of the possibility of such damage. Permission is hereby granted to use, copy, modify, and distribute this source code, or portions hereof, for any purpose, without fee, subject to the following restrictions: 1. The origin of this source code must not be misrepresented. 2. Altered versions must be plainly marked as such and must not be misrepresented as being the original source. 3. This Copyright notice may not be removed or altered from any source or altered source distribution. The Contributing Authors and Group 42, Inc. specifically permit, without fee, and encourage the use of this source code as a component to supporting the PNG file format in commercial products. If you use this source code in a product, acknowledgment is not required but would be appreciated. A "png_get_copyright" function is available, for convenient use in "about" boxes and the like: printf("%s",png_get_copyright(NULL)); Also, the PNG logo (in PNG format, of course) is supplied in the files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31). Libpng is OSI Certified Open Source Software. OSI Certified Open Source is a certification mark of the Open Source Initiative. Glenn Randers-Pehrson glennrp at users.sourceforge.net May 15, 2007 --- end of LICENSE --- ------------------------------------------------------------------------------- %% This notice is provided with respect to libungif 4.1.3, which is included with JRE 7, JDK 7, and OpenJDK 7. --- begin of LICENSE --- The GIFLIB distribution is Copyright (c) 1997 Eric S. Raymond Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --- end of LICENSE --- ------------------------------------------------------------------------------- %% This notice is provided with respect to Little CMS 2.0, which is included with OpenJDK 7. --- begin of LICENSE --- Little CMS Copyright (c) 1998-2010 Marti Maria Saguer Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --- end of LICENSE --- ------------------------------------------------------------------------------- %% Lucida is a registered trademark or trademark of Bigelow & Holmes in the U.S. and other countries. ------------------------------------------------------------------------------- %% This notice is provided with respect to Mesa 3D Graphics Library v4.1, which is included with JRE 7, JDK 7, and OpenJDK 7 source distributions. --- begin of LICENSE --- Mesa 3-D graphics library Version: 4.1 Copyright (C) 1999-2002 Brian Paul All Rights Reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --- end of LICENSE --- ------------------------------------------------------------------------------- %% This notice is provided with respect to PC/SC Lite for Suse Linux v.1.1.1, which is included with JRE 7, JDK 7, and OpenJDK 7 on Linux and Solaris. --- begin of LICENSE --- Copyright (c) 1999-2004 David Corcoran Copyright (c) 1999-2004 Ludovic Rousseau All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. All advertising materials mentioning features or use of this software must display the following acknowledgement: This product includes software developed by: David Corcoran http://www.linuxnet.com (MUSCLE) 4. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. Changes to this license can be made only by the copyright author with explicit written consent. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --- end of LICENSE --- ------------------------------------------------------------------------------- %% This notice is provided with respect to Relax NG Object/Parser v.20050510, which is included with JRE 7, JDK 7, and OpenJDK 7. --- begin of LICENSE --- Copyright (c) Kohsuke Kawaguchi Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --- end of LICENSE --- ------------------------------------------------------------------------------- %% This notice is provided with respect to RelaxNGCC v1.12, which is included with JRE 7, JDK 7, and OpenJDK 7. --- begin of LICENSE --- Copyright (c) 2000-2003 Daisuke Okajima and Kohsuke Kawaguchi. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The end-user documentation included with the redistribution, if any, must include the following acknowledgment: "This product includes software developed by Daisuke Okajima and Kohsuke Kawaguchi (http://relaxngcc.sf.net/)." Alternately, this acknowledgment may appear in the software itself, if and wherever such third-party acknowledgments normally appear. 4. The names of the copyright holders must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact the copyright holders. 5. Products derived from this software may not be called "RELAXNGCC", nor may "RELAXNGCC" appear in their name, without prior written permission of the copyright holders. THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --- end of LICENSE --- ------------------------------------------------------------------------------- %% This notice is provided with respect to Mozilla Rhino v1.7R3, which is included with JRE 7, JDK 7, and OpenJDK 7 --- begin of LICENSE --- MOZILLA PUBLIC LICENSE Version 1.1 --------------- 1. Definitions. 1.0.1. "Commercial Use" means distribution or otherwise making the Covered Code available to a third party. 1.1. "Contributor" means each entity that creates or contributes to the creation of Modifications. 1.2. "Contributor Version" means the combination of the Original Code, prior Modifications used by a Contributor, and the Modifications made by that particular Contributor. 1.3. "Covered Code" means the Original Code or Modifications or the combination of the Original Code and Modifications, in each case including portions thereof. 1.4. "Electronic Distribution Mechanism" means a mechanism generally accepted in the software development community for the electronic transfer of data. 1.5. "Executable" means Covered Code in any form other than Source Code. 1.6. "Initial Developer" means the individual or entity identified as the Initial Developer in the Source Code notice required by Exhibit A. 1.7. "Larger Work" means a work which combines Covered Code or portions thereof with code not governed by the terms of this License. 1.8. "License" means this document. 1.8.1. "Licensable" means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein. 1.9. "Modifications" means any addition to or deletion from the substance or structure of either the Original Code or any previous Modifications. When Covered Code is released as a series of files, a Modification is: A. Any addition to or deletion from the contents of a file containing Original Code or previous Modifications. B. Any new file that contains any part of the Original Code or previous Modifications. 1.10. "Original Code" means Source Code of computer software code which is described in the Source Code notice required by Exhibit A as Original Code, and which, at the time of its release under this License is not already Covered Code governed by this License. 1.10.1. "Patent Claims" means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor. 1.11. "Source Code" means the preferred form of the Covered Code for making modifications to it, including all modules it contains, plus any associated interface definition files, scripts used to control compilation and installation of an Executable, or source code differential comparisons against either the Original Code or another well known, available Covered Code of the Contributor's choice. The Source Code can be in a compressed or archival form, provided the appropriate decompression or de-archiving software is widely available for no charge. 1.12. "You" (or "Your") means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License or a future version of this License issued under Section 6.1. For legal entities, "You" includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, "control" means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity. 2. Source Code License. 2.1. The Initial Developer Grant. The Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims: (a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer to use, reproduce, modify, display, perform, sublicense and distribute the Original Code (or portions thereof) with or without Modifications, and/or as part of a Larger Work; and (b) under Patents Claims infringed by the making, using or selling of Original Code, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Code (or portions thereof). (c) the licenses granted in this Section 2.1(a) and (b) are effective on the date Initial Developer first distributes Original Code under the terms of this License. (d) Notwithstanding Section 2.1(b) above, no patent license is granted: 1) for code that You delete from the Original Code; 2) separate from the Original Code; or 3) for infringements caused by: i) the modification of the Original Code or ii) the combination of the Original Code with other software or devices. 2.2. Contributor Grant. Subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license (a) under intellectual property rights (other than patent or trademark) Licensable by Contributor, to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof) either on an unmodified basis, with other Modifications, as Covered Code and/or as part of a Larger Work; and (b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: 1) Modifications made by that Contributor (or portions thereof); and 2) the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination). (c) the licenses granted in Sections 2.2(a) and 2.2(b) are effective on the date Contributor first makes Commercial Use of the Covered Code. (d) Notwithstanding Section 2.2(b) above, no patent license is granted: 1) for any code that Contributor has deleted from the Contributor Version; 2) separate from the Contributor Version; 3) for infringements caused by: i) third party modifications of Contributor Version or ii) the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or 4) under Patent Claims infringed by Covered Code in the absence of Modifications made by that Contributor. 3. Distribution Obligations. 3.1. Application of License. The Modifications which You create or to which You contribute are governed by the terms of this License, including without limitation Section 2.2. The Source Code version of Covered Code may be distributed only under the terms of this License or a future version of this License released under Section 6.1, and You must include a copy of this License with every copy of the Source Code You distribute. You may not offer or impose any terms on any Source Code version that alters or restricts the applicable version of this License or the recipients' rights hereunder. However, You may include an additional document offering the additional rights described in Section 3.5. 3.2. Availability of Source Code. Any Modification which You create or to which You contribute must be made available in Source Code form under the terms of this License either on the same media as an Executable version or via an accepted Electronic Distribution Mechanism to anyone to whom you made an Executable version available; and if made available via Electronic Distribution Mechanism, must remain available for at least twelve (12) months after the date it initially became available, or at least six (6) months after a subsequent version of that particular Modification has been made available to such recipients. You are responsible for ensuring that the Source Code version remains available even if the Electronic Distribution Mechanism is maintained by a third party. 3.3. Description of Modifications. You must cause all Covered Code to which You contribute to contain a file documenting the changes You made to create that Covered Code and the date of any change. You must include a prominent statement that the Modification is derived, directly or indirectly, from Original Code provided by the Initial Developer and including the name of the Initial Developer in (a) the Source Code, and (b) in any notice in an Executable version or related documentation in which You describe the origin or ownership of the Covered Code. 3.4. Intellectual Property Matters (a) Third Party Claims. If Contributor has knowledge that a license under a third party's intellectual property rights is required to exercise the rights granted by such Contributor under Sections 2.1 or 2.2, Contributor must include a text file with the Source Code distribution titled "LEGAL" which describes the claim and the party making the claim in sufficient detail that a recipient will know whom to contact. If Contributor obtains such knowledge after the Modification is made available as described in Section 3.2, Contributor shall promptly modify the LEGAL file in all copies Contributor makes available thereafter and shall take other steps (such as notifying appropriate mailing lists or newsgroups) reasonably calculated to inform those who received the Covered Code that new knowledge has been obtained. (b) Contributor APIs. If Contributor's Modifications include an application programming interface and Contributor has knowledge of patent licenses which are reasonably necessary to implement that API, Contributor must also include this information in the LEGAL file. (c) Representations. Contributor represents that, except as disclosed pursuant to Section 3.4(a) above, Contributor believes that Contributor's Modifications are Contributor's original creation(s) and/or Contributor has sufficient rights to grant the rights conveyed by this License. 3.5. Required Notices. You must duplicate the notice in Exhibit A in each file of the Source Code. If it is not possible to put such notice in a particular Source Code file due to its structure, then You must include such notice in a location (such as a relevant directory) where a user would be likely to look for such a notice. If You created one or more Modification(s) You may add your name as a Contributor to the notice described in Exhibit A. You must also duplicate this License in any documentation for the Source Code where You describe recipients' rights or ownership rights relating to Covered Code. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Code. However, You may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear than any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer. 3.6. Distribution of Executable Versions. You may distribute Covered Code in Executable form only if the requirements of Section 3.1-3.5 have been met for that Covered Code, and if You include a notice stating that the Source Code version of the Covered Code is available under the terms of this License, including a description of how and where You have fulfilled the obligations of Section 3.2. The notice must be conspicuously included in any notice in an Executable version, related documentation or collateral in which You describe recipients' rights relating to the Covered Code. You may distribute the Executable version of Covered Code or ownership rights under a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable version does not attempt to limit or alter the recipient's rights in the Source Code version from the rights set forth in this License. If You distribute the Executable version under a different license You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or any Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer. 3.7. Larger Works. You may create a Larger Work by combining Covered Code with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Code. 4. Inability to Comply Due to Statute or Regulation. If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Code due to statute, judicial order, or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be included in the LEGAL file described in Section 3.4 and must be included with all distributions of the Source Code. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it. 5. Application of this License. This License applies to code to which the Initial Developer has attached the notice in Exhibit A and to related Covered Code. 6. Versions of the License. 6.1. New Versions. Netscape Communications Corporation ("Netscape") may publish revised and/or new versions of the License from time to time. Each version will be given a distinguishing version number. 6.2. Effect of New Versions. Once Covered Code has been published under a particular version of the License, You may always continue to use it under the terms of that version. You may also choose to use such Covered Code under the terms of any subsequent version of the License published by Netscape. No one other than Netscape has the right to modify the terms applicable to Covered Code created under this License. 6.3. Derivative Works. If You create or use a modified version of this License (which you may only do in order to apply it to code which is not already Covered Code governed by this License), You must (a) rename Your license so that the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape", "MPL", "NPL" or any confusingly similar phrase do not appear in your license (except to note that your license differs from this License) and (b) otherwise make it clear that Your version of the license contains terms which differ from the Mozilla Public License and Netscape Public License. (Filling in the name of the Initial Developer, Original Code or Contributor in the notice described in Exhibit A shall not of themselves be deemed to be modifications of this License.) 7. DISCLAIMER OF WARRANTY. COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. 8. TERMINATION. 8.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. All sublicenses to the Covered Code which are properly granted shall survive any termination of this License. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive. 8.2. If You initiate litigation by asserting a patent infringement claim (excluding declatory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You file such action is referred to as "Participant") alleging that: (a) such Participant's Contributor Version directly or indirectly infringes any patent, then any and all rights granted by such Participant to You under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively, unless if within 60 days after receipt of notice You either: (i) agree in writing to pay Participant a mutually agreeable reasonable royalty for Your past and future use of Modifications made by such Participant, or (ii) withdraw Your litigation claim with respect to the Contributor Version against such Participant. If within 60 days of notice, a reasonable royalty and payment arrangement are not mutually agreed upon in writing by the parties or the litigation claim is not withdrawn, the rights granted by Participant to You under Sections 2.1 and/or 2.2 automatically terminate at the expiration of the 60 day notice period specified above. (b) any software, hardware, or device, other than such Participant's Contributor Version, directly or indirectly infringes any patent, then any rights granted to You by such Participant under Sections 2.1(b) and 2.2(b) are revoked effective as of the date You first made, used, sold, distributed, or had made, Modifications made by that Participant. 8.3. If You assert a patent infringement claim against Participant alleging that such Participant's Contributor Version directly or indirectly infringes any patent where such claim is resolved (such as by license or settlement) prior to the initiation of patent infringement litigation, then the reasonable value of the licenses granted by such Participant under Sections 2.1 or 2.2 shall be taken into account in determining the amount or value of any payment or license. 8.4. In the event of termination under Sections 8.1 or 8.2 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or any distributor hereunder prior to termination shall survive termination. 9. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. 10. U.S. GOVERNMENT END USERS. The Covered Code is a "commercial item," as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer software" and "commercial computer software documentation," as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Code with only those rights set forth herein. 11. MISCELLANEOUS. This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by California law provisions (except to the extent applicable law, if any, provides otherwise), excluding its conflict-of-law provisions. With respect to disputes in which at least one party is a citizen of, or an entity chartered or registered to do business in the United States of America, any litigation relating to this License shall be subject to the jurisdiction of the Federal Courts of the Northern District of California, with venue lying in Santa Clara County, California, with the losing party responsible for costs, including without limitation, court costs and reasonable attorneys' fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. 12. RESPONSIBILITY FOR CLAIMS. As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability. 13. MULTIPLE-LICENSED CODE. Initial Developer may designate portions of the Covered Code as "Multiple-Licensed". "Multiple-Licensed" means that the Initial Developer permits you to utilize portions of the Covered Code under Your choice of the NPL or the alternative licenses, if any, specified by the Initial Developer in the file described in Exhibit A. EXHIBIT A - Mozilla Public License. ``The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/ Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. The Original Code is ______________________________________. The Initial Developer of the Original Code is ________________________. Portions created by ______________________ are Copyright (C) ______ _______________________. All Rights Reserved. Contributor(s): ______________________________________. Alternatively, the contents of this file may be used under the terms of the _____ license (the "[___] License"), in which case the provisions of [______] License are applicable instead of those above. If you wish to allow use of your version of this file only under the terms of the [____] License and not to allow others to use your version of this file under the MPL, indicate your decision by deleting the provisions above and replace them with the notice and other provisions required by the [___] License. If you do not delete the provisions above, a recipient may use your version of this file under either the MPL or the [___] License." [NOTE: The text of this Exhibit A may differ slightly from the text of the notices in the Source Code files of the Original Code. You should use the text of this Exhibit A rather than the text found in the Original Code Source Code for Your Modifications.] --- end of LICENSE --- ------------------------------------------------------------------------------- %% This notice is provided with respect to SAX 2.0.1, which is included with JRE 7, JDK 7, and OpenJDK 7. --- begin of LICENSE --- SAX is free! In fact, it's not possible to own a license to SAX, since it's been placed in the public domain. No Warranty Because SAX is released to the public domain, there is no warranty for the design or for the software implementation, to the extent permitted by applicable law. Except when otherwise stated in writing the copyright holders and/or other parties provide SAX "as is" without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. The entire risk as to the quality and performance of SAX is with you. Should SAX prove defective, you assume the cost of all necessary servicing, repair or correction. In no event unless required by applicable law or agreed to in writing will any copyright holder, or any other party who may modify and/or redistribute SAX, be liable to you for damages, including any general, special, incidental or consequential damages arising out of the use or inability to use SAX (including but not limited to loss of data or data being rendered inaccurate or losses sustained by you or third parties or a failure of the SAX to operate with any other programs), even if such holder or other party has been advised of the possibility of such damages. Copyright Disclaimers This page includes statements to that effect by David Megginson, who would have been able to claim copyright for the original work. SAX 1.0 Version 1.0 of the Simple API for XML (SAX), created collectively by the membership of the XML-DEV mailing list, is hereby released into the public domain. No one owns SAX: you may use it freely in both commercial and non-commercial applications, bundle it with your software distribution, include it on a CD-ROM, list the source code in a book, mirror the documentation at your own web site, or use it in any other way you see fit. David Megginson, sax@megginson.com 1998-05-11 SAX 2.0 I hereby abandon any property rights to SAX 2.0 (the Simple API for XML), and release all of the SAX 2.0 source code, compiled code, and documentation contained in this distribution into the Public Domain. SAX comes with NO WARRANTY or guarantee of fitness for any purpose. David Megginson, david@megginson.com 2000-05-05 --- end of LICENSE --- ------------------------------------------------------------------------------- %% This notice is provided with respect to SoftFloat version 2b, which is included with JRE 7, JDK 7, and OpenJDK 7 on Linux/ARM. --- begin of LICENSE --- Use of any of this software is governed by the terms of the license below: SoftFloat was written by me, John R. Hauser. This work was made possible in part by the International Computer Science Institute, located at Suite 600, 1947 Center Street, Berkeley, California 94704. Funding was partially provided by the National Science Foundation under grant MIP-9311980. The original version of this code was written as part of a project to build a fixed-point vector processor in collaboration with the University of California at Berkeley, overseen by Profs. Nelson Morgan and John Wawrzynek. THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES, COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE. Derivative works are acceptable, even for commercial purposes, provided that the minimal documentation requirements stated in the source code are satisfied. --- end of LICENSE --- ------------------------------------------------------------------------------- %% Portions licensed from Taligent, Inc. ------------------------------------------------------------------------------- %% This notice is provided with respect to Thai Dictionary, which is included with JRE 7, JDK 7, and OpenJDK 7. --- begin of LICENSE --- Copyright (C) 1982 The Royal Institute, Thai Royal Government. Copyright (C) 1998 National Electronics and Computer Technology Center, National Science and Technology Development Agency, Ministry of Science Technology and Environment, Thai Royal Government. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --- end of LICENSE --- ------------------------------------------------------------------------------- %% This notice is provided with respect to Unicode 6.0.0, CLDR v1.4.1, & CLDR v1.9, which is included with JRE 7, JDK 7, and OpenJDK 7. --- begin of LICENSE --- Unicode Terms of Use For the general privacy policy governing access to this site, see the Unicode Privacy Policy. For trademark usage, see the Unicode® Consortium Name and Trademark Usage Policy. A. Unicode Copyright. 1. Copyright © 1991-2011 Unicode, Inc. All rights reserved. 2. Certain documents and files on this website contain a legend indicating that "Modification is permitted." Any person is hereby authorized, without fee, to modify such documents and files to create derivative works conforming to the Unicode® Standard, subject to Terms and Conditions herein. 3. Any person is hereby authorized, without fee, to view, use, reproduce, and distribute all documents and files solely for informational purposes in the creation of products supporting the Unicode Standard, subject to the Terms and Conditions herein. 4. Further specifications of rights and restrictions pertaining to the use of the particular set of data files known as the "Unicode Character Database" can be found in Exhibit 1. 5. Each version of the Unicode Standard has further specifications of rights and restrictions of use. For the book editions (Unicode 5.0 and earlier), these are found on the back of the title page. The online code charts carry specific restrictions. All other files, including online documentation of the core specification for Unicode 6.0 and later, are covered under these general Terms of Use. 6. No license is granted to "mirror" the Unicode website where a fee is charged for access to the "mirror" site. 7. Modification is not permitted with respect to this document. All copies of this document must be verbatim. B. Restricted Rights Legend. Any technical data or software which is licensed to the United States of America, its agencies and/or instrumentalities under this Agreement is commercial technical data or commercial computer software developed exclusively at private expense as defined in FAR 2.101, or DFARS 252.227-7014 (June 1995), as applicable. For technical data, use, duplication, or disclosure by the Government is subject to restrictions as set forth in DFARS 202.227-7015 Technical Data, Commercial and Items (Nov 1995) and this Agreement. For Software, in accordance with FAR 12-212 or DFARS 227-7202, as applicable, use, duplication or disclosure by the Government is subject to the restrictions set forth in this Agreement. C. Warranties and Disclaimers. 1. This publication and/or website may include technical or typographical errors or other inaccuracies . Changes are periodically added to the information herein; these changes will be incorporated in new editions of the publication and/or website. Unicode may make improvements and/or changes in the product(s) and/or program(s) described in this publication and/or website at any time. 2. If this file has been purchased on magnetic or optical media from Unicode, Inc. the sole and exclusive remedy for any claim will be exchange of the defective media within ninety (90) days of original purchase. 3. EXCEPT AS PROVIDED IN SECTION C.2, THIS PUBLICATION AND/OR SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND EITHER EXPRESS, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. UNICODE AND ITS LICENSORS ASSUME NO RESPONSIBILITY FOR ERRORS OR OMISSIONS IN THIS PUBLICATION AND/OR SOFTWARE OR OTHER DOCUMENTS WHICH ARE REFERENCED BY OR LINKED TO THIS PUBLICATION OR THE UNICODE WEBSITE. D. Waiver of Damages. In no event shall Unicode or its licensors be liable for any special, incidental, indirect or consequential damages of any kind, or any damages whatsoever, whether or not Unicode was advised of the possibility of the damage, including, without limitation, those resulting from the following: loss of use, data or profits, in connection with the use, modification or distribution of this information or its derivatives. E.Trademarks & Logos. 1. The Unicode Word Mark and the Unicode Logo are trademarks of Unicode, Inc. “The Unicode Consortium†and “Unicode, Inc.†are trade names of Unicode, Inc. Use of the information and materials found on this website indicates your acknowledgement of Unicode, Inc.’s exclusive worldwide rights in the Unicode Word Mark, the Unicode Logo, and the Unicode trade names. 2. The Unicode Consortium Name and Trademark Usage Policy (“Trademark Policyâ€) are incorporated herein by reference and you agree to abide by the provisions of the Trademark Policy, which may be changed from time to time in the sole discretion of Unicode, Inc. 3. All third party trademarks referenced herein are the property of their respective owners. Miscellaneous. 1. Jurisdiction and Venue. This server is operated from a location in the State of California, United States of America. Unicode makes no representation that the materials are appropriate for use in other locations. If you access this server from other locations, you are responsible for compliance with local laws. This Agreement, all use of this site and any claims and damages resulting from use of this site are governed solely by the laws of the State of California without regard to any principles which would apply the laws of a different jurisdiction. The user agrees that any disputes regarding this site shall be resolved solely in the courts located in Santa Clara County, California. The user agrees said courts have personal jurisdiction and agree to waive any right to transfer the dispute to any other forum. 2. Modification by Unicode. Unicode shall have the right to modify this Agreement at any time by posting it to this site. The user may not assign any part of this Agreement without Unicode’s prior written consent. 3. Taxes. The user agrees to pay any taxes arising from access to this website or use of the information herein, except for those based on Unicode’s net income. 4. Severability. If any provision of this Agreement is declared invalid or unenforceable, the remaining provisions of this Agreement shall remain in effect. 5. Entire Agreement. This Agreement constitutes the entire agreement between the parties. EXHIBIT 1 UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE Unicode Data Files include all data files under the directories http://www.unicode.org/Public/, http://www.unicode.org/reports/, and http://www.unicode.org/cldr/data/. Unicode Data Files do not include PDF online code charts under the directory http://www.unicode.org/Public/. Software includes any source code published in the Unicode Standard or under the directories http://www.unicode.org/Public/, http://www.unicode.org/reports/, and http://www.unicode.org/cldr/data/. NOTICE TO USER: Carefully read the following legal agreement. BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S DATA FILES ("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"), YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES OR SOFTWARE. COPYRIGHT AND PERMISSION NOTICE Copyright © 1991-2011 Unicode, Inc. All rights reserved. Distributed under the Terms of Use in http://www.unicode.org/copyright.html. Permission is hereby granted, free of charge, to any person obtaining a copy of the Unicode data files and any associated documentation (the "Data Files") or Unicode software and any associated documentation (the "Software") to deal in the Data Files or Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, and/or sell copies of the Data Files or Software, and to permit persons to whom the Data Files or Software are furnished to do so, provided that (a) the above copyright notice(s) and this permission notice appear with all copies of the Data Files or Software, (b) both the above copyright notice(s) and this permission notice appear in associated documentation, and (c) there is clear notice in each modified Data File or in the Software as well as in the documentation associated with the Data File(s) or Software that the data or software has been modified. THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA FILES OR SOFTWARE. Except as contained in this notice, the name of a copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in these Data Files or Software without prior written authorization of the copyright holder. Unicode and the Unicode logo are trademarks of Unicode, Inc. in the United States and other countries. All third party trademarks referenced herein are the property of their respective owners. --- end of LICENSE --- ------------------------------------------------------------------------------- %% This notice is provided with respect to UPX v3.01, which is included with JRE 7 on Windows. --- begin of LICENSE --- Use of any of this software is governed by the terms of the license below: ooooo ooo ooooooooo. ooooooo ooooo `888' `8' `888 `Y88. `8888 d8' 888 8 888 .d88' Y888..8P 888 8 888ooo88P' `8888' 888 8 888 .8PY888. `88. .8' 888 d8' `888b `YbodP' o888o o888o o88888o The Ultimate Packer for eXecutables Copyright (c) 1996-2000 Markus Oberhumer & Laszlo Molnar http://wildsau.idv.uni-linz.ac.at/mfx/upx.html http://www.nexus.hu/upx http://upx.tsx.org PLEASE CAREFULLY READ THIS LICENSE AGREEMENT, ESPECIALLY IF YOU PLAN TO MODIFY THE UPX SOURCE CODE OR USE A MODIFIED UPX VERSION. ABSTRACT ======== UPX and UCL are copyrighted software distributed under the terms of the GNU General Public License (hereinafter the "GPL"). The stub which is imbedded in each UPX compressed program is part of UPX and UCL, and contains code that is under our copyright. The terms of the GNU General Public License still apply as compressing a program is a special form of linking with our stub. As a special exception we grant the free usage of UPX for all executables, including commercial programs. See below for details and restrictions. COPYRIGHT ========= UPX and UCL are copyrighted software. All rights remain with the authors. UPX is Copyright (C) 1996-2000 Markus Franz Xaver Johannes Oberhumer UPX is Copyright (C) 1996-2000 Laszlo Molnar UCL is Copyright (C) 1996-2000 Markus Franz Xaver Johannes Oberhumer GNU GENERAL PUBLIC LICENSE ========================== UPX and the UCL library are free software; you can redistribute them and/or modify them under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. UPX and UCL are distributed in the hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; see the file COPYING. SPECIAL EXCEPTION FOR COMPRESSED EXECUTABLES ============================================ The stub which is imbedded in each UPX compressed program is part of UPX and UCL, and contains code that is under our copyright. The terms of the GNU General Public License still apply as compressing a program is a special form of linking with our stub. Hereby Markus F.X.J. Oberhumer and Laszlo Molnar grant you special permission to freely use and distribute all UPX compressed programs (including commercial ones), subject to the following restrictions: 1. You must compress your program with a completely unmodified UPX version; either with our precompiled version, or (at your option) with a self compiled version of the unmodified UPX sources as distributed by us. 2. This also implies that the UPX stub must be completely unmodfied, i.e. the stub imbedded in your compressed program must be byte-identical to the stub that is produced by the official unmodified UPX version. 3. The decompressor and any other code from the stub must exclusively get used by the unmodified UPX stub for decompressing your program at program startup. No portion of the stub may get read, copied, called or otherwise get used or accessed by your program. ANNOTATIONS =========== - You can use a modified UPX version or modified UPX stub only for programs that are compatible with the GNU General Public License. - We grant you special permission to freely use and distribute all UPX compressed programs. But any modification of the UPX stub (such as, but not limited to, removing our copyright string or making your program non-decompressible) will immediately revoke your right to use and distribute a UPX compressed program. - UPX is not a software protection tool; by requiring that you use the unmodified UPX version for your proprietary programs we make sure that any user can decompress your program. This protects both you and your users as nobody can hide malicious code - any program that cannot be decompressed is highly suspicious by definition. - You can integrate all or part of UPX and UCL into projects that are compatible with the GNU GPL, but obviously you cannot grant any special exceptions beyond the GPL for our code in your project. - We want to actively support manufacturers of virus scanners and similar security software. Please contact us if you would like to incorporate parts of UPX or UCL into such a product. Markus F.X.J. Oberhumer Laszlo Molnar markus.oberhumer@jk.uni-linz.ac.at ml1050@cdata.tvnet.hu Linz, Austria, 25 Feb 2000 Additional License(s) The UPX license file is at http://upx.sourceforge.net/upx-license.html. --- end of LICENSE --- ------------------------------------------------------------------------------- %% This notice is provided with respect to Xfree86-VidMode Extension 1.0, which is included with JRE 7, JDK 7, and OpenJDK 7 on Linux and Solaris. --- begin of LICENSE --- Version 1.1 of XFree86 ProjectLicence. Copyright (C) 1994-2004 The XFree86 Project, Inc. All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicence, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,subject to the following conditions: 1. Redistributions of source code must retain the above copyright notice,this list of conditions, and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution, and in the same place and form as other copyright, license and disclaimer information. 3. The end-user documentation included with the redistribution, if any,must include the following acknowledgment: "This product includes software developed by The XFree86 Project, Inc (http://www.xfree86.org/) and its contributors", in the same place and form as other third-party acknowledgments. Alternately, this acknowledgment may appear in the software itself, in the same form and location as other such third-party acknowledgments. 4. Except as contained in this notice, the name of The XFree86 Project,Inc shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The XFree86 Project, Inc. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE XFREE86 PROJECT, INC OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --- end of LICENSE --- ------------------------------------------------------------------------------- %% This notice is provided with respect to X Window System 6.8.2, which is included with JRE 7, JDK 7, and OpenJDK 7 on Linux and Solaris. --- begin of LICENSE --- Licenses The X.Org Foundation March 2004 1. Introduction The X.org Foundation X Window System distribution is a compilation of code and documentation from many sources. This document is intended primarily as a guide to the licenses used in the distribution: you must check each file and/or package for precise redistribution terms. None-the-less, this summary may be useful to many users. No software incorporating the XFree86 1.1 license has been incorporated. This document is based on the compilation from XFree86. 2. XFree86 License XFree86 code without an explicit copyright is covered by the following copyright/license: Copyright (C) 1994-2003 The XFree86 Project, Inc. All Rights Reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of the XFree86 Project shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the XFree86 Project. 3. Other Licenses Portions of code are covered by the following licenses/copyrights. See individual files for the copyright dates. 3.1. X/MIT Copyrights 3.1.1. X Consortium Copyright (C) X Consortium Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of the X Consortium shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the X Consortium. X Window System is a trademark of X Consortium, Inc. 3.1.2. The Open Group Copyright The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. 3.2. Berkeley-based copyrights: o 3.2.1. General Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 3.2.2. UCB/LBL Copyright (c) 1993 The Regents of the University of California. All rights reserved. This software was developed by the Computer Systems Engineering group at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and contributed to Berkeley. All advertising materials mentioning features or use of this software must display the following acknowledgement: This product includes software developed by the University of California, Lawrence Berkeley Laboratory. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. All advertising materials mentioning features or use of this software must display the following acknowledgement: This product includes software developed by the University of California, Berkeley and its contributors. 4. Neither the name of the University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 3.2.3. The NetBSD Foundation, Inc. Copyright (c) 2003 The NetBSD Foundation, Inc. All rights reserved. This code is derived from software contributed to The NetBSD Foundation by Ben Collver Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. All advertising materials mentioning features or use of this software must display the following acknowledgement: This product includes software developed by the NetBSD Foundation, Inc. and its contributors. 4. Neither the name of The NetBSD Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 3.2.4. Theodore Ts'o. Copyright Theodore Ts'o, 1994, 1995, 1996, 1997, 1998, 1999. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, and the entire permission notice in its entirety, including the disclaimer of warranties. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. he name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 3.2.5. Theo de Raadt and Damien Miller Copyright (c) 1995,1999 Theo de Raadt. All rights reserved. Copyright (c) 2001-2002 Damien Miller. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 3.2.6. Todd C. Miller Copyright (c) 1998 Todd C. Miller Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND TODD C. MILLER DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL TODD C. MILLER BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 3.2.7. Thomas Winischhofer Copyright (C) 2001-2004 Thomas Winischhofer Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 3.3. NVIDIA Corp Copyright (c) 1996 NVIDIA, Corp. All rights reserved. NOTICE TO USER: The source code is copyrighted under U.S. and international laws. NVIDIA, Corp. of Sunnyvale, California owns the copyright and as design patents pending on the design and interface of the NV chips. Users and possessors of this source code are hereby granted a nonexclusive, royalty-free copyright and design patent license to use this code in individual and commercial software. Any use of this source code must include, in the user documentation and internal comments to the code, notices to the end user as follows: Copyright (c) 1996 NVIDIA, Corp. NVIDIA design patents pending in the U.S. and foreign countries. NVIDIA, CORP. MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOURCE CODE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND. NVIDIA, CORP. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOURCE CODE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA, CORP. BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE CODE. 3.4. GLX Public License GLX PUBLIC LICENSE (Version 1.0 (2/11/99)) ("License") Subject to any third party claims, Silicon Graphics, Inc. ("SGI") hereby grants permission to Recipient (defined below), under Recipient's copyrights in the Original Software (defined below), to use, copy, modify, merge, publish, distribute, sublicense and/or sell copies of Subject Software (defined below), and to permit persons to whom the Subject Software is furnished in accordance with this License to do the same, subject to all of the following terms and conditions, which Recipient accepts by engaging in any such use, copying, modifying, merging, publishing, distributing, sublicensing or selling: 1. Definitions. (a) "Original Software" means source code of computer software code which is described in Exhibit A as Original Software. (b) "Modifications" means any addition to or deletion from the substance or structure of either the Original Software or any previous Modifications. When Subject Software is released as a series of files, a Modification means (i) any addition to or deletion from the contents of a file containing Original Software or previous Modifications and (ii) any new file that contains any part of the Original Code or previous Modifications. (c) "Subject Software" means the Original Software or Modifications or the combination of the Original Software and Modifications, or portions of any of the foregoing. (d) "Recipient" means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "Recipient" includes any entity which controls, is controlled by, or is under common control with Recipient. For purposes of this definition, "control" of an entity means (a) the power, direct or indirect, to direct or manage such entity, or (b) ownership of fifty percent (50%) or more of the outstanding shares or beneficial ownership of such entity. 2. Redistribution of Source Code Subject to These Terms. Redistributions of Subject Software in source code form must retain the notice set forth in Exhibit A, below, in every file. A copy of this License must be included in any documentation for such Subject Software where the recipients' rights relating to Subject Software are described. Recipient may distribute the source code version of Subject Software under a license of Recipient's choice, which may contain terms different from this License, provided that (i) Recipient is in compliance with the terms of this License, and (ii) the license terms include this Section 2 and Sections 3, 4, 7, 8, 10, 12 and 13 of this License, which terms may not be modified or superseded by any other terms of such license. If Recipient distributes the source code version under a different license Recipient must make it absolutely clear that any terms which differ from this License are offered by Recipient alone, not by SGI. Recipient hereby agrees to indemnify SGI for any liability incurred by SGI as a result of any such terms Recipient offers. 3. Redistribution in Executable Form. The notice set forth in Exhibit A must be conspicuously included in any notice in an executable version of Subject Software, related documentation or collateral in which Recipient describes the user's rights relating to the Subject Software. Recipient may distribute the executable version of Subject Software under a license of Recipient's choice, which may contain terms different from this License, provided that (i) Recipient is in compliance with the terms of this License, and (ii) the license terms include this Section 3 and Sections 4, 7, 8, 10, 12 and 13 of this License, which terms may not be modified or superseded by any other terms of such license. If Recipient distributes the executable version under a different license Recipient must make it absolutely clear that any terms which differ from this License are offered by Recipient alone, not by SGI. Recipient hereby agrees to indemnify SGI for any liability incurred by SGI as a result of any such terms Recipient offers. 4. Termination. This License and the rights granted hereunder will terminate automatically if Recipient fails to comply with terms herein and fails to cure such breach within 30 days of the breach. Any sublicense to the Subject Software which is properly granted shall survive any termination of this License absent termination by the terms of such sublicense. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive. 5. No Trademark Rights. This License does not grant any rights to use any trade name, trademark or service mark whatsoever. No trade name, trademark or service mark of SGI may be used to endorse or promote products derived from the Subject Software without prior written permission of SGI. 6. No Other Rights. This License does not grant any rights with respect to the OpenGL API or to any software or hardware implementation thereof or to any other software whatsoever, nor shall any other rights or licenses not expressly granted hereunder arise by implication, estoppel or otherwise with respect to the Subject Software. Title to and ownership of the Original Software at all times remains with SGI. All rights in the Original Software not expressly granted under this License are reserved. 7. Compliance with Laws; Non-Infringement. Recipient shall comply with all applicable laws and regulations in connection with use and distribution of the Subject Software, including but not limited to, all export and import control laws and regulations of the U.S. government and other countries. Recipient may not distribute Subject Software that (i) in any way infringes (directly or contributorily) the rights (including patent, copyright, trade secret, trademark or other intellectual property rights of any kind) of any other person or entity or (ii) breaches any representation or warranty, express, implied or statutory, which under any applicable law it might be deemed to have been distributed. 8. Claims of Infringement. If Recipient at any time has knowledge of any one or more third party claims that reproduction, modification, use, distribution, import or sale of Subject Software (including particular functionality or code incorporated in Subject Software) infringes the third party's intellectual property rights, Recipient must place in a well-identified web page bearing the title "LEGAL" a description of each such claim and a description of the party making each such claim in sufficient detail that a user of the Subject Software will know whom to contact regarding the claim. Also, upon gaining such knowledge of any such claim, Recipient must conspicuously include the URL for such web page in the Exhibit A notice required under Sections 2 and 3, above, and in the text of any related documentation, license agreement or collateral in which Recipient describes end user's rights relating to the Subject Software. If Recipient obtains such knowledge after it makes Subject Software available to any other person or entity, Recipient shall take other steps (such as notifying appropriate mailing lists or newsgroups) reasonably calculated to inform those who received the Subject Software that new knowledge has been obtained. 9. DISCLAIMER OF WARRANTY. SUBJECT SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE SUBJECT SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON- INFRINGING. SGI ASSUMES NO RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE. SHOULD ANY SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, SGI ASSUMES NO COST OR LIABILITY FOR ANY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY SUBJECT SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. 10. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE OR STRICT LIABILITY), CONTRACT, OR OTHERWISE, SHALL SGI OR ANY SGI LICENSOR BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, LOSS OF DATA, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SGI's NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THAT EXCLUSION AND LIMITATION MAY NOT APPLY TO RECIPIENT. 11. Indemnity. Recipient shall be solely responsible for damages arising, directly or indirectly, out of its utilization of rights under this License. Recipient will defend, indemnify and hold harmless Silicon Graphics, Inc. from and against any loss, liability, damages, costs or expenses (including the payment of reasonable attorneys fees) arising out of Recipient's use, modification, reproduction and distribution of the Subject Software or out of any representation or warranty made by Recipient. 12. U.S. Government End Users. The Subject Software is a "commercial item" consisting of "commercial computer software" as such terms are defined in title 48 of the Code of Federal Regulations and all U.S. Government End Users acquire only the rights set forth in this License and are subject to the terms of this License. 13. Miscellaneous. This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed so as to achieve as nearly as possible the same economic effect as the original provision and the remainder of this License will remain in effect. This License shall be governed by and construed in accordance with the laws of the United States and the State of California as applied to agreements entered into and to be performed entirely within California between California residents. Any litigation relating to this License shall be subject to the exclusive jurisdiction of the Federal Courts of the Northern District of California (or, absent subject matter jurisdiction in such courts, the courts of the State of California), with venue lying exclusively in Santa Clara County, California, with the losing party responsible for costs, including without limitation, court costs and reasonable attorneys fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. Exhibit A The contents of this file are subject to Sections 2, 3, 4, 7, 8, 10, 12 and 13 of the GLX Public License Version 1.0 (the "License"). You may not use this file except in compliance with those sections of the License. You may obtain a copy of the License at Silicon Graphics, Inc., attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 or at http://www.sgi.com/software/opensource/glx/license.html. Software distributed under the License is distributed on an "AS IS" basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific language governing rights and limitations under the License. The Original Software is GLX version 1.2 source code, released February, 1999. The developer of the Original Software is Silicon Graphics, Inc. Those portions of the Subject Software created by Silicon Graphics, Inc. are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. 3.5. CID Font Code Public License CID FONT CODE PUBLIC LICENSE (Version 1.0 (3/31/99))("License") Subject to any applicable third party claims, Silicon Graphics, Inc. ("SGI") hereby grants permission to Recipient (defined below), under SGI's copyrights in the Original Software (defined below), to use, copy, modify, merge, publish, distribute, sublicense and/or sell copies of Subject Software (defined below) in both source code and executable form, and to permit persons to whom the Subject Software is furnished in accordance with this License to do the same, subject to all of the following terms and conditions, which Recipient accepts by engaging in any such use, copying, modifying, merging, publication, distributing, sublicensing or selling: 1. Definitions. a. "Original Software" means source code of computer software code that is described in Exhibit A as Original Software. b. "Modifications" means any addition to or deletion from the substance or structure of either the Original Software or any previous Modifications. When Subject Software is released as a series of files, a Modification means (i) any addition to or deletion from the contents of a file containing Original Software or previous Modifications and (ii) any new file that contains any part of the Original Code or previous Modifications. c. "Subject Software" means the Original Software or Modifications or the combination of the Original Software and Modifications, or portions of any of the foregoing. d. "Recipient" means an individual or a legal entity exercising rights under the terms of this License. For legal entities, "Recipient" includes any entity that controls, is controlled by, or is under common control with Recipient. For purposes of this definition, "control" of an entity means (i) the power, direct or indirect, to direct or manage such entity, or (ii) ownership of fifty percent (50%) or more of the outstanding shares or beneficial ownership of such entity. e. "Required Notice" means the notice set forth in Exhibit A to this License. f. "Accompanying Technology" means any software or other technology that is not a Modification and that is distributed or made publicly available by Recipient with the Subject Software. Separate software files that do not contain any Original Software or any previous Modification shall not be deemed a Modification, even if such software files are aggregated as part of a product, or in any medium of storage, with any file that does contain Original Software or any previous Modification. 2. License Terms. All distribution of the Subject Software must be made subject to the terms of this License. A copy of this License and the Required Notice must be included in any documentation for Subject Software where Recipient's rights relating to Subject Software and/or any Accompanying Technology are described. Distributions of Subject Software in source code form must also include the Required Notice in every file distributed. In addition, a ReadMe file entitled "Important Legal Notice" must be distributed with each distribution of one or more files that incorporate Subject Software. That file must be included with distributions made in both source code and executable form. A copy of the License and the Required Notice must be included in that file. Recipient may distribute Accompanying Technology under a license of Recipient's choice, which may contain terms different from this License, provided that (i) Recipient is in compliance with the terms of this License, (ii) such other license terms do not modify or supersede the terms of this License as applicable to the Subject Software, (iii) Recipient hereby indemnifies SGI for any liability incurred by SGI as a result of the distribution of Accompanying Technology or the use of other license terms. 3. Termination. This License and the rights granted hereunder will terminate automatically if Recipient fails to comply with terms herein and fails to cure such breach within 30 days of the breach. Any sublicense to the Subject Software that is properly granted shall survive any termination of this License absent termination by the terms of such sublicense. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive. 4. Trademark Rights. This License does not grant any rights to use any trade name, trademark or service mark whatsoever. No trade name, trademark or service mark of SGI may be used to endorse or promote products derived from or incorporating any Subject Software without prior written permission of SGI. 5. No Other Rights. No rights or licenses not expressly granted hereunder shall arise by implication, estoppel or otherwise. Title to and ownership of the Original Software at all times remains with SGI. All rights in the Original Software not expressly granted under this License are reserved. 6. Compliance with Laws; Non-Infringement. Recipient shall comply with all applicable laws and regulations in connection with use and distribution of the Subject Software, including but not limited to, all export and import control laws and regulations of the U.S. government and other countries. Recipient may not distribute Subject Software that (i) in any way infringes (directly or contributorily) the rights (including patent, copyright, trade secret, trademark or other intellectual property rights of any kind) of any other person or entity, or (ii) breaches any representation or warranty, express, implied or statutory, which under any applicable law it might be deemed to have been distributed. 7. Claims of Infringement. If Recipient at any time has knowledge of any one or more third party claims that reproduction, modification, use, distribution, import or sale of Subject Software (including particular functionality or code incorporated in Subject Software) infringes the third party's intellectual property rights, Recipient must place in a well-identified web page bearing the title "LEGAL" a description of each such claim and a description of the party making each such claim in sufficient detail that a user of the Subject Software will know whom to contact regarding the claim. Also, upon gaining such knowledge of any such claim, Recipient must conspicuously include the URL for such web page in the Required Notice, and in the text of any related documentation, license agreement or collateral in which Recipient describes end user's rights relating to the Subject Software. If Recipient obtains such knowledge after it makes Subject Software available to any other person or entity, Recipient shall take other steps (such as notifying appropriate mailing lists or newsgroups) reasonably calculated to provide such knowledge to those who received the Subject Software. 8. DISCLAIMER OF WARRANTY. SUBJECT SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE SUBJECT SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. SGI ASSUMES NO RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE. SHOULD ANY SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, SGI ASSUMES NO COST OR LIABILITY FOR ANY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY SUBJECT SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. 9. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE OR STRICT LIABILITY), CONTRACT, OR OTHERWISE, SHALL SGI OR ANY SGI LICENSOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SUBJECT SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SUBJECT SOFTWARE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF CERTAIN DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO RECIPIENT TO THE EXTENT SO DISALLOWED. 10. Indemnity. Recipient shall be solely responsible for damages arising, directly or indirectly, out of its utilization of rights under this License. Recipient will defend, indemnify and hold SGI and its successors and assigns harmless from and against any loss, liability, damages, costs or expenses (including the payment of reasonable attorneys fees) arising out of (Recipient's use, modification, reproduction and distribution of the Subject Software or out of any representation or warranty made by Recipient. 11. U.S. Government End Users. The Subject Software is a "commercial item" consisting of "commercial computer software" as such terms are defined in title 48 of the Code of Federal Regulations and all U.S. Government End Users acquire only the rights set forth in this License and are subject to the terms of this License. 12. Miscellaneous. This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable by any judicial or administrative authority having proper jurisdiction with respect thereto, such provision shall be reformed so as to achieve as nearly as possible the same economic effect as the original provision and the remainder of this License will remain in effect. This License shall be governed by and construed in accordance with the laws of the United States and the State of California as applied to agreements entered into and to be performed entirely within California between California residents. Any litigation relating to this License shall be subject to the exclusive jurisdiction of the Federal Courts of the Northern District of California (or, absent subject matter jurisdiction in such courts, the courts of the State of California), with venue lying exclusively in Santa Clara County, California, with the losing party responsible for costs, including without limitation, court costs and reasonable attorneys fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation that provides that the language of a contract shall be construed against the drafter shall not apply to this License. Exhibit A Copyright (c) 1994-1999 Silicon Graphics, Inc. The contents of this file are subject to the CID Font Code Public License Version 1.0 (the "License"). You may not use this file except in compliance with the License. You may obtain a copy of the License at Silicon Graphics, Inc., attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 or at http://www.sgi.com/software/opensource/cid/license.html Software distributed under the License is distributed on an "AS IS" basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR PURPOSE OR OF NON-INFRINGEMENT. See the License for the specific language governing rights and limitations under the License. The Original Software (as defined in the License) is CID font code that was developed by Silicon Graphics, Inc. Those portions of the Subject Software (as defined in the License) that were created by Silicon Graphics, Inc. are Copyright (c) 1994-1999 Silicon Graphics, Inc. All Rights Reserved. [NOTE: When using this text in connection with Subject Software delivered solely in object code form, Recipient may replace the words "this file" with "this software" in both the first and second sentences.] 3.6. Bitstream Vera Fonts Copyright The fonts have a generous copyright, allowing derivative works (as long as "Bitstream" or "Vera" are not in the names), and full redistribution (so long as they are not *sold* by themselves). They can be be bundled, redistributed and sold with any software. The fonts are distributed under the following copyright: Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera is a trademark of Bitstream, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of the fonts accompanying this license ("Fonts") and associated documentation files (the "Font Software"), to reproduce and distribute the Font Software, including without limitation the rights to use, copy, merge, publish, distribute, and/or sell copies of the Font Software, and to permit persons to whom the Font Software is furnished to do so, subject to the following conditions: The above copyright and trademark notices and this permission notice shall be included in all copies of one or more of the Font Software typefaces. The Font Software may be modified, altered, or added to, and in particular the designs of glyphs or characters in the Fonts may be modified and additional glyphs or characters may be added to the Fonts, only if the fonts are renamed to names not containing either the words "Bitstream" or the word "Vera". This License becomes null and void to the extent applicable to Fonts or Font Software that has been modified and is distributed under the "Bitstream Vera" names. The Font Software may be sold as part of a larger software package but no copy of one or more of the Font Software typefaces may be sold by itself. THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. Except as contained in this notice, the names of Gnome, the Gnome Foundation, and Bitstream Inc., shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Font Software without prior written authorization from the Gnome Foundation or Bitstream Inc., respectively. For further information, contact: fonts at gnome dot org. 3.7. Bigelow & Holmes Inc and URW++ GmbH Luxi font license Luxi fonts copyright (c) 2001 by Bigelow & Holmes Inc. Luxi font instruction code copyright (c) 2001 by URW++ GmbH. All Rights Reserved. Luxi is a registered trademark of Bigelow & Holmes Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of these Fonts and associated documentation files (the "Font Software"), to deal in the Font Software, including without limitation the rights to use, copy, merge, publish, distribute, sublicense, and/or sell copies of the Font Software, and to permit persons to whom the Font Software is furnished to do so, subject to the following conditions: The above copyright and trademark notices and this permission notice shall be included in all copies of one or more of the Font Software. The Font Software may not be modified, altered, or added to, and in particular the designs of glyphs or characters in the Fonts may not be modified nor may additional glyphs or characters be added to the Fonts. This License becomes null and void when the Fonts or Font Software have been modified. THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BIGELOW & HOLMES INC. OR URW++ GMBH. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. Except as contained in this notice, the names of Bigelow & Holmes Inc. and URW++ GmbH. shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Font Software without prior written authorization from Bigelow & Holmes Inc. and URW++ GmbH. For further information, contact: info@urwpp.de or design@bigelowandholmes.com --- end of LICENSE --- ------------------------------------------------------------------------------- %% This notice is provided with respect to zlib v1.2.3, which is included with JRE 7, JDK 7, and OpenJDK 7 --- begin of LICENSE --- version 1.2.3, July 18th, 2005 Copyright (C) 1995-2005 Jean-loup Gailly and Mark Adler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. Jean-loup Gailly Mark Adler jloup@gzip.org madler@alumni.caltech.edu --- end of LICENSE --- ------------------------------------------------------------------------------- %% This notice is provided with respect to the following which is included with JRE 7, JDK 7, and OpenJDK 7, except where noted: Apache Derby 10.8.1.2 [included with JDK 7 only] Apache Jakarta BCEL 5.2 Apache Jakarta Regexp 1.4 Apache Santuario XMLSec-Java 1.4.2 Apache Xalan-Java 2.7.1 Apache Xerces2 Java 2.10.0 Apache XML Resolver 1.1 --- begin of LICENSE --- Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --- end of LICENSE --- ------------------------------------------------------------------------------- libnb-javaparser-java_7.4.orig/make/Makefile0000644000000000000000000001422612214026367017261 0ustar 00000000000000# # Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License version 2 only, as # published by the Free Software Foundation. Oracle designates this # particular file as subject to the "Classpath" exception as provided # by Oracle in the LICENSE file that accompanied this code. # # This code is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # version 2 for more details (a copy is included in the LICENSE file that # accompanied this code). # # You should have received a copy of the GNU General Public License version # 2 along with this work; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. # # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA # or visit www.oracle.com if you need additional information or have any # questions. # # Makefile for langtools: wrapper around Ant build.xml file # # On Solaris, the standard 'make' utility will not work with these makefiles. # This little rule is only understood by Solaris make, and is harmless # when seen by the GNU make tool. If using Solaris make, this causes the # make command to fail. # SUN_MAKE_TEST:sh = @echo "ERROR: PLEASE USE GNU VERSION OF MAKE"; exit 33 # # Minimal platform defs # Need FullPath because we can't rely on gnumake abspath, until we use v3.81 # SYSTEM_UNAME := $(shell uname) # Where is unwanted output to be delivered? # On Windows, MKS uses the special file "NUL", cygwin uses the customary unix file. ifeq ($(SYSTEM_UNAME), Windows_NT) DEV_NULL = NUL else DEV_NULL = /dev/null endif ifneq (,$(findstring CYGWIN,$(SYSTEM_UNAME))) USING_CYGWIN = true endif ifdef USING_CYGWIN define FullPath $(shell cygpath -a -s -m $1 2> $(DEV_NULL)) endef else define FullPath $(shell cd $1 2> $(DEV_NULL) && pwd) endef endif # # Makefile args # ifdef QUIET ANT_OPTIONS += -quiet endif ifdef VERBOSE ANT_OPTIONS += -verbose -debug endif ifdef JDK_VERSION ANT_OPTIONS += -Djdk.version=$(JDK_VERSION) endif ifdef FULL_VERSION ANT_OPTIONS += -Dfull.version='$(FULL_VERSION)' # will contain spaces endif ifdef MILESTONE ifneq ($(MILESTONE),fcs) ANT_OPTIONS += -Dmilestone=$(MILESTONE) else ANT_OPTIONS += -Drelease=$(JDK_VERSION) endif endif ifdef BUILD_NUMBER ANT_OPTIONS += -Dbuild.number=$(BUILD_NUMBER) else ifdef JDK_BUILD_NUMBER ANT_OPTIONS += -Dbuild.number=$(JDK_BUILD_NUMBER) endif endif ifeq ($(VARIANT), DBG) ANT_OPTIONS += -Djavac.debug=true else ifeq ($(VARIANT), OPT) ANT_OPTIONS += -Djavac.debug=false endif endif ifeq ($(DEBUG_CLASSFILES), true) ANT_OPTIONS += -Djavac.debug=true ANT_OPTIONS += -Ddebug.classfiles=true endif # Note: jdk/make/common/Defs.gmk uses LANGUAGE_VERSION (-source NN) # and the somewhat misnamed CLASS_VERSION (-target NN) ifdef TARGET_CLASS_VERSION ANT_OPTIONS += -Djavac.target=$(TARGET_CLASS_VERSION) else ifdef JAVAC_TARGET_ARG ANT_OPTIONS += -Djavac.target=$(JAVAC_TARGET_ARG) endif endif ifdef SOURCE_LANGUAGE_VERSION ANT_OPTIONS += -Djavac.source=$(SOURCE_LANGUAGE_VERSION) else ifdef JAVAC_SOURCE_ARG ANT_OPTIONS += -Djavac.source=$(JAVAC_SOURCE_ARG) endif endif ifdef ALT_BOOTDIR ANT_OPTIONS += -Dboot.java.home=$(ALT_BOOTDIR) ANT_JAVA_HOME = JAVA_HOME=$(ALT_BOOTDIR) endif # To facilitate bootstrapping, much of langtools can be compiled with (just) # a boot JDK. However, some source files need to be compiled against # new JDK API. In a bootstrap build, an import JDK may not be available, # so build.xml can also build against the source files in a jdk repo, # in which case it will automatically generate stub files for the new JDK API. ifdef JDK_TOPDIR ANT_OPTIONS += -Dimport.jdk=$(JDK_TOPDIR) else ifdef ALT_JDK_TOPDIR ANT_OPTIONS += -Dimport.jdk=$(ALT_JDK_TOPDIR) else ifdef ALT_JDK_IMPORT_PATH ANT_OPTIONS += -Dimport.jdk=$(ALT_JDK_IMPORT_PATH) endif endif endif ifdef ALT_OUTPUTDIR OUTPUTDIR = $(ALT_OUTPUTDIR) ANT_OPTIONS += -Dbuild.dir=$(ALT_OUTPUTDIR)/build ANT_OPTIONS += -Ddist.dir=$(ALT_OUTPUTDIR)/dist else OUTPUTDIR = .. endif #ABS_OUTPUTDIR = $(abspath $(OUTPUTDIR)) ABS_OUTPUTDIR = $(call FullPath,$(OUTPUTDIR)) ANT_TMPDIR = $(ABS_OUTPUTDIR)/build/ant-tmp ANT_OPTS = ANT_OPTS=-Djava.io.tmpdir='$(ANT_TMPDIR)' ifdef FINDBUGS_HOME ANT_OPTIONS += -Dfindbugs.home=$(FINDBUGS_HOME) endif ifdef ANT_HOME ANT = $(ANT_HOME)/bin/ant ifneq ($(shell test -x $(ANT) && echo OK), OK) $(error $(ANT) not found -- please update ANT_HOME) endif else ANT = ant ifneq ($(shell test -x "`which $(ANT)`" && echo OK), OK) $(error 'ant' not found -- please set ANT_HOME or put 'ant' on your PATH) endif endif # Default target and expected 'do everything' target all: build # Standard make clobber target clobber: clean # All ant targets of interest ANT_TARGETS = build clean sanity post-sanity diagnostics build-all-tools # for now # Create diagnostics log (careful, ant 1.8.0 -diagnostics always does an exit 1) $(OUTPUTDIR)/build/ant-diagnostics.log: @mkdir -p $(OUTPUTDIR)/build $(ANT_TMPDIR) @$(RM) $@ $(ANT_JAVA_HOME) $(ANT_OPTS) $(ANT) -diagnostics > $@ ; \ $(ANT_JAVA_HOME) $(ANT_OPTS) $(ANT) -version >> $@ # Create a make target for each $(ANT_TARGETS): $(OUTPUTDIR)/build/ant-diagnostics.log @ mkdir -p $(OUTPUTDIR)/build $(ANT_TMPDIR) $(ANT_JAVA_HOME) $(ANT_OPTS) $(ANT) $(ANT_OPTIONS) $@ #------------------------------------------------------------------- # # Targets for Oracle's internal JPRT build system CD = cd ZIP = zip JPRT_ARCHIVE_BUNDLE=$(ABS_OUTPUTDIR)/$(JPRT_BUILD_FLAVOR)-bundle.zip jprt_build_product jprt_build_debug jprt_build_fastdebug: all ( $(CD) $(OUTPUTDIR) && \ $(ZIP) -q -r $(JPRT_ARCHIVE_BUNDLE) build dist ) #------------------------------------------------------------------- # Declare these phony (not filenames) .PHONY: $(ANT_TARGETS) all clobber \ jprt_build_product jprt_build_debug jprt_build_fastdebug libnb-javaparser-java_7.4.orig/make/build.properties0000644000000000000000000001464112214026367021037 0ustar 00000000000000# # Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License version 2 only, as # published by the Free Software Foundation. Oracle designates this # particular file as subject to the "Classpath" exception as provided # by Oracle in the LICENSE file that accompanied this code. # # This code is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # version 2 for more details (a copy is included in the LICENSE file that # accompanied this code). # # You should have received a copy of the GNU General Public License version # 2 along with this work; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. # # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA # or visit www.oracle.com if you need additional information or have any # questions. # # This is the JDK used to build and run the bootstrap version of javac. # The bootstrap javac is used to compile both boostrap versions of the # other tools, and product versions of all the tools. # Override this path as needed, either on the command line or in # one of the standard user build.properties files (see build.xml) # boot.java.home = /opt/jdk/1.7.0 boot.java = ${boot.java.home}/bin/java boot.javac = ${boot.java.home}/bin/javac boot.javac.source = 7 boot.javac.target = 7 # This is the JDK used to run the product version of the tools, # for example, for testing. If you're building a complete JDK, specify that. # Override this path as needed, either on the command line or in # one of the standard user build.properties files (see build.xml) # target.java.home = /opt/jdk/1.8.0 target.java = ${target.java.home}/bin/java # Version info -- override as needed jdk.version = 1.8.0 build.number = b00 milestone = internal # FIXME -- these need to match the standard values # If we include date in full.version (ie for developer build) # we will need to make sure the build is idempotent (i.e. # repeated builds don't rebuild the tools, because of new # timestamps # FIXME -- need to include openjdk as needed release = ${jdk.version}-${milestone} bootstrap.release = ${release}_bootstrap full.version = ${release}-${build.number} bootstrap.full.version = ${bootstrap.release}-${build.number} # options for the tasks used to compile the tools javac.source = 8 javac.target = 8 javac.debug = true javac.debuglevel = source,lines javac.no.jdk.warnings = -XDignore.symbol.file=true # set the following to -version to verify the versions of javac being used javac.version.opt = # in time, there should be no exceptions to -Xlint:all javac.lint.opts = -Xlint:all -Werror # options for the task for javac #javadoc.jls3.url=http://java.sun.com/docs/books/jls/ #javadoc.jls3.cite=<a href="${javadoc.jls3.url}">The Java Language Specification, Third Edition</a> #javadoc.jls3.option=-tag "jls3:a:See <cite>${javadoc.jls3.cite}</cite>:" javadoc.jls.cite=The Java™ Language Specification javadoc.jls.option=-tag "jls:a:See <cite>${javadoc.jls.cite}</cite>:" # jtreg, used to run the JDK regression tests # See http://openjdk.java.net/jtreg/ # Override this path as needed, either on the command line or in # one of the standard user build.properties files (see build.xml) # jtreg.home = /opt/jtreg/4.1 # findbugs # See http://findbugs.sourceforge.net/ # Override this path as needed, either on the command line or in # one of the standard user build.properties files (see build.xml) # findbugs.home = /opt/findbugs/1.2.1 # vizant (graph visualization tool for Ant) # See http://vizant.sourceforge.net/ # Override this path as needed, either on the command line or in # one of the standard user build.properties files (see build.xml) # vizant.jar = /opt/vizant/0.1.2/vizant-0.1.2.jar # dot = dot #------------------------------------------------------------ # The following properties define the packages for each of the tools. # Syntactically, they should be suitable as arguments for the "includes" # parameter of Ant filesets. In particular, note the trailing '/'. javac.includes = \ javax/annotation/processing/ \ javax/lang/model/ \ javax/tools/ \ jdk/ \ com/sun/source/ \ com/sun/tools/javac/ \ com/sun/tools/doclint/ javac.tests = \ tools/javac # javadoc.includes = \ com/sun/javadoc/ \ com/sun/tools/javadoc/ javadoc.tests = \ tools/javadoc/ # doclets.includes = \ com/sun/tools/doclets/ doclets.tests = \ com/sun/javadoc/ # javah.includes = \ com/sun/tools/javah/ javah.tests = \ tools/javah/ # javap.includes = \ com/sun/tools/classfile/ \ com/sun/tools/javap/ \ com/sun/tools/jdeps/ \ sun/tools/javap/ javap.tests = \ tools/javap/ # sjavac.includes = \ com/sun/tools/sjavac/ sjavac.tests = \ tools/sjavac # # The following files require the latest JDK to be available. # The API can be provided by using a suitable boot.java.home # or by setting import.jdk require.latest.jdk.files = \ com/sun/tools/javac/nio/*.java # The following files in the import jdk source directory are required # in order to compile the files defined in ${require.latest.jdk.files} # # For NIO, the list of stub files is defined by the contents of the primary # API packages, together with such types that may be required in order to # compile the stubs. Some of these dependencies would go away if the stub # generator were to be improved -- e.g. by removing unnecessary imports. # import.jdk.stub.files = \ java/io/File.java \ java/nio/file/**.java \ java/nio/file/attribute/**.java \ java/nio/file/spi/**.java \ java/nio/channels/AsynchronousChannel.java \ java/nio/channels/AsynchronousFileChannel.java \ java/nio/channels/CompletionHandler.java \ java/nio/channels/SeekableByteChannel.java # The following value is used by the main jtreg target. # An empty value means all tests # Override as desired to run a specific set of tests jtreg.tests = # Check style configuration # overridable name and version checkstyle.name.version = checkstyle-5.4 libnb-javaparser-java_7.4.orig/make/build.xml0000644000000000000000000015152412214026367017445 0ustar 00000000000000 ant.home = ${ant.home} boot.java.home = ${boot.java.home} target.java.home = ${target.java.home} jtreg.home = ${jtreg.home} findbugs.home = ${findbugs.home} checkstyle.home = ${checkstyle.home}
Unofficial Javadoc generated from developer sources for preview purposes only]]>
libnb-javaparser-java_7.4.orig/make/conf/checkstyle-emacs.xsl0000644000000000000000000000166712214026367022527 0ustar 00000000000000 Coding Style Check Results -------------------------- Total files checked: Files with errors: Total errors: Errors per file: :: libnb-javaparser-java_7.4.orig/make/conf/checkstyle-langtools.xml0000644000000000000000000000313612214026367023424 0ustar 00000000000000 libnb-javaparser-java_7.4.orig/make/jprt.properties0000644000000000000000000000716412214026367020721 0ustar 00000000000000# # Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License version 2 only, as # published by the Free Software Foundation. Oracle designates this # particular file as subject to the "Classpath" exception as provided # by Oracle in the LICENSE file that accompanied this code. # # This code is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # version 2 for more details (a copy is included in the LICENSE file that # accompanied this code). # # You should have received a copy of the GNU General Public License version # 2 along with this work; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. # # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA # or visit www.oracle.com if you need additional information or have any # questions. # # Properties for jprt # Locked down to jdk8 jprt.tools.default.release=jdk8 # The different build flavors we want, we override here so we just get these 2 jprt.build.flavors=product,fastdebug # Standard list of jprt build targets for this source tree jprt.build.targets= \ solaris_sparc_5.10-{product|fastdebug}, \ solaris_sparcv9_5.10-{product|fastdebug}, \ solaris_i586_5.10-{product|fastdebug}, \ solaris_x64_5.10-{product|fastdebug}, \ linux_i586_2.6-{product|fastdebug}, \ linux_x64_2.6-{product|fastdebug}, \ macosx_x64_10.7-{product|fastdebug}, \ windows_i586_5.1-{product|fastdebug}, \ windows_x64_5.2-{product|fastdebug} # Test target list (no fastdebug & limited c2 testing) jprt.my.test.target.set= \ solaris_sparc_5.10-product-c1-TESTNAME, \ solaris_sparcv9_5.10-product-c2-TESTNAME, \ solaris_i586_5.10-product-c1-TESTNAME, \ solaris_x64_5.10-product-c2-TESTNAME, \ linux_i586_2.6-product-{c1|c2}-TESTNAME, \ linux_x64_2.6-product-c2-TESTNAME, \ macosx_x64_10.7-product-c2-TESTNAME, \ windows_i586_5.1-product-c1-TESTNAME, \ windows_x64_5.2-product-c2-TESTNAME # Default test targets jprt.make.rule.test.targets= \ ${jprt.my.test.target.set:TESTNAME=jtreg} # Directories to be excluded from the source bundles jprt.bundle.exclude.src.dirs=build dist webrev # Test target list (no fastdebug & limited c2 testing) jprt.my.test.target.set= \ solaris_sparc_5.10-product-c1-TESTNAME, \ solaris_sparcv9_5.10-product-c2-TESTNAME, \ solaris_i586_5.10-product-c1-TESTNAME, \ solaris_x64_5.10-product-c2-TESTNAME, \ linux_i586_2.6-product-{c1|c2}-TESTNAME, \ linux_x64_2.6-product-c2-TESTNAME, \ macosx_x64_10.7-product-c2-TESTNAME, \ windows_i586_5.1-product-c1-TESTNAME, \ windows_x64_5.2-product-c2-TESTNAME # Default test targets jprt.make.rule.test.targets= \ ${jprt.my.test.target.set:TESTNAME=jtreg} libnb-javaparser-java_7.4.orig/make/netbeans/README0000644000000000000000000000313312214026367020273 0ustar 00000000000000Using NetBeans to work on the langtools repository. Netbeans 6.0 or later is recommended. The "langtools" project in this directory allows you to edit, run, test and debug the tools in the OpenJDK langtools repository. The repository contains a number of tools: javac, javadoc and its doclets, javah and javap. Build Properties. To build this repository, you must set some properties for Ant. You can set these properties in a number of ways: - Set the properties in the Properties panel under Tool> Options> Ant. Properties set this way will apply globally to all the langtools repositories you may be working on. - Create a file build.properties in the root directory of a langtools repository, and set the properties in that file. These properties will be specific to that repository. To build the repository, at a minimum you must set the "boot.java.home" property. To run the tools, you must also set "target.java.home". To run the regression tests, you must set "jtreg.home". By default, the build and test targets will build and test all of these tools. The run and debug targets will prompt you for the name of a tool to execute. As an alternative, you can focus on a single tool. When you do this, you will still see all the source code for all the tools, but the various Ant targets will now be focussed on the selected tool. To focus on a tool, bring up the context menu on the "langtools" project (i.e. right-click on the project) and select "Select Tool". This brings up a dialog which allows you to specify which tool you wish to work on, and the arguments to use if and when you run it. libnb-javaparser-java_7.4.orig/make/netbeans/hudson/build0000755000000000000000000000264612214026367021750 0ustar 00000000000000#!/bin/bash load_into_cache() { mkdir -p cache NAME=`basename $2`; if [ ! -f cache/$NAME ] ; then cd cache; wget $2; cp $NAME $1 cd ..; fi; } unpack_jar() { cp $1 $2 cd $2 jar=`ls *.jar`; jar xf $jar rm $jar cd - } diff_jars() { rm -rf jardiff mkdir -p jardiff/1 jardiff/2 unpack_jar $1 jardiff/1 unpack_jar $2 jardiff/2 diff -r jardiff/1 jardiff/2 >$3 rm -rf jardiff } load_into_cache junit-4.10.jar http://hg.netbeans.org/binaries/E4F1766CE7404A08F45D859FB9C226FC9E41A861-junit-4.10.jar API_JAR_NAME=`wget -q -O - http://hg.netbeans.org/main/raw-file/tip/libs.javacapi/external/binaries-list | tr ' ' '-'` load_into_cache javac-api-nb-7.0-b07.jar http://hg.netbeans.org/binaries/$API_JAR_NAME IMPL_JAR_NAME=`wget -q -O - http://hg.netbeans.org/main/raw-file/tip/libs.javacimpl/external/binaries-list | tr ' ' '-'` load_into_cache javac-impl-nb-7.0-b07.jar http://hg.netbeans.org/binaries/$IMPL_JAR_NAME JUNIT_CP=$PWD/cache/junit-4.10.jar cd ../nb-javac ant clean || exit 1 ant -Dlibs.junit.classpath=$JUNIT_CP || exit 1 cd - diff_jars $PWD/cache/javac-api-nb-7.0-b07.jar $PWD/../nb-javac/dist/javac-api.jar $PWD/../nb-javac/dist/javac-api.diff diff_jars $PWD/cache/javac-impl-nb-7.0-b07.jar $PWD/../nb-javac/dist/javac-impl.jar $PWD/../nb-javac/dist/javac-impl.diff (cd ../../../; hg diff -r last_langtools -r tip src/ >make/netbeans/nb-javac/dist/nb-javac-langtools.diff) libnb-javaparser-java_7.4.orig/make/netbeans/langtools/build.xml0000644000000000000000000002715112214026367023244 0ustar 00000000000000 Must set property 'includes' Must set property 'run.classname' Some tests failed; see report for details. Must set property 'debug.classname' Must set property 'jtreg.tests' Must set property 'class' libnb-javaparser-java_7.4.orig/make/netbeans/langtools/nbproject/project.xml0000644000000000000000000003311712214026367025600 0ustar 00000000000000 org.netbeans.modules.ant.freeform langtools langtools ../../.. ${root} tests ${root}/test build ${root}/make java ${root}/src/share/classes ${root}/build/classes build clean clean build compile-single ${root}/src/share/classes includes ${root}/src/share/classes \.java$ relative-path , run run-single run.classname ${root}/src/share/classes \.java$ java-name jtreg jtreg.tests ${root}/test \.(java|sh)$ relative-path , jtreg debug debug-single debug.classname ${root}/src/share/classes \.java$ java-name debug-jtreg jtreg.tests ${root}/test \.(java|sh)$ relative-path debug-fix ${root}/src/share/classes class ${root}/src/share/classes \.java$ relative-path-noext javadoc select-tool test-select-tool-1 test-select-tool-2 folder ${root}/build/classes build ${root}/src/share/classes ${root}/test ${root}/make README ${root}/src/share/classes ${root}/build/classes 1.7 libnb-javaparser-java_7.4.orig/make/netbeans/langtools/nbproject/standard-context-menu-items.ent0000644000000000000000000000440312214026367031457 0ustar 00000000000000 libnb-javaparser-java_7.4.orig/make/netbeans/langtools/nbproject/standard-ide-actions.ent0000644000000000000000000001161512214026367030114 0ustar 00000000000000 build clean clean build compile-single ${root}/src/share/classes includes ${root}/src/share/classes \.java$ relative-path , run run-single run.classname ${root}/src/share/classes \.java$ java-name jtreg jtreg.tests ${root}/test \.(java|sh)$ relative-path , jtreg debug debug-single debug.classname ${root}/src/share/classes \.java$ java-name debug-jtreg jtreg.tests ${root}/test \.(java|sh)$ relative-path debug-fix ${root}/src/share/classes class ${root}/src/share/classes \.java$ relative-path-noext javadoc select-tool test-select-tool-1 test-select-tool-2 libnb-javaparser-java_7.4.orig/make/netbeans/nb-javac/build.xml0000644000000000000000000001132012214026367022712 0ustar 00000000000000 Builds, tests, and runs the project nb-javac. libnb-javaparser-java_7.4.orig/make/netbeans/nb-javac/manifest.mf0000644000000000000000000000012212214026367023221 0ustar 00000000000000Manifest-Version: 1.0 X-COMMENT: Main-Class will be added automatically by build libnb-javaparser-java_7.4.orig/make/netbeans/nb-javac/nbproject/build-impl.xml0000644000000000000000000022740212214026367025651 0ustar 00000000000000 Must set src.dir Must set test.test.dir Must set build.dir Must set dist.dir Must set build.classes.dir Must set dist.javadoc.dir Must set build.test.classes.dir Must set build.test.results.dir Must set build.classes.excludes Must set dist.jar Must set javac.includes No tests executed. Must set JVM to use for profiling in profiler.info.jvm Must set profiler agent JVM arguments in profiler.info.jvmargs.agent Must select some files in the IDE or set javac.includes To run this application from the command line without Ant, try: java -jar "${dist.jar.resolved}" Must select one file in the IDE or set run.class Must select one file in the IDE or set run.class Must select one file in the IDE or set debug.class Must select one file in the IDE or set debug.class Must set fix.includes This target only works when run from inside the NetBeans IDE. Must select one file in the IDE or set profile.class This target only works when run from inside the NetBeans IDE. This target only works when run from inside the NetBeans IDE. This target only works when run from inside the NetBeans IDE. Must select one file in the IDE or set run.class Must select some files in the IDE or set test.includes Must select one file in the IDE or set run.class Must select one file in the IDE or set applet.url Must select some files in the IDE or set javac.includes Some tests failed; see details above. Must select some files in the IDE or set test.includes Some tests failed; see details above. Must select some files in the IDE or set test.class Must select some method in the IDE or set test.method Some tests failed; see details above. Must select one file in the IDE or set test.class Must select one file in the IDE or set test.class Must select some method in the IDE or set test.method Must select one file in the IDE or set applet.url Must select one file in the IDE or set applet.url libnb-javaparser-java_7.4.orig/make/netbeans/nb-javac/nbproject/genfiles.properties0000644000000000000000000000071112214026367026773 0ustar 00000000000000build.xml.data.CRC32=9cf381a1 build.xml.script.CRC32=5a882d8f build.xml.stylesheet.CRC32=be360661 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. nbproject/build-impl.xml.data.CRC32=0dbef76c nbproject/build-impl.xml.script.CRC32=732cb6b1 nbproject/build-impl.xml.stylesheet.CRC32=5a01deb7@1.68.0.46 libnb-javaparser-java_7.4.orig/make/netbeans/nb-javac/nbproject/project.properties0000644000000000000000000000535012214026367026651 0ustar 00000000000000annotation.processing.enabled=true annotation.processing.enabled.in.editor=false annotation.processing.processors.list= annotation.processing.run.all.processors=true application.title=nb-javac application.vendor=lahvac build.classes.dir=${build.dir}/classes build.classes.excludes=**/*.java,**/*.form # This directory is removed when the project is cleaned: build.dir=build build.generated.dir=${build.dir}/generated build.generated.sources.dir=${build.dir}/generated-sources # Only compile against the classpath explicitly listed here: build.sysclasspath=ignore build.test.classes.dir=${build.dir}/test/classes build.test.results.dir=${build.dir}/test/results debug.classpath=\ ${run.classpath} debug.test.classpath=\ ${run.test.classpath} # This directory is removed when the project is cleaned: dist.dir=dist dist.jar=${dist.dir}/nb-javac.jar dist.javadoc.dir=${dist.dir}/javadoc endorsed.classpath= excludes=com/sun/mirror/,com/sun/tools/apt/,com/sun/tools/doclets/,com/sun/tools/javah/,com/sun/tools/javac/sym/,com/sun/tools/javac/nio/,sun/,com/sun/tools/jdeps/,com/sun/tools/sjavac/ file.reference.share-classes=../../../src/share/classes includes=** jar.archive.disabled=${jnlp.enabled} jar.compress=false jar.index=${jnlp.enabled} javac.classpath= # Space-separated list of extra javac options javac.compilerargs=-Xbootclasspath/p:${basedir}/dist/javac-api.jar javac.deprecation=false javac.processorpath=\ ${javac.classpath} javac.source=1.7 javac.target=1.7 javac.test.classpath=\ ${javac.classpath}:\ ${build.classes.dir}:\ ${libs.junit.classpath}:\ ${libs.junit_4.classpath} javadoc.additionalparam= javadoc.author=false javadoc.encoding=${source.encoding} javadoc.noindex=false javadoc.nonavbar=false javadoc.notree=false javadoc.private=false javadoc.splitindex=true javadoc.use=true javadoc.version=false javadoc.windowtitle= jaxbwiz.endorsed.dirs="${netbeans.home}/../ide12/modules/ext/jaxb/api" jnlp.codebase.type=no.codebase jnlp.descriptor=application jnlp.enabled=false jnlp.mixed.code=default jnlp.offline-allowed=false jnlp.signed=false jnlp.signing= jnlp.signing.alias= jnlp.signing.keystore= main.class= manifest.file=manifest.mf meta.inf.dir=${src.dir}/META-INF mkdist.disabled=false platform.active=default_platform run.classpath=\ ${javac.classpath}:\ ${build.classes.dir} # Space-separated list of JVM arguments used when running the project # (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value # or test-sys-prop.name=value to set system properties for unit tests): run.jvmargs=-Xbootclasspath/p:${dist.dir}/javac-api.jar run.test.classpath=\ ${javac.test.classpath}:\ ${build.test.classes.dir} source.encoding=UTF-8 src.dir=${file.reference.share-classes} test.test.dir=test libnb-javaparser-java_7.4.orig/make/netbeans/nb-javac/nbproject/project.xml0000644000000000000000000000106312214026367025252 0ustar 00000000000000 org.netbeans.modules.java.j2seproject nb-javac 1.6.5 ././@LongLink0000000000000000000000000000015400000000000011215 Lustar 00000000000000libnb-javaparser-java_7.4.orig/make/netbeans/nb-javac/test/com/sun/source/tree/CompilationUnitTreeTest.javalibnb-javaparser-java_7.4.orig/make/netbeans/nb-javac/test/com/sun/source/tree/CompilationUnitTreeTe0000644000000000000000000000764312214026367032061 0ustar 00000000000000/* * Copyright 2003-2004 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Sun designates this * particular file as subject to the "Classpath" exception as provided * by Sun in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, * CA 95054 USA or visit www.sun.com if you need additional information or * have any questions. */ package com.sun.source.tree; import com.sun.tools.javac.api.JavacTaskImpl; import java.io.IOException; import java.net.URI; import java.util.Arrays; import javax.tools.JavaCompiler; import javax.tools.JavaFileObject; import javax.tools.SimpleJavaFileObject; import javax.tools.ToolProvider; import junit.framework.TestCase; /** * * @author Jan Lahoda */ public class CompilationUnitTreeTest extends TestCase { public CompilationUnitTreeTest(String testName) { super(testName); } @Override protected void setUp() throws Exception { super.setUp(); } static class MyFileObject extends SimpleJavaFileObject { private String text; public MyFileObject(String text) { super(URI.create("myfo:/Test.java"), JavaFileObject.Kind.SOURCE); this.text = text; } public CharSequence getCharContent(boolean ignoreEncodingErrors) { return text; } } private void performTest(String code, int lastLine) throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, null, null, Arrays.asList("-bootclasspath", bootPath), null, Arrays.asList(new MyFileObject(code))); CompilationUnitTree cut = ct.parse().iterator().next(); cut.getLineMap().getStartPosition(lastLine); boolean exceptionThrown = false; try { cut.getLineMap().getStartPosition(lastLine + 1); } catch (IndexOutOfBoundsException e) { //intentional: exceptionThrown = true; } assertTrue(exceptionThrown); ((JavacTaskImpl) ct).finish(); //DocCommentScanner: ct = (JavacTaskImpl)tool.getTask(null, null, null, Arrays.asList("-bootclasspath", bootPath), null, Arrays.asList(new MyFileObject(code))); cut = ct.parse().iterator().next(); cut.getLineMap().getStartPosition(lastLine); exceptionThrown = false; try { cut.getLineMap().getStartPosition(lastLine + 1); } catch (IndexOutOfBoundsException e) { //intentional: exceptionThrown = true; } assertTrue(exceptionThrown); ((JavacTaskImpl) ct).finish(); } public void testLineMap() throws IOException { performTest("public class Test {}\n//", 2); performTest("public class Test {}\n ", 2); performTest("public class Test {}\n", 2); performTest("public class Test {}", 1); performTest(" ", 1); performTest("", 1); performTest("\n", 2); performTest("\n\n", 3); } } libnb-javaparser-java_7.4.orig/make/netbeans/nb-javac/test/com/sun/source/tree/TreeTest.java0000644000000000000000000000650112214026367030301 0ustar 00000000000000/* * Copyright 2003-2004 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Sun designates this * particular file as subject to the "Classpath" exception as provided * by Sun in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, * CA 95054 USA or visit www.sun.com if you need additional information or * have any questions. */ package com.sun.source.tree; import com.sun.tools.javac.api.JavacTaskImpl; import java.io.IOException; import java.net.URI; import java.util.Arrays; import javax.tools.JavaCompiler; import javax.tools.JavaFileObject; import javax.tools.SimpleJavaFileObject; import javax.tools.ToolProvider; import junit.framework.TestCase; /** * * @author Jan Lahoda */ public class TreeTest extends TestCase { public TreeTest(String testName) { super(testName); } static class MyFileObject extends SimpleJavaFileObject { private String text; public MyFileObject(String text) { super(URI.create("myfo:/Test.java"), JavaFileObject.Kind.SOURCE); this.text = text; } public CharSequence getCharContent(boolean ignoreEncodingErrors) { return text; } } public void testToStringShouldNotEscape() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String code = "package veÄerníÄek; class A {}"; JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, null, null, Arrays.asList("-bootclasspath", bootPath), null, Arrays.asList(new MyFileObject(code))); CompilationUnitTree cut = ct.parse().iterator().next(); assertEquals("veÄerníÄek", cut.getPackageName().toString()); } public void testArrayWithInitializerToString() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String code = "package veÄerníÄek; class A { private String[] arr = new String[] { };}"; JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, null, null, Arrays.asList("-bootclasspath", bootPath), null, Arrays.asList(new MyFileObject(code))); CompilationUnitTree cut = ct.parse().iterator().next(); assertEquals("package veÄerníÄek;\n\nclass A {\n private String[] arr = new String[]{};\n}", cut.toString()); } } libnb-javaparser-java_7.4.orig/make/netbeans/nb-javac/test/com/sun/source/util/TreesTest.java0000644000000000000000000002744312214026367030512 0ustar 00000000000000/* * Copyright 2003-2004 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Sun designates this * particular file as subject to the "Classpath" exception as provided * by Sun in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, * CA 95054 USA or visit www.sun.com if you need additional information or * have any questions. */ package com.sun.source.util; import com.sun.source.tree.CompilationUnitTree; import com.sun.source.tree.IdentifierTree; import com.sun.source.tree.MemberReferenceTree; import com.sun.source.tree.MethodTree; import com.sun.source.tree.Scope; import com.sun.source.tree.Tree; import com.sun.source.tree.Tree.Kind; import com.sun.source.tree.TypeParameterTree; import com.sun.source.tree.VariableTree; import com.sun.tools.javac.api.JavacTrees; import java.io.IOException; import java.net.URI; import java.util.Arrays; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicReference; import javax.lang.model.element.Element; import javax.lang.model.element.ElementKind; import javax.lang.model.element.TypeElement; import javax.tools.JavaCompiler; import javax.tools.JavaFileObject; import javax.tools.SimpleJavaFileObject; import javax.tools.ToolProvider; import junit.framework.TestCase; /** * * @author Jan Lahoda */ public class TreesTest extends TestCase { /** Creates a new instance of TreesTest */ public TreesTest(String name) { super(name); } static class MyFileObject extends SimpleJavaFileObject { private String code; public MyFileObject() { this("public class Test { public void test() {TTT ttt;}}"); } public MyFileObject(String code) { super(URI.create("myfo:/Test.java"), JavaFileObject.Kind.SOURCE); this.code = code; } public CharSequence getCharContent(boolean ignoreEncodingErrors) { return code; } } public void testElementToTreeForTypeVariable() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; final JavacTask ct = (JavacTask)tool.getTask(null, null, null, Arrays.asList("-bootclasspath", bootPath), null, Arrays.asList(new MyFileObject())); CompilationUnitTree cut = ct.parse().iterator().next(); ct.analyze(); Trees trees = JavacTrees.instance(ct); new Scanner().scan(cut, trees); } public void XtestIsAccessible99346() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; final JavacTask ct = (JavacTask)tool.getTask(null, null, null, Arrays.asList("-bootclasspath", bootPath), null, Arrays.asList(new MyFileObject())); CompilationUnitTree cut = ct.parse().iterator().next(); TreePath tp = new TreePath(new TreePath(cut), cut.getTypeDecls().get(0)); Scope s = Trees.instance(ct).getScope(tp); TypeElement type = ct.getElements().getTypeElement("com.sun.java.util.jar.pack.Package.File"); assertFalse(Trees.instance(ct).isAccessible(s, type)); } public void testScope129282() throws IOException { String code = "package test;\n" + "public class Test {\n" + "\n" + " void method() {\n" + " label:\n" + " for (int i = 0; i < 1; i++) {\n" + " String foo = null;\n" + " System.out.println(foo);\n" + " }\n" + " }\n" + "\n" + "}\n"; final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; final JavacTask ct = (JavacTask)tool.getTask(null, null, null, Arrays.asList("-bootclasspath", bootPath), null, Arrays.asList(new MyFileObject(code))); CompilationUnitTree cut = ct.parse().iterator().next(); ct.analyze(); Trees trees = JavacTrees.instance(ct); final AtomicReference result = new AtomicReference(); new TreePathScanner() { @Override public Void visitVariable(VariableTree node, Void p) { if ("foo".equals(node.getName().toString())) { result.set(getCurrentPath()); } return super.visitVariable(node, p); } }.scan(cut, null); assertNotNull(result.get()); Scope s = trees.getScope(result.get()); boolean found = false; for (Element e : s.getLocalElements()) { if ("foo".equals(e.getSimpleName().toString())) { found = true; break; } } assertTrue(found); } private class Scanner extends TreePathScanner { private Tree typeParam; @Override public Void visitIdentifier(IdentifierTree node, Trees t) { if ("TTT".equals(node.getName().toString())) { Element el = t.getElement(getCurrentPath()); assertNotNull(el); Tree tree = t.getTree(el); assertTrue(tree == typeParam); //the following asserts can be fixed by adding this into TreeInfo.declarationFor.DeclScanner: // public @Override void visitTypeParameter(JCTypeParameter tree) { // if (tree.type.tsym == sym) result = tree; // else super.visitTypeParameter(tree); // } // // TreePath path = t.getPath(el); // assertTrue(path != null); // assertTrue(path.getLeaf() == tree); } return null; } @Override public Void visitTypeParameter(TypeParameterTree node, Trees t) { assertTrue(t.getElement(getCurrentPath()) != null); typeParam = node; return super.visitTypeParameter(node, t); } } public void testGetTree() throws IOException { String code = "package test;\n" + "public class Test {\n" + " public Test() {\n" + " method();\n" + " }\n" + " protected void method\n\n" + "}\n"; final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; final JavacTask ct = (JavacTask)tool.getTask(null, null, null, Arrays.asList("-bootclasspath", bootPath, "-XDide"), null, Arrays.asList(new MyFileObject(code))); CompilationUnitTree cut = ct.parse().iterator().next(); ct.analyze(); final Trees trees = JavacTrees.instance(ct); final AtomicBoolean found = new AtomicBoolean(); new TreePathScanner() { @Override public Void visitMethod(MethodTree node, Void p) { if ("method".equals(node.getName().toString())) { assertEquals(Kind.ERRONEOUS, getCurrentPath().getParentPath().getLeaf().getKind()); Element e = trees.getElement(getCurrentPath()); System.err.println(getCurrentPath().getLeaf()); System.err.println(getCurrentPath().getParentPath().getLeaf()); System.err.println(getCurrentPath().getParentPath().getParentPath().getLeaf()); assertNotNull(e); assertNotNull(trees.getTree(e)); assertNotNull(trees.getPath(e)); found.set(true); } return super.visitMethod(node, p); } }.scan(cut, null); assertTrue(found.get()); } public void XtestStartPositionForBrokenLambdaParameter() throws IOException { final String code = "package test;\n" + "public class Test {\n" + " public Test() {\n" + " Object o = (str -> {System.err.println(str);});\n" + " }\n" + "}\n"; final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; final JavacTask ct = (JavacTask)tool.getTask(null, null, null, Arrays.asList("-bootclasspath", bootPath, "-XDide"), null, Arrays.asList(new MyFileObject(code))); final CompilationUnitTree cut = ct.parse().iterator().next(); ct.analyze(); final Trees trees = JavacTrees.instance(ct); final AtomicBoolean found = new AtomicBoolean(); new TreePathScanner() { @Override public Void visitVariable(VariableTree node, Void p) { if ("str".equals(node.getName().toString())) { assertEquals(74, trees.getSourcePositions().getStartPosition(cut, node)); found.set(true); } return super.visitVariable(node, p); } }.scan(cut, null); assertTrue(found.get()); } public void testGetElementForMemberReference() throws IOException { final String code = "package test;\n" + "public class Test {\n" + " private static void method() {\n" + " javax.swing.SwingUtilities.invokeLater(Test::method);\n" + " }\n" + "}\n"; final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; final JavacTask ct = (JavacTask)tool.getTask(null, null, null, Arrays.asList("-bootclasspath", bootPath, "-source", "1.8"), null, Arrays.asList(new MyFileObject(code))); final CompilationUnitTree cut = ct.parse().iterator().next(); ct.analyze(); final Trees trees = JavacTrees.instance(ct); final AtomicBoolean found = new AtomicBoolean(); new TreePathScanner() { @Override public Void visitMemberReference(MemberReferenceTree node, Void p) { Element el = trees.getElement(getCurrentPath()); assertNotNull(el); assertEquals(ElementKind.METHOD, el.getKind()); assertEquals("method", el.getSimpleName().toString()); assertEquals("test.Test", ((TypeElement) el.getEnclosingElement()).getQualifiedName().toString()); found.set(true); return super.visitMemberReference(node, p); } }.scan(cut, null); assertTrue(found.get()); } } libnb-javaparser-java_7.4.orig/make/netbeans/nb-javac/test/com/sun/tools/javac/code/FlagsTest.java0000644000000000000000000000473412214026367031343 0ustar 00000000000000/* * Copyright 2003-2004 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Sun designates this * particular file as subject to the "Classpath" exception as provided * by Sun in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, * CA 95054 USA or visit www.sun.com if you need additional information or * have any questions. */ package com.sun.tools.javac.code; import java.lang.reflect.Field; import java.lang.reflect.Modifier; import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; import junit.framework.TestCase; /** * * @author lahvac */ public class FlagsTest extends TestCase { public FlagsTest(String testName) { super(testName); } private static final Set ignoredFields = new HashSet(Arrays.asList("ACC_SUPER", "ACC_BRIDGE", "ACC_VARARGS", "ACC_DEFENDER", "BAD_OVERRIDE")); public void testCheckFlagsNotClashing() throws Exception { Map value2Name = new HashMap(); for (Field f : Flags.class.getDeclaredFields()) { if ( !Modifier.isStatic(f.getModifiers()) || !Modifier.isPublic(f.getModifiers()) || ignoredFields.contains(f.getName()) || Long.bitCount(f.getLong(null)) != 1) { continue; } long value = f.getLong(null); if (value2Name.containsKey(value)) { throw new IllegalStateException("Value clash between " + value2Name.get(value) + " and " + f.getName()); } value2Name.put(value, f.getName()); } } } libnb-javaparser-java_7.4.orig/make/netbeans/nb-javac/test/com/sun/tools/javac/code/LintTest.java0000644000000000000000000000673412214026367031217 0ustar 00000000000000/* * Copyright 2003-2004 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Sun designates this * particular file as subject to the "Classpath" exception as provided * by Sun in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, * CA 95054 USA or visit www.sun.com if you need additional information or * have any questions. */ package com.sun.tools.javac.code; import com.sun.source.util.JavacTask; import java.io.IOException; import java.net.URI; import java.util.Arrays; import java.util.concurrent.atomic.AtomicInteger; import javax.tools.Diagnostic; import javax.tools.DiagnosticListener; import javax.tools.JavaCompiler; import javax.tools.JavaFileObject; import javax.tools.SimpleJavaFileObject; import javax.tools.ToolProvider; import junit.framework.TestCase; /** * * @author Jan Lahoda */ public class LintTest extends TestCase { public LintTest(String testName) { super(testName); } static class MyFileObject extends SimpleJavaFileObject { private String code; public MyFileObject(String code) { super(URI.create("myfo:/Test.java"), JavaFileObject.Kind.SOURCE); this.code = code; } public CharSequence getCharContent(boolean ignoreEncodingErrors) { return code; } } public void test126218() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N String code = "class Test {java.util.List l;}"; final AtomicInteger count = new AtomicInteger(); DiagnosticListener dl = new DiagnosticListener() { public void report(Diagnostic diagnostic) { if ("compiler.warn.raw.class.use".equals(diagnostic.getCode())) { count.incrementAndGet(); } } }; final JavaCompiler tool15 = ToolProvider.getSystemJavaCompiler(); assert tool15 != null; final JavacTask ct15 = (JavacTask) tool15.getTask(null, null, dl, Arrays.asList("-bootclasspath", bootPath, "-Xlint:rawtypes", "-source", "1.5", "-XDide"), null, Arrays.asList(new MyFileObject(code))); ct15.analyze(); assertEquals(1, count.get()); count.set(0); final JavaCompiler tool13 = ToolProvider.getSystemJavaCompiler(); assert tool13 != null; final JavacTask ct13 = (JavacTask) tool13.getTask(null, null, dl, Arrays.asList("-bootclasspath", bootPath, "-Xlint:rawtypes", "-source", "1.3", "-XDide"), null, Arrays.asList(new MyFileObject(code))); ct13.analyze(); assertEquals(0, count.get()); } } libnb-javaparser-java_7.4.orig/make/netbeans/nb-javac/test/com/sun/tools/javac/code/TypesTest.java0000644000000000000000000001354612214026367031414 0ustar 00000000000000/* * Copyright 2003-2004 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Sun designates this * particular file as subject to the "Classpath" exception as provided * by Sun in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, * CA 95054 USA or visit www.sun.com if you need additional information or * have any questions. */ package com.sun.tools.javac.code; import com.sun.source.tree.ClassTree; import com.sun.source.tree.CompilationUnitTree; import com.sun.source.tree.Tree; import com.sun.source.util.JavacTask; import com.sun.source.util.TreePath; import com.sun.source.util.TreePathScanner; import com.sun.tools.javac.code.Type.ClassType; import java.io.IOException; import java.net.URI; import java.util.Arrays; import java.util.LinkedList; import javax.lang.model.type.DeclaredType; import javax.lang.model.type.TypeMirror; import javax.lang.model.util.Types; import javax.tools.JavaCompiler; import javax.tools.JavaFileObject; import javax.tools.SimpleJavaFileObject; import javax.tools.ToolProvider; import junit.framework.TestCase; /** * * @author Jan Lahoda */ public class TypesTest extends TestCase { public TypesTest(String testName) { super(testName); } static class MyFileObject extends SimpleJavaFileObject { private String code; public MyFileObject(String code) { super(URI.create("myfo:/Test.java"), JavaFileObject.Kind.SOURCE); this.code = code; } public CharSequence getCharContent(boolean ignoreEncodingErrors) { return code; } } public void test120841() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String code = "import java.util.ArrayList; public class Test { private void test() {new ArrayList(1) {};}}"; final JavacTask ct = (JavacTask) tool.getTask(null, null, null, Arrays.asList("-bootclasspath", bootPath), null, Arrays.asList(new MyFileObject(code))); ct.analyze(); } public void test120543() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String code = "class Test { , T2 extends T1> Object a(T2 c) { return c.b(); } } interface B{ T3 b(); }"; final JavacTask ct = (JavacTask) tool.getTask(null, null, null, Arrays.asList("-bootclasspath", bootPath), null, Arrays.asList(new MyFileObject(code))); ct.analyze(); } public void test126218() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String code = "class Test {}"; final JavacTask ct = (JavacTask) tool.getTask(null, null, null, Arrays.asList("-bootclasspath", bootPath), null, Arrays.asList(new MyFileObject(code))); final CompilationUnitTree tree = ct.parse().iterator().next(); ct.analyze(); new TreePathScanner() { public Object visitClass(ClassTree node, Object p) { LinkedList path = new LinkedList(); for (Tree t : getCurrentPath()) path.addFirst(t); TypeMirror t1 = ct.getTypeMirror(path); Types types = ct.getTypes(); TypeMirror t2 = ((ClassType)((ClassType)t1).supertype_field).supertype_field; types.isSubtype(t1, t2); return super.visitClass(node, p); } }.scan(tree, null); } public void testDuplicateTest() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String code = "class Test { abstract void t(); }"; final JavacTask ct = (JavacTask) tool.getTask(null, null, null, Arrays.asList("-bootclasspath", bootPath, "-source", "1.8", "-XDshouldStopPolicy=GENERATE"), null, Arrays.asList(new MyFileObject(code), new MyFileObject(code))); ct.analyze(); } public void testTypeVarBOT() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String code = "import java.util.Comparator; public class Test { public static > Comparator naturalOrder() { return null; } public void t() { Object o = (Comparator) naturalOrder(); } }"; final JavacTask ct = (JavacTask) tool.getTask(null, null, null, Arrays.asList("-bootclasspath", bootPath, "-source", "1.8", "-XDshouldStopPolicy=GENERATE"), null, Arrays.asList(new MyFileObject(code), new MyFileObject(code))); ct.analyze(); } } ././@LongLink0000000000000000000000000000014600000000000011216 Lustar 00000000000000libnb-javaparser-java_7.4.orig/make/netbeans/nb-javac/test/com/sun/tools/javac/comp/AnnotateTest.javalibnb-javaparser-java_7.4.orig/make/netbeans/nb-javac/test/com/sun/tools/javac/comp/AnnotateTest.jav0000644000000000000000000001667312214026367031750 0ustar 00000000000000/* * Copyright 2003-2004 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Sun designates this * particular file as subject to the "Classpath" exception as provided * by Sun in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, * CA 95054 USA or visit www.sun.com if you need additional information or * have any questions. */ package com.sun.tools.javac.comp; import com.sun.source.tree.CompilationUnitTree; import com.sun.source.tree.IdentifierTree; import com.sun.source.util.TreePathScanner; import com.sun.source.util.Trees; import com.sun.tools.javac.api.JavacTaskImpl; import java.io.File; import java.io.IOException; import java.net.URI; import java.util.Arrays; import javax.tools.JavaCompiler; import javax.tools.JavaFileObject; import javax.tools.SimpleJavaFileObject; import javax.tools.ToolProvider; import junit.framework.TestCase; /** * * @author Jan Lahoda */ public class AnnotateTest extends TestCase { public AnnotateTest(String testName) { super(testName); } static class MyFileObject extends SimpleJavaFileObject { private String text; public MyFileObject(String text) { super(URI.create("myfo:/Test.java"), JavaFileObject.Kind.SOURCE); this.text = text; } @Override public CharSequence getCharContent(boolean ignoreEncodingErrors) { return text; } } public void testNotImportedAnnotationsAttributed() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String code = "package test; @Retention(RetentionPolicy.CLASS) public class Test {}"; final JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, null, null, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject(code))); CompilationUnitTree cut = ct.parse().iterator().next(); ct.analyze(); new TreePathScanner() { @Override public Void visitIdentifier(IdentifierTree node, Void p) { if (node.getName().toString().startsWith("Retention")) { assertNotNull(node.toString(), Trees.instance(ct).getElement(getCurrentPath())); } return super.visitIdentifier(node, p); } }.scan(cut, null); } public void testNotImportedAnnotationsAttributed156131() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String code = "package test; @TransformationSet({@Transformation(displayName=\"\")}) public class Test {}"; final JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, null, null, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject(code))); CompilationUnitTree cut = ct.parse().iterator().next(); ct.analyze(); new TreePathScanner() { @Override public Void visitIdentifier(IdentifierTree node, Void p) { if (node.getName().toString().startsWith("Transformation")) { assertNotNull(node.toString(), Trees.instance(ct).getElement(getCurrentPath())); } return super.visitIdentifier(node, p); } }.scan(cut, null); } public void testUnresolvableAttributeType() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String codeAnnotation = "package test; @interface A { E e(); } @interface E { }"; final JavacTaskImpl annotation = (JavacTaskImpl)tool.getTask(null, null, null, Arrays.asList("-bootclasspath", bootPath, "-Xjcov", "-d", workingDir.getAbsolutePath()), null, Arrays.asList(new MyFileObject(codeAnnotation))); annotation.generate(); assertTrue(new File(workingDir, "test/E.class").delete()); String code = "package test; @A(e = @Transformation(displayName=\"\") ) class Test {}"; final JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, null, null, Arrays.asList("-bootclasspath", bootPath, "-Xjcov", "-classpath", workingDir.getAbsolutePath()), null, Arrays.asList(new MyFileObject(code))); CompilationUnitTree cut = ct.parse().iterator().next(); ct.analyze(); new TreePathScanner() { @Override public Void visitIdentifier(IdentifierTree node, Void p) { if (node.getName().toString().startsWith("Transformation")) { assertNotNull(node.toString(), Trees.instance(ct).getElement(getCurrentPath())); } return super.visitIdentifier(node, p); } }.scan(cut, null); } public void test199020a() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String code = "package test; @Undefined1(v=\"\", {@Undefined2}) public class Test {}"; final JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, null, null, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject(code))); CompilationUnitTree cut = ct.parse().iterator().next(); ct.analyze(); new TreePathScanner() { @Override public Void visitIdentifier(IdentifierTree node, Void p) { if (node.getName().toString().startsWith("Undefined")) { assertNotNull(node.toString(), Trees.instance(ct).getElement(getCurrentPath())); } return super.visitIdentifier(node, p); } }.scan(cut, null); } private File workingDir; @Override protected void setUp() throws Exception { super.setUp(); workingDir = File.createTempFile("AnnotateTest", ""); workingDir.delete(); workingDir.mkdirs(); } @Override protected void tearDown() throws Exception { deleteRecursively(workingDir); super.tearDown(); } private void deleteRecursively(File f) { if (f.isDirectory()) { for (File c : f.listFiles()) { deleteRecursively(c); } } f.delete(); } } libnb-javaparser-java_7.4.orig/make/netbeans/nb-javac/test/com/sun/tools/javac/comp/AttrTest.java0000644000000000000000000007523312214026367031247 0ustar 00000000000000/* * Copyright 2003-2004 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Sun designates this * particular file as subject to the "Classpath" exception as provided * by Sun in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, * CA 95054 USA or visit www.sun.com if you need additional information or * have any questions. */ package com.sun.tools.javac.comp; import com.sun.source.tree.CompilationUnitTree; import com.sun.source.tree.LambdaExpressionTree; import com.sun.source.tree.LiteralTree; import com.sun.source.tree.MethodTree; import com.sun.source.tree.NewClassTree; import com.sun.source.tree.Tree; import com.sun.source.tree.VariableTree; import com.sun.source.util.SourcePositions; import com.sun.source.util.TreePath; import com.sun.source.util.TreePathScanner; import com.sun.source.util.TreeScanner; import com.sun.source.util.Trees; import com.sun.tools.javac.api.JavacScope; import com.sun.tools.javac.api.JavacTaskImpl; import com.sun.tools.javac.api.JavacTrees; import com.sun.tools.javac.tree.JCTree; import com.sun.tools.javac.tree.JCTree.JCLambda; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.OutputStream; import java.net.URI; import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; import javax.lang.model.element.Element; import javax.lang.model.element.ElementKind; import javax.lang.model.type.TypeKind; import javax.lang.model.type.TypeMirror; import javax.tools.Diagnostic; import javax.tools.DiagnosticCollector; import javax.tools.FileObject; import javax.tools.ForwardingJavaFileManager; import javax.tools.JavaCompiler; import javax.tools.JavaFileManager; import javax.tools.JavaFileManager.Location; import javax.tools.JavaFileObject; import javax.tools.JavaFileObject.Kind; import javax.tools.SimpleJavaFileObject; import javax.tools.StandardJavaFileManager; import javax.tools.ToolProvider; import static junit.framework.Assert.assertEquals; import static junit.framework.Assert.assertNotNull; import junit.framework.TestCase; /** * * @author Jan Lahoda */ public class AttrTest extends TestCase { public AttrTest(String testName) { super(testName); } static class MyFileObject extends SimpleJavaFileObject { private String text; public MyFileObject(String text) { this("Test", text); } public MyFileObject(String name, String text) { super(URI.create("myfo:/" + name + ".java"), JavaFileObject.Kind.SOURCE); this.text = text; } @Override public CharSequence getCharContent(boolean ignoreEncodingErrors) { return text; } } public void testExceptionParameterCorrectKind() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String code = "package test; public class Test { { try { } catch (NullPointerException ex) {} } }"; final JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, null, null, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject(code))); CompilationUnitTree cut = ct.parse().iterator().next(); ct.analyze(); new TreePathScanner() { @Override public Void visitVariable(VariableTree node, Void p) { Element el = Trees.instance(ct).getElement(getCurrentPath()); assertNotNull(el); assertEquals(ElementKind.EXCEPTION_PARAMETER, el.getKind()); return super.visitVariable(node, p); } }.scan(cut, null); } public void testNPEFromNCTWithUnboundWildcard() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String code = "package test; public class Test { { new java.util.ArrayList>() {}; } }"; final JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, null, null, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject(code))); ct.analyze(); } public void testErrorReturnType1() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String api = "package test; public class API { public static Undef call() { return null; } }"; String use = "package test; public class Use { public void t() { Object str = API.call(); } }"; DiagnosticCollector dc = new DiagnosticCollector(); final JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, null, dc, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject("API", api), new MyFileObject("Use", use))); ct.analyze(); Set diagnostics = new HashSet(); for (Diagnostic d : dc.getDiagnostics()) { diagnostics.add(d.getSource().getName() + ":" + d.getStartPosition() + "-" + d.getEndPosition() + ":" + d.getCode()); } assertEquals(new HashSet(Arrays.asList("/API.java:47-52:compiler.err.cant.resolve.location", "/Use.java:64-72:compiler.err.type.error")), diagnostics); } public void testErrorReturnType2() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String api = "package test; public class API { public static String call() { return null; } }"; String use = "package test; public class Use { public void t() { Object str = API.; } }"; DiagnosticCollector dc = new DiagnosticCollector(); final JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, null, dc, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject("API", api), new MyFileObject("Use", use))); ct.analyze(); Set diagnostics = new HashSet(); for (Diagnostic d : dc.getDiagnostics()) { diagnostics.add(d.getSource().getName() + ":" + d.getStartPosition() + "-" + d.getEndPosition() + ":" + d.getCode()); } assertEquals(new HashSet(Arrays.asList("/Use.java:68-68:compiler.err.expected")), diagnostics); } public void testErrorReturnType3() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String api = "package test; public class API { public static String call() { return null; } }"; String use = "package test; public class Use { public void t() { Object str = API.undef(1); } }"; DiagnosticCollector dc = new DiagnosticCollector(); final JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, null, dc, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject("API", api), new MyFileObject("Use", use))); ct.analyze(); Set diagnostics = new HashSet(); for (Diagnostic d : dc.getDiagnostics()) { diagnostics.add(d.getSource().getName() + ":" + d.getStartPosition() + "-" + d.getEndPosition() + ":" + d.getCode()); } assertEquals(new HashSet(Arrays.asList("/Use.java:64-73:compiler.err.cant.resolve.location.args")), diagnostics); } public void testErrorReturnType4() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String api = "package test; public class API { public static Undef call() { return null; } }"; String use = "package test; import static test.API.*; public class Use { public void t() { Object str = call(); } }"; DiagnosticCollector dc = new DiagnosticCollector(); final JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, null, dc, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject("API", api), new MyFileObject("Use", use))); ct.analyze(); Set diagnostics = new HashSet(); for (Diagnostic d : dc.getDiagnostics()) { diagnostics.add(d.getSource().getName() + ":" + d.getStartPosition() + "-" + d.getEndPosition() + ":" + d.getCode()); } assertEquals(new HashSet(Arrays.asList("/API.java:47-52:compiler.err.cant.resolve.location", "/Use.java:90-94:compiler.err.type.error")), diagnostics); } public void testErrorReturnType5() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String use = "package test; public class Use { public static Undef call() { return null; } public void t() { Object str = call(); } }"; DiagnosticCollector dc = new DiagnosticCollector(); final JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, null, dc, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject("Use", use))); ct.analyze(); Set diagnostics = new HashSet(); for (Diagnostic d : dc.getDiagnostics()) { diagnostics.add(d.getSource().getName() + ":" + d.getStartPosition() + "-" + d.getEndPosition() + ":" + d.getCode()); } assertEquals(new HashSet(Arrays.asList("/Use.java:47-52:compiler.err.cant.resolve.location")), diagnostics); } public void testErrorReturnType6() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String api = "package test; public class API { public static Undef VAR; }"; String use = "package test; public class Use { public void t() { Object str = API.VAR; } }"; DiagnosticCollector dc = new DiagnosticCollector(); final JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, null, dc, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject("API", api), new MyFileObject("Use", use))); ct.analyze(); Set diagnostics = new HashSet(); for (Diagnostic d : dc.getDiagnostics()) { diagnostics.add(d.getSource().getName() + ":" + d.getStartPosition() + "-" + d.getEndPosition() + ":" + d.getCode()); } assertEquals(new HashSet(Arrays.asList("/API.java:47-52:compiler.err.cant.resolve.location", "/Use.java:64-71:compiler.err.type.error")), diagnostics); } public void testErrorReturnType7() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String api = "package test; public class API { public static Undef VAR; }"; String use = "package test; public class Use { public void t() { Object str = API.UNDEF; } }"; DiagnosticCollector dc = new DiagnosticCollector(); final JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, null, dc, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject("API", api), new MyFileObject("Use", use))); ct.analyze(); Set diagnostics = new HashSet(); for (Diagnostic d : dc.getDiagnostics()) { diagnostics.add(d.getSource().getName() + ":" + d.getStartPosition() + "-" + d.getEndPosition() + ":" + d.getCode()); } assertEquals(new HashSet(Arrays.asList("/API.java:47-52:compiler.err.cant.resolve.location", "/Use.java:64-73:compiler.err.cant.resolve.location")), diagnostics); } public void testErrorReturnType8() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String use = "package test; public class Use { public void t() { Object str = Undef.UNDEF; } }"; DiagnosticCollector dc = new DiagnosticCollector(); final JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, null, dc, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject("Use", use))); ct.analyze(); Set diagnostics = new HashSet(); for (Diagnostic d : dc.getDiagnostics()) { diagnostics.add(d.getSource().getName() + ":" + d.getStartPosition() + "-" + d.getEndPosition() + ":" + d.getCode()); } assertEquals(new HashSet(Arrays.asList("/Use.java:64-69:compiler.err.cant.resolve.location")), diagnostics); } public void testAnonymous() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String use = "package test; import java.util.*; public class Use { public void t() { List ll = new ArrayList<>() { }; } }"; DiagnosticCollector dc = new DiagnosticCollector(); final JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, null, dc, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject("Use", use))); ct.analyze(); Set diagnostics = new HashSet(); for (Diagnostic d : dc.getDiagnostics()) { diagnostics.add(d.getSource().getName() + ":" + d.getStartPosition() + "-" + d.getEndPosition() + ":" + d.getCode()); } assertEquals(new HashSet(Arrays.asList("/Use.java:93-104:compiler.err.cant.apply.diamond.1", "/Use.java:89-110:compiler.err.cant.resolve.args")), diagnostics); } public void testErrorConstructor1() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String api = "package test; public class API { public API(Undef p) { } }"; String use = "package test; public class Use { public void t() { Object str = new API(null); } }"; DiagnosticCollector dc = new DiagnosticCollector(); final JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, null, dc, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject("API", api), new MyFileObject("Use", use))); ct.analyze(); Set diagnostics = new HashSet(); for (Diagnostic d : dc.getDiagnostics()) { diagnostics.add(d.getSource().getName() + ":" + d.getStartPosition() + "-" + d.getEndPosition() + ":" + d.getCode()); } assertEquals(new HashSet(Arrays.asList("/API.java:44-49:compiler.err.cant.resolve.location", "/Use.java:64-77:compiler.err.type.error")), diagnostics); } public void testLambda1() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String code = "package test; public class Test { public static void main(String[] args) { Task t = (String c) -> { System.err.println(\"Lambda!\"); return ; }; } public interface Task { public void run(C c); } }"; DiagnosticCollector dc = new DiagnosticCollector(); final JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, null, dc, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject(code))); ct.analyze(); assertEquals(dc.getDiagnostics().toString(), 0, dc.getDiagnostics().size()); } public void testLambda2() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String code = "package test; public class Test { Task t = (String c) -> { System.err.println(\"Lambda!\"); return ; }; public interface Task { public void run(C c); } }"; DiagnosticCollector dc = new DiagnosticCollector(); final JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, null, dc, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject(code))); ct.analyze(); assertEquals(dc.getDiagnostics().toString(), 0, dc.getDiagnostics().size()); } public void testNonVoidReturnType() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String code = "package test; public class Test { private void t() { r(() -> { return 1; }); } private int r(Task t) { return t.run(); } public interface Task { public int run(); } }"; DiagnosticCollector dc = new DiagnosticCollector(); final JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, null, dc, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject(code))); ct.analyze(); assertEquals(dc.getDiagnostics().toString(), 0, dc.getDiagnostics().size()); } public void testBreakAttrDuringLambdaAttribution() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String code = "package test; public class Test { public void t(Comparable c) { } }"; DiagnosticCollector dc = new DiagnosticCollector(); final JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, null, dc, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject(code))); CompilationUnitTree cut = ct.parse().iterator().next(); ct.analyze(); final JavacScope[] scope = new JavacScope[1]; new TreePathScanner() { @Override public Void visitMethod(MethodTree node, Void p) { if (node.getName().contentEquals("t")) scope[0] = JavacTrees.instance(ct.getContext()).getScope(new TreePath(getCurrentPath(), node.getBody())); return super.visitMethod(node, p); //To change body of generated methods, choose Tools | Templates. } }.scan(cut, null); JCTree.JCStatement statement = ct.parseStatement("t((other) -> {return 0;})", new SourcePositions[1], new DiagnosticCollector()); final JCTree[] attributeTo = new JCTree[1]; final JCLambda[] lambdaTree = new JCLambda[1]; new TreeScanner() { @Override public Void visitVariable(VariableTree node, Void p) { attributeTo[0] = (JCTree) node; return super.visitVariable(node, p); //To change body of generated methods, choose Tools | Templates. } @Override public Void visitLambdaExpression(LambdaExpressionTree node, Void p) { lambdaTree[0] = (JCLambda) node; return super.visitLambdaExpression(node, p); //To change body of generated methods, choose Tools | Templates. } }.scan(statement, null); ct.attributeTreeTo(statement, scope[0].getEnv(), attributeTo[0]); assertNotNull(lambdaTree[0].type); } public void testCheckMethodNPE() throws Exception { String code = "public class Test { class Inner { Inner(int i) {} } public static void main(String[] args) { int i = 1; Test c = null; c.new Inner(i++) {}; } }"; final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; JavaFileManager fm = new MemoryOutputJFM(tool.getStandardFileManager(null, null, null)); final JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, fm, null, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject(code))); CompilationUnitTree cut = ct.parse().iterator().next(); ct.analyze(); new TreePathScanner() { @Override public Void visitNewClass(NewClassTree node, Void p) { assertNotNull(node.getEnclosingExpression()); assertEquals(1, node.getArguments().size()); return super.visitNewClass(node, p); } }.scan(cut, null); ct.generate(); //verify no exceptions during generate } public void test208454() throws Exception { String code = "public class Test { public static void main(String[] args) { String.new Runnable() { public void run() {} }; } }"; final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; JavaFileManager fm = new MemoryOutputJFM(tool.getStandardFileManager(null, null, null)); final JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, fm, null, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject(code))); CompilationUnitTree cut = ct.parse().iterator().next(); ct.analyze(); new TreePathScanner() { @Override public Void scan(Tree tree, Void p) { if (tree == null) return null; TreePath path = new TreePath(getCurrentPath(), tree); Trees.instance(ct).getScope(path); return super.scan(tree, p); } }.scan(cut, null); ct.generate(); //verify no exceptions during generate } public void testNewClassWithEnclosingNoAnonymous() throws Exception { String code = "public class Test { class Inner { Inner(int i) {} } public static void main(String[] args) { int i = 1; Test c = null; c.new Inner(i++); } }"; final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; JavaFileManager fm = new MemoryOutputJFM(tool.getStandardFileManager(null, null, null)); final JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, fm, null, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject(code))); CompilationUnitTree cut = ct.parse().iterator().next(); ct.analyze(); new TreePathScanner() { @Override public Void visitNewClass(NewClassTree node, Void p) { assertNotNull(node.getEnclosingExpression()); assertEquals(1, node.getArguments().size()); return super.visitNewClass(node, p); } }.scan(cut, null); ct.generate(); //verify no exceptions during generate } public void testNewClassWithoutEnclosingAnonymous() throws Exception { String code = "public class Test { class Inner { Inner(int i) {} } public static void main(String[] args) { int i = 1; new Inner(i++) {}; } }"; final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; JavaFileManager fm = new MemoryOutputJFM(tool.getStandardFileManager(null, null, null)); final JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, fm, null, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject(code))); CompilationUnitTree cut = ct.parse().iterator().next(); ct.analyze(); new TreePathScanner() { @Override public Void visitNewClass(NewClassTree node, Void p) { assertNull(node.getEnclosingExpression()); assertEquals(1, node.getArguments().size()); return super.visitNewClass(node, p); } }.scan(cut, null); ct.generate(); //verify no exceptions during generate } public void testNewClassWithoutEnclosingNoAnonymous() throws Exception { String code = "public class Test { class Inner { Inner(int i) {} } public static void main(String[] args) { int i = 1; new Inner(i++); } }"; final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; JavaFileManager fm = new MemoryOutputJFM(tool.getStandardFileManager(null, null, null)); final JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, fm, null, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject(code))); CompilationUnitTree cut = ct.parse().iterator().next(); ct.analyze(); new TreePathScanner() { @Override public Void visitNewClass(NewClassTree node, Void p) { assertNull(node.getEnclosingExpression()); assertEquals(1, node.getArguments().size()); return super.visitNewClass(node, p); } }.scan(cut, null); ct.generate(); //verify no exceptions during generate } public void testNPEForEmptyTargetOfTypeAnnotation() throws Exception { String code = "class Test { private void t(@NonNull String a) {} } @java.lang.annotation.Target() @interface NonNull { }"; final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; final JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, null, null, Arrays.asList("-bootclasspath", bootPath, "-Xjcov", "-XDshouldStopPolicy=FLOW"), null, Arrays.asList(new MyFileObject(code))); ct.analyze(); } public void testAssignmentToError() throws Exception { String code = "public class Test { public static void main(String[] args) { bbb = 0; } }"; final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; JavaFileManager fm = new MemoryOutputJFM(tool.getStandardFileManager(null, null, null)); final JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, fm, null, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject(code))); final Trees trees = Trees.instance(ct); CompilationUnitTree cut = ct.parse().iterator().next(); ct.analyze(); new TreePathScanner() { @Override public Void visitLiteral(LiteralTree node, Void p) { TypeMirror type = trees.getTypeMirror(getCurrentPath()); assertNotNull(type); assertEquals(TypeKind.INT, type.getKind()); return super.visitLiteral(node, p); } }.scan(cut, null); } private static class MemoryOutputJFM extends ForwardingJavaFileManager { private final Map writtenClasses = new HashMap(); public MemoryOutputJFM(StandardJavaFileManager m) { super(m); } @Override public JavaFileObject getJavaFileForOutput(Location location, final String className, Kind kind, FileObject sibling) throws IOException { if (location.isOutputLocation() && kind == Kind.CLASS) { return new SimpleJavaFileObject(URI.create("myfo:/" + className), kind) { @Override public OutputStream openOutputStream() throws IOException { return new ByteArrayOutputStream() { @Override public void close() throws IOException { super.close(); writtenClasses.put(className, toByteArray()); } }; } }; } else { return super.getJavaFileForOutput(location, className, kind, sibling); } } } } libnb-javaparser-java_7.4.orig/make/netbeans/nb-javac/test/com/sun/tools/javac/comp/CheckTest.java0000644000000000000000000001027512214026367031345 0ustar 00000000000000/* * Copyright 2003-2004 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Sun designates this * particular file as subject to the "Classpath" exception as provided * by Sun in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, * CA 95054 USA or visit www.sun.com if you need additional information or * have any questions. */ package com.sun.tools.javac.comp; import com.sun.tools.javac.api.JavacTaskImpl; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.OutputStream; import java.net.URI; import java.util.Arrays; import java.util.HashSet; import java.util.LinkedList; import java.util.List; import javax.tools.FileObject; import javax.tools.ForwardingJavaFileManager; import javax.tools.JavaCompiler; import javax.tools.JavaFileManager.Location; import javax.tools.JavaFileObject; import javax.tools.JavaFileObject.Kind; import javax.tools.SimpleJavaFileObject; import javax.tools.StandardJavaFileManager; import javax.tools.ToolProvider; import junit.framework.TestCase; /** * * @author Jan Lahoda */ public class CheckTest extends TestCase { public CheckTest(String testName) { super(testName); } static class MyFileObject extends SimpleJavaFileObject { private String text; public MyFileObject(String text) { super(URI.create("myfo:/Test.java"), JavaFileObject.Kind.SOURCE); this.text = text; } @Override public CharSequence getCharContent(boolean ignoreEncodingErrors) { return text; } } public void testErroneousSuperClassDoesNotStopGenerate() throws Exception { String code = "public class Test extends ArrayList {\n" + "}\n"; final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; MemoryOutputJFM m = new MemoryOutputJFM(tool.getStandardFileManager(null, null, null)); final JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, m, null, Arrays.asList("-bootclasspath", bootPath, "-Xjcov", "-XDshouldStopPolicy=GENERATE"), null, Arrays.asList(new MyFileObject(code))); ct.generate(); assertEquals(new HashSet(Arrays.asList("Test")), new HashSet(m.writtenClasses)); } private static class MemoryOutputJFM extends ForwardingJavaFileManager { private List writtenClasses = new LinkedList(); public MemoryOutputJFM(StandardJavaFileManager m) { super(m); } @Override public JavaFileObject getJavaFileForOutput(Location location, final String className, Kind kind, FileObject sibling) throws IOException { if (location.isOutputLocation() && kind == Kind.CLASS) { return new SimpleJavaFileObject(URI.create("myfo:/" + className), kind) { @Override public OutputStream openOutputStream() throws IOException { writtenClasses.add(className); return new ByteArrayOutputStream(); } }; } else { return super.getJavaFileForOutput(location, className, kind, sibling); } } } } libnb-javaparser-java_7.4.orig/make/netbeans/nb-javac/test/com/sun/tools/javac/comp/FlowTest.java0000644000000000000000000002430012214026367031231 0ustar 00000000000000/* * Copyright 2003-2004 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Sun designates this * particular file as subject to the "Classpath" exception as provided * by Sun in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, * CA 95054 USA or visit www.sun.com if you need additional information or * have any questions. */ package com.sun.tools.javac.comp; import com.sun.source.tree.ClassTree; import com.sun.source.tree.CompilationUnitTree; import com.sun.tools.javac.api.JavacTaskImpl; import com.sun.tools.javac.tree.JCTree.JCClassDecl; import com.sun.tools.javac.tree.JCTree.JCCompilationUnit; import com.sun.tools.javac.tree.TreeMaker; import com.sun.tools.javac.util.Context; import com.sun.tools.javac.util.Log; import java.io.IOException; import java.net.URI; import java.util.Arrays; import javax.tools.DiagnosticCollector; import javax.tools.DiagnosticListener; import javax.tools.JavaCompiler; import javax.tools.JavaFileObject; import javax.tools.SimpleJavaFileObject; import javax.tools.ToolProvider; import junit.framework.TestCase; /** * * @author Jan Lahoda */ public class FlowTest extends TestCase { public FlowTest(String testName) { super(testName); } static class MyFileObject extends SimpleJavaFileObject { private String text; public MyFileObject(String text) { super(URI.create("myfo:/Test.java"), JavaFileObject.Kind.SOURCE); this.text = text; } @Override public CharSequence getCharContent(boolean ignoreEncodingErrors) { return text; } } public void test152088() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String code = "package test; public class Test {public void test() {java.util.List l = null;for (String s : !l.isEmpty()) {}}}"; final JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, null, null, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject(code))); ct.analyze(); } public void test152334() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String code = "package test; public class Test {private void test(final int x) {int x = 0; int y = x;}}"; final JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, null, null, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject(code))); ct.analyze(); } public void test153488a() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String code = "package test;\n" + "class Test{\n" + " private final int x;" + " Test() { x = 0; }" + " class Inner { int foo() { return x; } }" + "}"; DiagnosticCollector c = new DiagnosticCollector(); final JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, null, c, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject(code))); CompilationUnitTree cut = ct.parse().iterator().next(); ct.analyze(); assertEquals(c.getDiagnostics().toString(), 0, c.getDiagnostics().size()); ClassTree clazz = (ClassTree) ((ClassTree) cut.getTypeDecls().get(0)).getMembers().get(2); Context context = ct.getContext(); Flow flow = Flow.instance(context); TreeMaker make = TreeMaker.instance(context); Log l = Log.instance(context); l.startPartialReparse(); JavaFileObject prev = l.useSource(cut.getSourceFile()); try { flow.reanalyzeMethod(make.forToplevel((JCCompilationUnit) cut), (JCClassDecl) clazz); } finally { l.useSource(prev); l.endPartialReparse(); } assertEquals(c.getDiagnostics().toString(), 0, c.getDiagnostics().size()); } public void test153488b() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String code = "package test;\n" + "class Test{\n" + " Test() { }" + " class Inner { final int y; int foo() { final int x; return x; } }" + "}"; DiagnosticCollector c = new DiagnosticCollector(); final JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, null, c, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject(code))); CompilationUnitTree cut = ct.parse().iterator().next(); ct.analyze(); assertEquals(c.getDiagnostics().toString(), 2, c.getDiagnostics().size()); ClassTree clazz = (ClassTree) ((ClassTree) cut.getTypeDecls().get(0)).getMembers().get(1); Context context = ct.getContext(); Flow flow = Flow.instance(context); TreeMaker make = TreeMaker.instance(context); Log l = Log.instance(context); l.startPartialReparse(); JavaFileObject prev = l.useSource(cut.getSourceFile()); try { flow.reanalyzeMethod(make.forToplevel((JCCompilationUnit) cut), (JCClassDecl) clazz); } finally { l.useSource(prev); l.endPartialReparse(); } assertEquals(c.getDiagnostics().toString(), 4, c.getDiagnostics().size()); } public void test194658() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String code = "package test;\n" + "class Test{\n" + " public void notify(String message, Throwable exception) {\n" + " (message != null) || (exception != null);\n" + " String str = foo.Bar;\n" + " }\n" + "}"; DiagnosticCollector c = new DiagnosticCollector(); final JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, null, c, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject(code))); CompilationUnitTree cut = ct.parse().iterator().next(); ct.analyze(); } /*requires java.lang.AutoCloseable: */ public void XtestErrorAndAutoCloseable() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String code = "package test; public class Test { { try (InputStream in = new FileInputStream(\"\")) {} }}"; final JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, null, null, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject(code))); assertNotNull("Must run on JDK7 with ARM", ct.getElements().getTypeElement("java.lang.AutoCloseable")); ct.analyze(); } public void testReturnInInitializer() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String code = "package test;\n" + "class Test{\n" + " {\n" + " return ;\n" + " }\n" + "}"; DiagnosticCollector c = new DiagnosticCollector(); final JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, null, c, Arrays.asList("-bootclasspath", bootPath, "-Xjcov", "-XDshouldStopPolicy=FLOW"), null, Arrays.asList(new MyFileObject(code))); CompilationUnitTree cut = ct.parse().iterator().next(); ct.analyze(); } public void testBreakContinueUnresolvedTarget() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String code = "package test;\n" + "class Test{\n" + " private void test() {\n" + " while (true) {\n" + " break undef;\n" + " }\n" + " }\n" + "}"; DiagnosticCollector c = new DiagnosticCollector(); final JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, null, c, Arrays.asList("-bootclasspath", bootPath, "-Xjcov", "-XDshouldStopPolicy=FLOW"), null, Arrays.asList(new MyFileObject(code))); CompilationUnitTree cut = ct.parse().iterator().next(); ct.analyze(); } } libnb-javaparser-java_7.4.orig/make/netbeans/nb-javac/test/com/sun/tools/javac/comp/LowerTest.java0000644000000000000000000002032312214026367031413 0ustar 00000000000000/* * Copyright 2003-2004 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Sun designates this * particular file as subject to the "Classpath" exception as provided * by Sun in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, * CA 95054 USA or visit www.sun.com if you need additional information or * have any questions. */ package com.sun.tools.javac.comp; import com.sun.tools.classfile.ClassFile; import com.sun.tools.classfile.Method; import com.sun.tools.javac.api.JavacTaskImpl; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.OutputStream; import java.net.URI; import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; import javax.tools.FileObject; import javax.tools.ForwardingJavaFileManager; import javax.tools.JavaCompiler; import javax.tools.JavaFileManager.Location; import javax.tools.JavaFileObject; import javax.tools.JavaFileObject.Kind; import javax.tools.SimpleJavaFileObject; import javax.tools.StandardJavaFileManager; import javax.tools.ToolProvider; import junit.framework.TestCase; /** * * @author Jan Lahoda */ public class LowerTest extends TestCase { public LowerTest(String testName) { super(testName); } static class MyFileObject extends SimpleJavaFileObject { private String text; public MyFileObject(String text) { super(URI.create("myfo:/Test.java"), JavaFileObject.Kind.SOURCE); this.text = text; } @Override public CharSequence getCharContent(boolean ignoreEncodingErrors) { return text; } } public void testCorrectAuxiliaryClasses() throws Exception { String code = "public class Test {\n" + " public void test1() {\n" + " new Object() {};\n" + " }\n" + " public void test2(java.lang.annotation.RetentionPolicy p) {\n" + " switch (p) {\n" + " case CLASS: break;\n" + " case SOURCE: break;\n" + " }\n" + " }\n" + "}\n"; final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; MemoryOutputJFM m = new MemoryOutputJFM(tool.getStandardFileManager(null, null, null)); final JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, m, null, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject(code))); ct.generate(); assertEquals(new HashSet(Arrays.asList("Test", "Test$1", "Test$2")), new HashSet(m.writtenClasses.keySet())); } private static class MemoryOutputJFM extends ForwardingJavaFileManager { private final Map writtenClasses = new HashMap(); public MemoryOutputJFM(StandardJavaFileManager m) { super(m); } @Override public JavaFileObject getJavaFileForOutput(Location location, final String className, Kind kind, FileObject sibling) throws IOException { if (location.isOutputLocation() && kind == Kind.CLASS) { return new SimpleJavaFileObject(URI.create("myfo:/" + className), kind) { @Override public OutputStream openOutputStream() throws IOException { return new ByteArrayOutputStream() { @Override public void close() throws IOException { super.close(); writtenClasses.put(className, toByteArray()); } }; } }; } else { return super.getJavaFileForOutput(location, className, kind, sibling); } } } public void testNoMethodsWithoutCodeAttributeOriginal() throws Exception { String code = "public class Test {\n" + " public static void main(String... args) {\n" + " System.err.println(new I());\n" + " }\n" + " private void t() {\n" + " Object o = true ? null : \n" + " new Runnable() {\n" + " @Override public void run() {\n" + " }\n" + " };\n" + " }\n" + " private static final class I {}\n" + "}\n"; final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; MemoryOutputJFM m = new MemoryOutputJFM(tool.getStandardFileManager(null, null, null)); final JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, m, null, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject(code))); ct.generate(); for (Entry e : m.writtenClasses.entrySet()) { ClassFile cf = ClassFile.read(new ByteArrayInputStream(e.getValue())); for (Method method : cf.methods) { assertNotNull(e.getKey() + "." + method.getName(cf.constant_pool), method.attributes.get("Code")); } } } public void testNoMethodsWithoutCodeAttributeWithRepair() throws Exception { String code = "public class Test {\n" + " public Object a() {\n" + " return new I();\n" + " }\n" + " private void t() {\n" + " s;\n" + " new Runnable() {\n" + " @Override public void run() {\n" + " }\n" + " };\n" + " }\n" + " private static final class I {}\n" + "}\n"; final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; MemoryOutputJFM m = new MemoryOutputJFM(tool.getStandardFileManager(null, null, null)); final JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, m, null, Arrays.asList("-bootclasspath", bootPath, "-Xjcov", "-XDshouldStopPolicy=GENERATE"), null, Arrays.asList(new MyFileObject(code))); ct.generate(); assertTrue(m.writtenClasses.keySet().toString(), m.writtenClasses.keySet().contains("Test")); for (Entry e : m.writtenClasses.entrySet()) { ClassFile cf = ClassFile.read(new ByteArrayInputStream(e.getValue())); for (Method method : cf.methods) { assertNotNull(e.getKey() + "." + method.getName(cf.constant_pool), method.attributes.get("Code")); } } } } ././@LongLink0000000000000000000000000000015100000000000011212 Lustar 00000000000000libnb-javaparser-java_7.4.orig/make/netbeans/nb-javac/test/com/sun/tools/javac/comp/MemberEnterTest.javalibnb-javaparser-java_7.4.orig/make/netbeans/nb-javac/test/com/sun/tools/javac/comp/MemberEnterTest.0000644000000000000000000001243312214026367031671 0ustar 00000000000000/* * Copyright 2003-2004 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Sun designates this * particular file as subject to the "Classpath" exception as provided * by Sun in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, * CA 95054 USA or visit www.sun.com if you need additional information or * have any questions. */ package com.sun.tools.javac.comp; import com.sun.source.tree.ClassTree; import com.sun.source.tree.CompilationUnitTree; import com.sun.source.tree.MethodTree; import com.sun.source.tree.VariableTree; import com.sun.source.util.TreePathScanner; import com.sun.source.util.Trees; import com.sun.tools.javac.api.JavacTaskImpl; import global.AnnotationProcessingTest; import java.io.IOException; import java.net.URI; import java.net.URL; import java.util.Arrays; import java.util.LinkedList; import java.util.List; import javax.tools.DiagnosticCollector; import javax.tools.JavaCompiler; import javax.tools.JavaFileObject; import javax.tools.SimpleJavaFileObject; import javax.tools.ToolProvider; import junit.framework.TestCase; /** * * @author lahvac */ public class MemberEnterTest extends TestCase { public MemberEnterTest(String testName) { super(testName); } static class MyFileObject extends SimpleJavaFileObject { private String text; public MyFileObject(String text) { super(URI.create("myfo:/Test.java"), JavaFileObject.Kind.SOURCE); this.text = text; } @Override public CharSequence getCharContent(boolean ignoreEncodingErrors) { return text; } } public void testCouplingAPInteraction() throws Exception { String code = "package test;\n" + "@Deprecated\n" + "public class Test {\n" + " @Deprecated public void test() {}\n" + " @Deprecated public int testF;\n" + "}\n"; final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; URL myself = AnnotationProcessingTest.class.getProtectionDomain().getCodeSource().getLocation(); List options = new LinkedList(); options.addAll(Arrays.asList("-bootclasspath", bootPath, "-source", "1.6", "-classpath", myself.toExternalForm())); options.addAll(Arrays.asList("-processor", "global.ap1.ErrorProducingAP")); final JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, null, null, options, null, Arrays.asList(new MyFileObject(code))); Iterable cuts = ct.parse(); ct.analyze(); final int[] found = new int[1]; new TreePathScanner() { @Override public Void visitMethod(MethodTree node, Void p) { if (node.getName().contentEquals("test")) { assertDeprecated(); found[0]++; } return super.visitMethod(node, p); } @Override public Void visitVariable(VariableTree node, Void p) { assertDeprecated(); found[0]++; return super.visitVariable(node, p); } @Override public Void visitClass(ClassTree node, Void p) { assertDeprecated(); found[0]++; return super.visitClass(node, p); } private void assertDeprecated() { assertTrue(ct.getElements().isDeprecated(Trees.instance(ct).getElement(getCurrentPath()))); } }.scan(cuts, null); assertEquals(3, found[0]); } public void testVeryBrokenLambdaNoException() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String code = "package test; public class Test { private void t() { Iterable map = null; Integer reduce = map.reduce(0, (o, t) -); } }"; DiagnosticCollector dc = new DiagnosticCollector(); final JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, null, dc, Arrays.asList("-bootclasspath", bootPath, "-Xjcov", "-XDshouldStopPolicy=FLOW"), null, Arrays.asList(new com.sun.tools.javac.comp.AttrTest.MyFileObject(code))); ct.analyze(); } } ././@LongLink0000000000000000000000000000015000000000000011211 Lustar 00000000000000libnb-javaparser-java_7.4.orig/make/netbeans/nb-javac/test/com/sun/tools/javac/jvm/ClassReaderTest.javalibnb-javaparser-java_7.4.orig/make/netbeans/nb-javac/test/com/sun/tools/javac/jvm/ClassReaderTest.j0000644000000000000000000002346112214026367031667 0ustar 00000000000000/* * Copyright 2003-2004 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Sun designates this * particular file as subject to the "Classpath" exception as provided * by Sun in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, * CA 95054 USA or visit www.sun.com if you need additional information or * have any questions. */ package com.sun.tools.javac.jvm; import com.sun.source.util.JavacTask; import com.sun.tools.javac.code.Symbol.ClassSymbol; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.net.URI; import java.net.URISyntaxException; import java.util.Arrays; import java.util.HashMap; import java.util.Map; import java.util.Set; import javax.lang.model.element.TypeElement; import javax.lang.model.util.ElementFilter; import javax.tools.FileObject; import javax.tools.ForwardingJavaFileManager; import javax.tools.JavaCompiler; import javax.tools.JavaFileManager; import javax.tools.JavaFileObject; import javax.tools.JavaFileObject.Kind; import javax.tools.SimpleJavaFileObject; import javax.tools.StandardLocation; import javax.tools.ToolProvider; import junit.framework.TestCase; /** * * @author Jan Lahoda */ public class ClassReaderTest extends TestCase { public ClassReaderTest(String testName) { super(testName); } protected void setUp() throws Exception { super.setUp(); } public void testX() throws Exception { byte[] array = "01234567890123456789012345678901234567890123456789".getBytes(); InputStream ins = new TestInputStream(new ByteArrayInputStream(array)); byte[] read = ClassReader.readInputStream(new byte[30], ins); byte[] readCanonical = new byte[array.length]; System.arraycopy(read, 0, readCanonical, 0, array.length); assertTrue(Arrays.toString(read) + "vs." + Arrays.toString(array), Arrays.equals(array, readCanonical)); } private static final class TestInputStream extends InputStream { private InputStream delegateTo; public TestInputStream(InputStream delegateTo) { this.delegateTo = delegateTo; } public int read() throws IOException { //not used by ClassReader.readInputStream: throw new UnsupportedOperationException("Not supported yet."); } @Override public int read(byte[] b, int off, int len) throws IOException { return delegateTo.read(b, off, Math.min(10, len)); } @Override public int available() throws IOException { return 30; } } public void testOrderOnClassPathIsSignificant() throws Exception { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; JFM fileManager = new JFM(tool.getStandardFileManager(null, null, null), ClassJFO.create("Test1", "Test", 1000), ClassJFO.create("Test2", "Test", 2000)); JavacTask ct = (JavacTask)tool.getTask(null, fileManager, null, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList()); TypeElement pack = ct.getElements().getTypeElement("Test"); URI source = ((ClassSymbol) pack).classfile.toUri(); assertTrue(source.toASCIIString(), source.getPath().endsWith("Test1.class")); assertEquals(1, pack.getEnclosedElements().size()); } public void testV48ClassFileWithGenericInfo() throws Exception { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; JFM fileManager = new JFM(tool.getStandardFileManager(null, null, null), ClassJFO.create("V48gen", "V48gen", 1000)); JavacTask ct = (JavacTask)tool.getTask(null, fileManager, null, Arrays.asList("-bootclasspath", bootPath, "-XDide"), null, Arrays.asList()); TypeElement v48gen = ct.getElements().getTypeElement("V48gen"); assertNotNull(v48gen); assertEquals(1, v48gen.getTypeParameters().size()); } public void testMethodParamAnnotations() throws Exception { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; JFM fileManager = new JFM(tool.getStandardFileManager(null, null, null)); JavacTask ct = (JavacTask)tool.getTask(null, fileManager, null, Arrays.asList("-bootclasspath", bootPath, "-XDide"), null, Arrays.asList(new SourceFileObject("public class Test { public static void t(@Deprecated int p) { } }"))); ct.generate(); JFM readingFileManager = new JFM(tool.getStandardFileManager(null, null, null), new ClassJFO(new URI("mem://Test.class"), "Test", 0, fileManager.writtenClasses.get("Test"))); JavacTask readCT = (JavacTask)tool.getTask(null, readingFileManager, null, Arrays.asList("-bootclasspath", bootPath, "-XDide"), null, null); TypeElement test = readCT.getElements().getTypeElement("Test"); assertNotNull(ElementFilter.methodsIn(test.getEnclosedElements()).get(0).getParameters().get(0).getAnnotation(Deprecated.class)); } private static final class JFM extends ForwardingJavaFileManager { private final Iterable classes; public JFM(JavaFileManager delegate, JavaFileObject... classes) { super(delegate); this.classes = Arrays.asList(classes); } @Override public Iterable list(Location location, String packageName, Set kinds, boolean recurse) throws IOException { if (StandardLocation.CLASS_PATH == location && "".equals(packageName) && kinds.contains(Kind.CLASS)) { return classes; } Iterable list = super.list(location, packageName, kinds, recurse); return list; } @Override public String inferBinaryName(Location location, JavaFileObject file) { if (file instanceof ClassJFO) { return ((ClassJFO) file).binaryName; } return super.inferBinaryName(location, file); } private final Map writtenClasses = new HashMap(); @Override public JavaFileObject getJavaFileForOutput(Location location, final String className, Kind kind, FileObject sibling) throws IOException { if (location.isOutputLocation() && kind == Kind.CLASS) { return new SimpleJavaFileObject(URI.create("myfo:/" + className), kind) { @Override public OutputStream openOutputStream() throws IOException { return new ByteArrayOutputStream() { @Override public void close() throws IOException { super.close(); writtenClasses.put(className, toByteArray()); } }; } }; } else { return super.getJavaFileForOutput(location, className, kind, sibling); } } } private static final class ClassJFO extends SimpleJavaFileObject { private final String binaryName; private final long lastModified; private final byte[] data; public ClassJFO(URI uri, String binaryName, long lastModified) { this(uri, binaryName, lastModified, null); } public ClassJFO(URI uri, String binaryName, long lastModified, byte[] data) { super(uri, Kind.CLASS); this.binaryName = binaryName; this.lastModified = lastModified; this.data = data; } public static final ClassJFO create(String name, String binName, long lastModified) throws URISyntaxException { return new ClassJFO(ClassReaderTest.class.getResource(name + ".class").toURI(), binName, lastModified); } @Override public InputStream openInputStream() throws IOException { return data != null ? new ByteArrayInputStream(data) : uri.toURL().openStream(); } @Override public long getLastModified() { return lastModified; } } private static class SourceFileObject extends SimpleJavaFileObject { private String text; public SourceFileObject(String text) { this("Test", text); } public SourceFileObject(String name, String text) { super(URI.create("myfo:/" + name + ".java"), JavaFileObject.Kind.SOURCE); this.text = text; } @Override public CharSequence getCharContent(boolean ignoreEncodingErrors) { return text; } } } libnb-javaparser-java_7.4.orig/make/netbeans/nb-javac/test/com/sun/tools/javac/jvm/Test1.class0000644000000000000000000000026612214026367030511 0ustar 00000000000000Êþº¾2    ()VCodeLineNumberTable SourceFile Test.java Testjava/lang/Object!*·± libnb-javaparser-java_7.4.orig/make/netbeans/nb-javac/test/com/sun/tools/javac/jvm/Test2.class0000644000000000000000000000031012214026367030500 0ustar 00000000000000Êþº¾2   badI()VCodeLineNumberTable SourceFile Test.java Testjava/lang/Object!*·±   libnb-javaparser-java_7.4.orig/make/netbeans/nb-javac/test/com/sun/tools/javac/jvm/V48gen.class0000644000000000000000000000055512214026367030565 0ustar 00000000000000Êþº¾0 ()VCodeLineNumberTableLocalVariableTablethisLV48gen;LocalVariableTypeTable LV48gen; Signature(Ljava/lang/Object; SourceFile V48gen.java V48genjava/lang/Object!A*·±    ././@LongLink0000000000000000000000000000016000000000000011212 Lustar 00000000000000libnb-javaparser-java_7.4.orig/make/netbeans/nb-javac/test/com/sun/tools/javac/parser/DocCommentParserTest.javalibnb-javaparser-java_7.4.orig/make/netbeans/nb-javac/test/com/sun/tools/javac/parser/DocCommentPars0000644000000000000000000001616312214026367031766 0ustar 00000000000000package com.sun.tools.javac.parser; import com.sun.source.doctree.DocCommentTree; import com.sun.source.doctree.DocTree; import com.sun.source.tree.ClassTree; import com.sun.source.tree.CompilationUnitTree; import com.sun.source.util.DocSourcePositions; import com.sun.source.util.DocTreeScanner; import com.sun.source.util.DocTrees; import com.sun.source.util.TreePath; import com.sun.tools.javac.api.JavacTaskImpl; import java.io.IOException; import java.net.URI; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import javax.tools.JavaCompiler; import javax.tools.JavaFileObject; import javax.tools.SimpleJavaFileObject; import javax.tools.ToolProvider; import junit.framework.TestCase; /** * * @author lahvac */ public class DocCommentParserTest extends TestCase { public DocCommentParserTest(String testName) { super(testName); } public void testErrorRecovery1() throws IOException { doTestErrorRecovery("{@link\n" + "{@link Object\n" + "{@link Object#\n" + "{@link Object#wait(lo\n" + "{@link Object#wait(long)\n" + "@see\n" + "@see Object\n" + "@see Object#\n" + "@see Object#wait(lo\n" + "@see Object#wait(long)\n", "DOC_COMMENT:{@link\n" + "{@link Object\n" + "{@link Object#\n" + "{@link Object#wait(lo\n" + "{@link Object#wait(long)\n" + "@see\n" + "@see Object\n" + "@see Object#\n" + "@see Object#wait(lo\n" + "@see Object#wait(long)", "LINK:{@link\n", "REFERENCE:", "LINK:{@link Object\n", "REFERENCE:Object", "LINK:{@link Object#\n", "REFERENCE:Object#", "LINK:{@link Object#wait(lo\n", "REFERENCE:Object#wait(lo\n", "LINK:{@link Object#wait(long)\n", "REFERENCE:Object#wait(long)", "SEE:@see", "SEE:@see Object", "REFERENCE:Object", "SEE:@see Object#", "REFERENCE:Object#", "SEE:@see Object#wait(lo\n", "REFERENCE:Object#wait(lo\n", "SEE:@see Object#wait(long)", "REFERENCE:Object#wait(long)" ); } public void testErrorRecoveryValue() throws IOException { doTestErrorRecovery("{@value Math#PI\n" + "@see Object#wait(long)\n", "DOC_COMMENT:{@value Math#PI\n" + "@see Object#wait(long)", "VALUE:{@value Math#PI\n", "REFERENCE:Math#PI", "SEE:@see Object#wait(long)", "REFERENCE:Object#wait(long)" ); } public void test229748() throws IOException { doTestErrorRecovery("{@literal http://wikis.sun.com/display/mlvm/ProjectCoinProposal\n" + "@see String\n", "DOC_COMMENT:{@literal http://wikis.sun.com/display/mlvm/ProjectCoinProposal\n" + "@see String", "LITERAL:{@literal http://wikis.sun.com/display/mlvm/ProjectCoinProposal\n", "TEXT:http://wikis.sun.com/display/mlvm/ProjectCoinProposal\n", "SEE:@see String", "REFERENCE:String"); } public void test229725() throws IOException { doTestErrorRecovery("{@link http://wikis.sun.com/display/mlvm/ProjectCoinProposal}\n" + "@see http://wikis.sun.com/display/mlvm/ProjectCoinProposal\n", "DOC_COMMENT:{@link http://wikis.sun.com/display/mlvm/ProjectCoinProposal}\n" + "@see http://wikis.sun.com/display/mlvm/ProjectCoinProposal", "LINK:{@link http://wikis.sun.com/display/mlvm/ProjectCoinProposal}", "REFERENCE:http://wikis.sun.com/display/mlvm/ProjectCoinProposal", "SEE:@see http://wikis.sun.com/display/mlvm/ProjectCoinProposal", "REFERENCE:http://wikis.sun.com/display/mlvm/ProjectCoinProposal" ); } public void testInlineSpan() throws IOException { doTestErrorRecovery("{@literal code}\n", "DOC_COMMENT:{@literal code}", "LITERAL:{@literal code}", "TEXT:code" ); } private void doTestErrorRecovery(String javadocCode, String... golden) throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; final String code = "package test; /** " + javadocCode + " */public class Test {}"; JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, null, null, Arrays.asList("-bootclasspath", bootPath, "-Xjcov", "-XDkeepComments=true", "-XDbreakDocCommentParsingOnError=false"), null, Arrays.asList(new MyFileObject(code))); final CompilationUnitTree cut = ct.parse().iterator().next(); DocTrees trees = DocTrees.instance(ct); final DocSourcePositions pos = trees.getSourcePositions(); ClassTree clazz = (ClassTree) cut.getTypeDecls().get(0); final DocCommentTree dct = trees.getDocCommentTree(TreePath.getPath(cut, clazz)); final List result = new ArrayList(); new DocTreeScanner() { @Override public Void scan(DocTree node, Object p) { if (node == null) return null; int start = (int) pos.getStartPosition(cut, dct, node); int end = (int) pos.getEndPosition(cut, dct, node); result.add(node.getKind() + ":" + code.substring(start, end)); return super.scan(node, p); } }.scan(dct, null); assertEquals(Arrays.asList(golden), result); } private static class MyFileObject extends SimpleJavaFileObject { private String text; public MyFileObject(String text) { super(URI.create("myfo:/Test.java"), JavaFileObject.Kind.SOURCE); this.text = text; } @Override public CharSequence getCharContent(boolean ignoreEncodingErrors) { return text; } } } ././@LongLink0000000000000000000000000000015300000000000011214 Lustar 00000000000000libnb-javaparser-java_7.4.orig/make/netbeans/nb-javac/test/com/sun/tools/javac/parser/JavacParserTest.javalibnb-javaparser-java_7.4.orig/make/netbeans/nb-javac/test/com/sun/tools/javac/parser/JavacParserTes0000644000000000000000000010157212214026367031764 0ustar 00000000000000/* * Copyright 2003-2004 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Sun designates this * particular file as subject to the "Classpath" exception as provided * by Sun in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, * CA 95054 USA or visit www.sun.com if you need additional information or * have any questions. */ package com.sun.tools.javac.parser; import com.sun.source.tree.BinaryTree; import com.sun.source.tree.BlockTree; import com.sun.source.tree.ClassTree; import com.sun.source.tree.CompilationUnitTree; import com.sun.source.tree.ExpressionStatementTree; import com.sun.source.tree.ExpressionTree; import com.sun.source.tree.LambdaExpressionTree; import com.sun.source.tree.MethodInvocationTree; import com.sun.source.tree.MethodTree; import com.sun.source.tree.ModifiersTree; import com.sun.source.tree.StatementTree; import com.sun.source.tree.Tree; import com.sun.source.tree.Tree.Kind; import com.sun.source.tree.VariableTree; import com.sun.source.tree.WhileLoopTree; import com.sun.source.util.SourcePositions; import com.sun.source.util.TreePathScanner; import com.sun.source.util.TreeScanner; import com.sun.source.util.Trees; import com.sun.tools.javac.api.JavacTaskImpl; import com.sun.tools.javac.tree.JCTree; import java.io.IOException; import java.net.URI; import java.util.ArrayList; import java.util.Arrays; import java.util.LinkedList; import java.util.List; import javax.lang.model.element.Modifier; import javax.tools.Diagnostic; import javax.tools.DiagnosticCollector; import javax.tools.DiagnosticListener; import javax.tools.JavaCompiler; import javax.tools.JavaFileObject; import javax.tools.SimpleJavaFileObject; import javax.tools.ToolProvider; import junit.framework.TestCase; public class JavacParserTest extends TestCase { public JavacParserTest(String testName) { super(testName); } static class MyFileObject extends SimpleJavaFileObject { private String text; public MyFileObject(String text) { super(URI.create("myfo:/Test.java"), JavaFileObject.Kind.SOURCE); this.text = text; } @Override public CharSequence getCharContent(boolean ignoreEncodingErrors) { return text; } } public void testPositionForSuperConstructorCalls() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String code = "package test; public class Test {public Test() {super();}}"; JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, null, null, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject(code))); CompilationUnitTree cut = ct.parse().iterator().next(); SourcePositions pos = Trees.instance(ct).getSourcePositions(); MethodTree method = (MethodTree) ((ClassTree) cut.getTypeDecls().get(0)).getMembers().get(0); ExpressionStatementTree es = (ExpressionStatementTree) method.getBody().getStatements().get(0); assertEquals(72 - 24, pos.getStartPosition(cut, es)); assertEquals(80 - 24, pos.getEndPosition(cut, es)); MethodInvocationTree mit = (MethodInvocationTree) es.getExpression(); assertEquals(72 - 24, pos.getStartPosition(cut, mit)); assertEquals(79 - 24, pos.getEndPosition(cut, mit)); assertEquals(72 - 24, pos.getStartPosition(cut, mit.getMethodSelect())); assertEquals(77 - 24, pos.getEndPosition(cut, mit.getMethodSelect())); } public void testPositionForEnumModifiers() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String code = "package test; public enum Test {A;}"; JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, null, null, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject(code))); CompilationUnitTree cut = ct.parse().iterator().next(); SourcePositions pos = Trees.instance(ct).getSourcePositions(); ClassTree clazz = (ClassTree) cut.getTypeDecls().get(0); ModifiersTree mt = clazz.getModifiers(); assertEquals(38 - 24, pos.getStartPosition(cut, mt)); assertEquals(44 - 24, pos.getEndPosition(cut, mt)); } // public void testErroneousMemberSelectPositions() throws IOException { // final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N // final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); // assert tool != null; // // String code = "package test; public class Test { public void test() { new Runnable() {}. } public Test() {}}"; // // JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, null, null, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject(code))); // CompilationUnitTree cut = ct.parse().iterator().next(); // SourcePositions pos = Trees.instance(ct).getSourcePositions(); // // ClassTree clazz = (ClassTree) cut.getTypeDecls().get(0); // ExpressionStatementTree est = (ExpressionStatementTree) ((MethodTree) clazz.getMembers().get(0)).getBody().getStatements().get(0); // // assertEquals(79 - 24, pos.getStartPosition(cut, est)); // assertEquals(97 - 24, pos.getEndPosition(cut, est)); // } public void testNewClassWithEnclosing() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String code = "package test; class Test { class d {} private void method() { Object o = Test.this.new d(); } }"; JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, null, null, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject(code))); CompilationUnitTree cut = ct.parse().iterator().next(); SourcePositions pos = Trees.instance(ct).getSourcePositions(); ClassTree clazz = (ClassTree) cut.getTypeDecls().get(0); ExpressionTree est = ((VariableTree) ((MethodTree) clazz.getMembers().get(1)).getBody().getStatements().get(0)).getInitializer(); assertEquals(97 - 24, pos.getStartPosition(cut, est)); assertEquals(114 - 24, pos.getEndPosition(cut, est)); } public void testPreferredPositionForBinaryOp() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String code = "package test; public class Test {private void test() {Object o = null; boolean b = o != null && o instanceof String;} private Test() {}}"; JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, null, null, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject(code))); CompilationUnitTree cut = ct.parse().iterator().next(); ClassTree clazz = (ClassTree) cut.getTypeDecls().get(0); MethodTree method = (MethodTree) clazz.getMembers().get(0); VariableTree condSt = (VariableTree) method.getBody().getStatements().get(1); BinaryTree cond = (BinaryTree) condSt.getInitializer(); JCTree condJC = (JCTree) cond; assertEquals(117 - 24, condJC.pos); } public void testPositionBrokenSource126732a() throws IOException { String[] commands = new String[] { "return Runnable()", "do { } while (true)", "throw UnsupportedOperationException()", "assert true", "1 + 1", "vartype varname", }; for (String command : commands) { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String code = "package test;\n" + "public class Test {\n" + " public static void test() {\n" + " " + command + " {\n" + " new Runnable() {\n" + " };\n" + " }\n" + "}"; JavacTaskImpl ct = (JavacTaskImpl) tool.getTask(null, null, null, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject(code))); CompilationUnitTree cut = ct.parse().iterator().next(); ClassTree clazz = (ClassTree) cut.getTypeDecls().get(0); MethodTree method = (MethodTree) clazz.getMembers().get(0); List statements = method.getBody().getStatements(); StatementTree ret = statements.get(0); StatementTree block = statements.get(1); Trees t = Trees.instance(ct); assertEquals(command, code.indexOf(command + " {") + (command + " ").length(), t.getSourcePositions().getEndPosition(cut, ret)); assertEquals(command, code.indexOf(command + " {") + (command + " ").length(), t.getSourcePositions().getStartPosition(cut, block)); } } public void testPositionBrokenSource126732b() throws IOException { String[] commands = new String[] { "break", "break A", "continue ", "continue A", }; for (String command : commands) { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String code = "package test;\n" + "public class Test {\n" + " public static void test() {\n" + " while (true) {\n" + " " + command + " {\n" + " new Runnable() {\n" + " };\n" + " }\n" + " }\n" + "}"; JavacTaskImpl ct = (JavacTaskImpl) tool.getTask(null, null, null, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject(code))); CompilationUnitTree cut = ct.parse().iterator().next(); ClassTree clazz = (ClassTree) cut.getTypeDecls().get(0); MethodTree method = (MethodTree) clazz.getMembers().get(0); List statements = ((BlockTree) ((WhileLoopTree) method.getBody().getStatements().get(0)).getStatement()).getStatements(); StatementTree ret = statements.get(0); StatementTree block = statements.get(1); Trees t = Trees.instance(ct); assertEquals(command, code.indexOf(command + " {") + (command + " ").length(), t.getSourcePositions().getEndPosition(cut, ret)); assertEquals(command, code.indexOf(command + " {") + (command + " ").length(), t.getSourcePositions().getStartPosition(cut, block)); } } public void testErrorRecoveryForEnhancedForLoop142381() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String code = "package test; class Test { private void method() { java.util.Set s = null; for (a : s) {} } }"; final List> errors = new LinkedList>(); JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, null, new DiagnosticListener() { public void report(Diagnostic diagnostic) { errors.add(diagnostic); } }, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject(code))); CompilationUnitTree cut = ct.parse().iterator().next(); ClassTree clazz = (ClassTree) cut.getTypeDecls().get(0); StatementTree forStatement = ((MethodTree) clazz.getMembers().get(0)).getBody().getStatements().get(1); assertEquals(Kind.ENHANCED_FOR_LOOP, forStatement.getKind()); assertFalse(errors.isEmpty()); } public void testPositionAnnotationNoPackage187551() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String code = "\n@interface Test {}"; JavacTaskImpl ct = (JavacTaskImpl) tool.getTask(null, null, null, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject(code))); CompilationUnitTree cut = ct.parse().iterator().next(); ClassTree clazz = (ClassTree) cut.getTypeDecls().get(0); Trees t = Trees.instance(ct); assertEquals(1, t.getSourcePositions().getStartPosition(cut, clazz)); } public void testPositionsSane() throws IOException { performPositionsSanityTest("package test; class Test { private void method() { java.util.List> l; } }"); performPositionsSanityTest("package test; class Test { private void method() { java.util.List> l; } }"); performPositionsSanityTest("package test; class Test { private void method() { java.util.List> l; } }"); performPositionsSanityTest("package test; class Test { private void method() { java.util.List l = null; l.reduce(null, (String s1, String s2) -> { return s1; }); } }"); } private void performPositionsSanityTest(String code) throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; final List> errors = new LinkedList>(); JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, null, new DiagnosticListener() { public void report(Diagnostic diagnostic) { errors.add(diagnostic); } }, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject(code))); final CompilationUnitTree cut = ct.parse().iterator().next(); final Trees trees = Trees.instance(ct); new TreeScanner() { private long parentStart = 0; private long parentEnd = Integer.MAX_VALUE; @Override public Void scan(Tree node, Void p) { if (node == null) return null; long start = trees.getSourcePositions().getStartPosition(cut, node); if (start == (-1)) return null; //synthetic tree assertTrue(node.toString() + ":" + start + "/" + parentStart, parentStart <= start); long prevParentStart = parentStart; parentStart = start; long end = trees.getSourcePositions().getEndPosition(cut, node); assertTrue(node.toString() + ":" + end + "/" + parentEnd, end <= parentEnd); long prevParentEnd = parentEnd; parentEnd = end; super.scan(node, p); parentStart = prevParentStart; parentEnd = prevParentEnd; return null; } }.scan(cut, null); } public void testCorrectWilcardPositions() throws IOException { performWildcardPositionsTest("package test; import java.util.List; class Test { private void method() { List> l; } }", Arrays.asList("List> l;", "List>", "List", "? extends List", "List", "List", "? extends String", "String")); performWildcardPositionsTest("package test; import java.util.List; class Test { private void method() { List> l; } }", Arrays.asList("List> l;", "List>", "List", "? super List", "List", "List", "? super String", "String")); performWildcardPositionsTest("package test; import java.util.List; class Test { private void method() { List> l; } }", Arrays.asList("List> l;", "List>", "List", "? super List", "List", "List", "?")); performWildcardPositionsTest("package test; import java.util.List; class Test { private void method() { List>> l; } }", Arrays.asList("List>> l;", "List>>", "List", "? extends List>", "List>", "List", "? extends List", "List", "List", "? extends String", "String")); performWildcardPositionsTest("package test; import java.util.List; class Test { private void method() { List>> l; } }", Arrays.asList("List>> l;", "List>>", "List", "? extends List>", "List>", "List", "? extends List", "List", "List", "? extends String", "String")); } public void performWildcardPositionsTest(final String code, List golden) throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; final List> errors = new LinkedList>(); JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, null, new DiagnosticListener() { public void report(Diagnostic diagnostic) { errors.add(diagnostic); } }, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject(code))); final CompilationUnitTree cut = ct.parse().iterator().next(); final List content = new LinkedList(); final Trees trees = Trees.instance(ct); new TreeScanner() { @Override public Void scan(Tree node, Void p) { if (node == null) return null; long start = trees.getSourcePositions().getStartPosition(cut, node); if (start == (-1)) return null; //synthetic tree long end = trees.getSourcePositions().getEndPosition(cut, node); content.add(code.substring((int) start, (int) end)); return super.scan(node, p); } }.scan(((MethodTree) ((ClassTree) cut.getTypeDecls().get(0)).getMembers().get(0)).getBody().getStatements().get(0), null); assertEquals(golden.toString(), content.toString()); } public void testStartPositionForMethodWithoutModifiers() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String code = "package t; class Test { void t() {} }"; JavacTaskImpl ct = (JavacTaskImpl) tool.getTask(null, null, null, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject(code))); CompilationUnitTree cut = ct.parse().iterator().next(); ClassTree clazz = (ClassTree) cut.getTypeDecls().get(0); MethodTree mt = (MethodTree) clazz.getMembers().get(0); Trees t = Trees.instance(ct); int start = (int) t.getSourcePositions().getStartPosition(cut, mt); int end = (int) t.getSourcePositions().getEndPosition(cut, mt); assertEquals(" void t() {}", code.substring(start, end)); } public void testStartPositionEnumConstantInit() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String code = "package t; enum Test { AAA; }"; JavacTaskImpl ct = (JavacTaskImpl) tool.getTask(null, null, null, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject(code))); CompilationUnitTree cut = ct.parse().iterator().next(); ClassTree clazz = (ClassTree) cut.getTypeDecls().get(0); VariableTree enumAAA = (VariableTree) clazz.getMembers().get(0); Trees t = Trees.instance(ct); int start = (int) t.getSourcePositions().getStartPosition(cut, enumAAA.getInitializer()); assertEquals("; }", code.substring(start)); } public void testVariableInIfThen1() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String code = "package t; class Test { private static void t(String name) { if (name != null) String nn = name.trim(); } }"; DiagnosticCollector coll = new DiagnosticCollector(); JavacTaskImpl ct = (JavacTaskImpl) tool.getTask(null, null, coll, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject(code))); ct.parse(); List codes = new LinkedList(); for (Diagnostic d : coll.getDiagnostics()) { codes.add(d.getCode()); } assertEquals(Arrays.asList("compiler.err.variable.not.allowed"), codes); } public void testVariableInIfThen2() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String code = "package t; class Test { private static void t(String name) { if (name != null) class X {} } }"; DiagnosticCollector coll = new DiagnosticCollector(); JavacTaskImpl ct = (JavacTaskImpl) tool.getTask(null, null, coll, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject(code))); ct.parse(); List codes = new LinkedList(); for (Diagnostic d : coll.getDiagnostics()) { codes.add(d.getCode()); } assertEquals(Arrays.asList("compiler.err.class.not.allowed"), codes); } public void testVariableInIfThen3() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String code = "package t; class Test { private static void t(String name) { if (name != null) abstract } }"; DiagnosticCollector coll = new DiagnosticCollector(); JavacTaskImpl ct = (JavacTaskImpl) tool.getTask(null, null, coll, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject(code))); ct.parse(); List codes = new LinkedList(); for (Diagnostic d : coll.getDiagnostics()) { codes.add(d.getCode()); } assertEquals(Arrays.asList("compiler.err.expected3"), codes);//TODO: was "compiler.err.illegal.start.of.expr" before JDK8 merge // assertEquals(Arrays.asList("compiler.err.illegal.start.of.expr"), codes); } //see javac bug #6882235, NB bug #98234: public void testMissingExponent() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String code = "\nclass Test { { System.err.println(0e); } }"; JavacTaskImpl ct = (JavacTaskImpl) tool.getTask(null, null, null, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"/*, "-XDshouldStopPolicy=ENTER"*/), null, Arrays.asList(new MyFileObject(code))); assertNotNull(ct.parse().iterator().next()); } public void testTryResourcePos() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; final String code = "package t; class Test { { try (java.io.InputStream in = null) { } } }"; JavacTaskImpl ct = (JavacTaskImpl) tool.getTask(null, null, null, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject(code))); CompilationUnitTree cut = ct.parse().iterator().next(); new TreeScanner() { @Override public Void visitVariable(VariableTree node, Void p) { if ("in".contentEquals(node.getName())) { JCTree.JCVariableDecl var = (JCTree.JCVariableDecl) node; assertEquals("in = null) { } } }", code.substring(var.pos)); } return super.visitVariable(node, p); } }.scan(cut, null); } public void testVarPos() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; final String code = "package t; class Test { { java.io.InputStream in = null; } }"; JavacTaskImpl ct = (JavacTaskImpl) tool.getTask(null, null, null, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject(code))); CompilationUnitTree cut = ct.parse().iterator().next(); new TreeScanner() { @Override public Void visitVariable(VariableTree node, Void p) { if ("in".contentEquals(node.getName())) { JCTree.JCVariableDecl var = (JCTree.JCVariableDecl) node; assertEquals("in = null; } }", code.substring(var.pos)); } return super.visitVariable(node, p); } }.scan(cut, null); } public void testLambdaPositions() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; final String code = "package test; class Test { private void method() { java.util.List l = null; l.reduce(null, (String s1, String s2) -> { return s1 + s2; }); } }"; JavacTaskImpl ct = (JavacTaskImpl) tool.getTask(null, null, null, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject(code))); final CompilationUnitTree cut = ct.parse().iterator().next(); final Trees trees = Trees.instance(ct); final List content = new ArrayList(); new TreePathScanner() { boolean record; @Override public Void scan(Tree node, Void p) { if (node == null) return null; if (record) { long start = trees.getSourcePositions().getStartPosition(cut, node); if (start == (-1)) { return null; //synthetic tree } long end = trees.getSourcePositions().getEndPosition(cut, node); content.add(code.substring((int) start, (int) end)); } return super.scan(node, p); } @Override public Void visitLambdaExpression(LambdaExpressionTree node, Void p) { boolean old = record; record = true; try { return super.visitLambdaExpression(node, p); } finally { record = old; } } }.scan(cut, null); assertEquals(Arrays.asList("String s1", "String", "String s2", "String", "{ return s1 + s2; }", "return s1 + s2;", "s1 + s2", "s1", "s2"), content); } public void testInfiniteParsing() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; final String code = "111\npackage t; class Test { }"; JavacTaskImpl ct = (JavacTaskImpl) tool.getTask(null, null, null, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject(code))); CompilationUnitTree cut = ct.parse().iterator().next(); assertNotNull(cut); } public void testShouldNotSkipFirstStrictFP8005931() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; final String code = "strictfp class Test { }"; JavacTaskImpl ct = (JavacTaskImpl) tool.getTask(null, null, null, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject(code))); CompilationUnitTree cut = ct.parse().iterator().next(); assertTrue(((ClassTree) cut.getTypeDecls().get(0)).getModifiers().getFlags().contains(Modifier.STRICTFP)); } } libnb-javaparser-java_7.4.orig/make/netbeans/nb-javac/test/global/AP208917Test.java0000644000000000000000000001116312214026367026013 0ustar 00000000000000/* * Copyright 2003-2004 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Sun designates this * particular file as subject to the "Classpath" exception as provided * by Sun in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, * CA 95054 USA or visit www.sun.com if you need additional information or * have any questions. */ package global; import com.sun.source.util.JavacTask; import java.io.IOException; import java.net.URI; import java.util.ArrayList; import java.util.Arrays; import java.util.LinkedList; import java.util.List; import java.util.Set; import javax.annotation.processing.AbstractProcessor; import javax.annotation.processing.RoundEnvironment; import javax.annotation.processing.SupportedAnnotationTypes; import javax.annotation.processing.SupportedSourceVersion; import javax.lang.model.SourceVersion; import javax.lang.model.element.Element; import javax.lang.model.element.TypeElement; import javax.tools.Diagnostic; import javax.tools.DiagnosticCollector; import javax.tools.JavaCompiler; import javax.tools.JavaFileObject; import javax.tools.SimpleJavaFileObject; import javax.tools.ToolProvider; import org.junit.Assert; import org.junit.Test; /** * * @author lahvac */ @SupportedSourceVersion(SourceVersion.RELEASE_6) @SupportedAnnotationTypes("*") public class AP208917Test extends AbstractProcessor { @Override public boolean process(Set annotations, RoundEnvironment roundEnv) { for (Element e : roundEnv.getRootElements()) { processingEnv.getMessager().printMessage(Diagnostic.Kind.WARNING, "1st warning without source"); processingEnv.getMessager().printMessage(Diagnostic.Kind.WARNING, "warning with source", e); processingEnv.getMessager().printMessage(Diagnostic.Kind.WARNING, "2nd warning without source"); } return false; } @Test public void performTest() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; DiagnosticCollector diagnostic = new DiagnosticCollector(); List options = new LinkedList(); options.addAll(Arrays.asList("-bootclasspath", bootPath, "-source", "1.6", "-classpath", System.getProperty("java.class.path"))); options.addAll(Arrays.asList("-processor", AP208917Test.class.getName())); JavacTask ct = (JavacTask)tool.getTask(null, null, diagnostic, options, null, Arrays.asList(new MyFileObject("class Test {}"))); ct.analyze(); List actualErrors = new ArrayList(); for (Diagnostic d : diagnostic.getDiagnostics()) { String diagnosticSource; if (d.getSource() != null) { diagnosticSource = d.getSource().toUri().toString(); diagnosticSource = diagnosticSource.substring(diagnosticSource.lastIndexOf('/') + 1); } else { diagnosticSource = ""; } actualErrors.add(diagnosticSource + ":" + d.getStartPosition() + "-" + d.getEndPosition() + ":" + d.getMessage(null)); } Assert.assertEquals(Arrays.asList(":-1--1:1st warning without source", "Test.java:0-13:warning with source", ":-1--1:2nd warning without source"), actualErrors); } static class MyFileObject extends SimpleJavaFileObject { private String text; public MyFileObject(String text) { super(URI.create("myfo:/Test.java"), JavaFileObject.Kind.SOURCE); this.text = text; } @Override public CharSequence getCharContent(boolean ignoreEncodingErrors) { return text; } } } libnb-javaparser-java_7.4.orig/make/netbeans/nb-javac/test/global/AnnotationProcessingTest.java0000644000000000000000000002630312214026367031171 0ustar 00000000000000/* * Copyright 2003-2004 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Sun designates this * particular file as subject to the "Classpath" exception as provided * by Sun in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, * CA 95054 USA or visit www.sun.com if you need additional information or * have any questions. */ package global; import com.sun.source.util.JavacTask; import com.sun.tools.javac.Main; import com.sun.tools.javac.api.JavacTaskImpl; import global.ap1.AP; import global.ap1.ClassBasedAP; import global.ap1.ErrorProducingAP; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.net.URI; import java.net.URL; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.LinkedList; import java.util.List; import javax.lang.model.element.Element; import javax.lang.model.element.TypeElement; import javax.tools.Diagnostic; import javax.tools.DiagnosticCollector; import javax.tools.JavaCompiler; import javax.tools.JavaFileObject; import javax.tools.SimpleJavaFileObject; import javax.tools.ToolProvider; import static junit.framework.Assert.assertEquals; import junit.framework.TestCase; /** * * @author lahvac */ public class AnnotationProcessingTest extends TestCase { public AnnotationProcessingTest(String name) { super(name); } static class MyFileObject extends SimpleJavaFileObject { private String text; public MyFileObject(String text) { super(URI.create("myfo:/Test.java"), JavaFileObject.Kind.SOURCE); this.text = text; } @Override public CharSequence getCharContent(boolean ignoreEncodingErrors) { return text; } } public void testNoFalseEnterErrors() throws IOException { String code = "package test; @global.ap1.Ann(fqnToGenerate=\"test.G\", content=\"package test; public class G {}\") public class Test extends G {}"; performErrorsTest(code, 0); } public void testNoFalseEnterWarnings() throws IOException { String code = "package test; public class Test { @SuppressWarnings(\"deprecation\") public java.rmi.server.Skeleton t() { return null; } }"; performErrorsTest(code, Arrays.asList("-Xlint"), 0); } public void testCorrectEnterErrors() throws IOException { String code = "package test; @global.ap1.Ann(fqnToGenerate=\"test.H\", content=\"package test; public class H {}\") public class Test extends Undefined {}"; performErrorsTest(code, 1); } public void testDuplicatedErrorsReported() throws IOException { String code = "package test; @global.ap1.Ann(fqnToGenerate=\"test.H\", content=\"package test; public class H {}\") public class Test {}"; performAPErrorsTest(code, ErrorProducingAP.class.getName(), new FileContent[0], "14-117:message 1", "14-117:message 2", "14-117:message 3"); } public void testDependentAP() throws IOException { String code = "package test; public class Test { Auxiliary aux; }"; String auxiliary = "package test; @global.ap1.Ann(fqnToGenerate=\"test.G\", content=\"package test; public class G {}\") public class Auxiliary extends G { private Unknown t; private Aux a; }"; String aux = "package test; @global.ap1.Ann(fqnToGenerate=\"test.H\", content=\"package test; public class H {}\") public class Aux extends H { private Unknown t; }"; performAPErrorsTest(code, AP.class.getName(), new FileContent[] { new FileContent("test/Auxiliary.java", auxiliary), new FileContent("test/Aux.java", aux) }, "140-140:cannot find symbol\n symbol: class Unknown\n location: class test.Auxiliary", "134-134:cannot find symbol\n symbol: class Unknown\n location: class test.Aux"); } public void testNoAP() throws IOException { String code = "package test; public class Test { Auxiliary aux; }"; String auxiliary = "package test; public class Auxiliary { private Unknown t; private Aux a; }"; String aux = "package test; public class Aux { private Unknown t; }"; performAPErrorsTest(code, null, new FileContent[] { new FileContent("test/Auxiliary.java", auxiliary), new FileContent("test/Aux.java", aux) }, "47-47:cannot find symbol\n symbol: class Unknown\n location: class test.Auxiliary", "41-41:cannot find symbol\n symbol: class Unknown\n location: class test.Aux"); } private void performErrorsTest(String code, int expectedErrors) throws IOException { performErrorsTest(code, new ArrayList(), expectedErrors); } private void performErrorsTest(String code, Collection extraOptions, int expectedErrors) throws IOException { File sourceOutput = File.createTempFile("NoFalseErrorsFromAP", ""); sourceOutput.delete(); assertTrue(sourceOutput.mkdirs()); final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; URL myself = AnnotationProcessingTest.class.getProtectionDomain().getCodeSource().getLocation(); DiagnosticCollector diagnostic = new DiagnosticCollector(); List options = new ArrayList(Arrays.asList("-bootclasspath", bootPath, "-source", "1.6", "-classpath", myself.toExternalForm(), "-processor", AP.class.getName(), "-s", sourceOutput.getAbsolutePath(), "-XDbackgroundCompilation")); options.addAll(extraOptions); JavacTask ct = (JavacTask)tool.getTask(null, null, diagnostic, options, null, Arrays.asList(new MyFileObject(code))); ct.analyze(); assertEquals(diagnostic.getDiagnostics().toString(), expectedErrors, diagnostic.getDiagnostics().size()); //intentionally not deleting thwn the test fails to simply diagnostic delete(sourceOutput); } private void performAPErrorsTest(String code, String apName, FileContent[] auxiliary, String... goldenErrors) throws IOException { File temp = File.createTempFile("NoFalseErrorsFromAP", ""); temp.delete(); assertTrue(temp.mkdirs()); File sourceOutput = new File(temp, "out"); assertTrue(sourceOutput.mkdirs()); File source = new File(temp, "src"); assertTrue(source.mkdirs()); if (auxiliary != null) { for (FileContent fc : auxiliary) { File aux = new File(source, fc.path); aux.getParentFile().mkdirs(); FileWriter w = new FileWriter(aux); w.write(fc.content); w.close(); } } final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; URL myself = AnnotationProcessingTest.class.getProtectionDomain().getCodeSource().getLocation(); DiagnosticCollector diagnostic = new DiagnosticCollector(); List options = new LinkedList(); options.addAll(Arrays.asList("-bootclasspath", bootPath, "-source", "1.6", "-classpath", myself.toExternalForm())); if (apName != null) { options.addAll(Arrays.asList("-processor", apName)); } else { options.add("-proc:none"); } options.addAll(Arrays.asList("-s", sourceOutput.getAbsolutePath(), "-XDbackgroundCompilation", "-sourcepath", source.getAbsolutePath())); JavacTask ct = (JavacTask)tool.getTask(null, null, diagnostic, options, null, Arrays.asList(new MyFileObject(code))); ct.analyze(); List actualErrors = new ArrayList(); for (Diagnostic d : diagnostic.getDiagnostics()) { actualErrors.add(d.getStartPosition() + "-" + d.getEndPosition() + ":" + d.getMessage(null)); } assertEquals(Arrays.asList(goldenErrors), actualErrors); //intentionally not deleting thwn the test fails to simply diagnostic delete(sourceOutput); } public void testAPNoSources() throws IOException { File sourceOutput = File.createTempFile("APNoSources", ""); sourceOutput.delete(); assertTrue(sourceOutput.mkdirs()); final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N URL myself = AnnotationProcessingTest.class.getProtectionDomain().getCodeSource().getLocation(); Main.compile(new String[] { "-bootclasspath", bootPath, "-source", "1.6", "-classpath", myself.toExternalForm(), "-processor", ClassBasedAP.class.getName(), "-s", sourceOutput.getAbsolutePath(), "java.lang.String" }); assertTrue(new File(sourceOutput, "java.lang.String.txt").canRead()); //intentionally not deleting thwn the test fails to simply diagnostic delete(sourceOutput); } private static void delete(File d) { if (d.isDirectory()) { for (File f : d.listFiles()) { delete(f); } } d.delete(); } private static class FileContent { final String path; final String content; public FileContent(String path, String content) { this.path = path; this.content = content; } } public void testKeepBrokenAttributes228628() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String code = "package test; @Test(NonExistent.class) public @interface Test { public Class value(); }"; JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, null, null, Arrays.asList("-bootclasspath", bootPath, "-Xjcov", "-XDshouldStopPolicy=GENERATE"), null, Arrays.asList(new global.Test116436.MyFileObject(code))); Iterable classes = ct.enter(); TypeElement test = (TypeElement) classes.iterator().next(); assertEquals(1, test.getAnnotationMirrors().get(0).getElementValues().size()); } } libnb-javaparser-java_7.4.orig/make/netbeans/nb-javac/test/global/DuplicateClassTest.java0000644000000000000000000000532712214026367027725 0ustar 00000000000000/* * Copyright 2003-2004 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Sun designates this * particular file as subject to the "Classpath" exception as provided * by Sun in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, * CA 95054 USA or visit www.sun.com if you need additional information or * have any questions. */ package global; import com.sun.source.util.JavacTask; import java.io.IOException; import java.net.URI; import java.util.Arrays; import javax.lang.model.element.TypeElement; import javax.tools.JavaCompiler; import javax.tools.JavaFileObject; import javax.tools.SimpleJavaFileObject; import javax.tools.ToolProvider; import junit.framework.TestCase; /** * * @author lahvac */ public class DuplicateClassTest extends TestCase { public DuplicateClassTest(String name) { super(name); } static class MyFileObject extends SimpleJavaFileObject { private String text; public MyFileObject(String text) { super(URI.create("myfo:/Test.java"), JavaFileObject.Kind.SOURCE); this.text = text; } @Override public CharSequence getCharContent(boolean ignoreEncodingErrors) { return text; } } public void testNPEDuplicatedClass() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String code = "package test; public class Test { public static class T{} public static class T{} }"; JavacTask ct = (JavacTask)tool.getTask(null, null, null, Arrays.asList("-bootclasspath", bootPath, "-Xjcov", "-XDshouldStopPolicy=GENERATE"), null, Arrays.asList(new MyFileObject(code))); assertEquals("test.Test", ((TypeElement) ct.analyze().iterator().next()).getQualifiedName().toString()); } } libnb-javaparser-java_7.4.orig/make/netbeans/nb-javac/test/global/ErrorToleranceTest.java0000644000000000000000000006020412214026367027746 0ustar 00000000000000/* * Copyright 2003-2004 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Sun designates this * particular file as subject to the "Classpath" exception as provided * by Sun in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, * CA 95054 USA or visit www.sun.com if you need additional information or * have any questions. */ package global; import com.sun.tools.javac.api.JavacTaskImpl; import com.sun.tools.javap.DisassemblerTool.DisassemblerTask; import com.sun.tools.javap.JavapTask; import global.ap1.AP; import java.io.File; import java.io.IOException; import java.io.PrintWriter; import java.io.StringWriter; import java.net.URI; import java.net.URL; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.LinkedList; import java.util.List; import javax.lang.model.element.Element; import javax.lang.model.element.TypeElement; import javax.lang.model.util.ElementFilter; import javax.tools.*; import javax.tools.JavaFileManager.Location; import javax.tools.JavaFileObject.Kind; import junit.framework.TestCase; /** * * @author Jan Lahoda */ public class ErrorToleranceTest extends TestCase { public void testSimple1() throws Exception { final String code = "package test;\n" + "public class Test {\n" + " private void method(Unknown u) {\n" + " }\n" + "}\n"; final String golden = "package test;\n" + "public class Test {\n" + " private void method(Unknown u) {\n" + " throw new RuntimeException(\"Uncompilable source code - cannot find symbol\\n symbol: class Unknown\\n location: class test.Test\");" + " }\n" + "}\n"; compareResults(golden, code); } public void testSimple2() throws Exception { final String code = "package test;\n" + "public class Test {\n" + " private void method(Object u) {\n" + " bflmpsvz" + " }\n" + "}\n"; final String golden = "package test;\n" + "public class Test {\n" + " private void method(Object u) {\n" + " throw new RuntimeException(\"Uncompilable source code - not a statement\");" + " }\n" + "}\n"; compareResults(golden, code); } public void testSimple3() throws Exception { final String code = "package test;\n" + "public class Test {\n" + " private void method(Object o) {\n" + " }\n" + " private void method(Unknown u) {\n" + " }\n" + "}\n"; final String golden = "package test;\n" + "public class Test {\n" + " private void method(Object o) {\n" + " }\n" + " private void method(Unknown u) {\n" + " throw new RuntimeException(\"Uncompilable source code - cannot find symbol\\n symbol: class Unknown\\n location: class test.Test\");" + " }\n" + "}\n"; compareResults(golden, code); } public void testInvalidFieldInit() throws Exception { final String code = "package test;\n" + "public class Test {\n" + " public Test() {\n" + " }\n" + " public Test(Object o) {\n" + " }\n" + " private String s = bflmpsvz;\n" + "}\n"; final String golden = "package test;\n" + "public class Test {\n" + " public Test() {\n" + " throw new RuntimeException(\"Uncompilable source code - cannot find symbol\\n symbol: variable bflmpsvz\\n location: class test.Test\");" + " }\n" + " public Test(Object o) {\n" + " throw new RuntimeException(\"Uncompilable source code - cannot find symbol\\n symbol: variable bflmpsvz\\n location: class test.Test\");" + " }\n" + " private String s;\n" + "}\n"; compareResults(golden, code); } public void testInvalidStaticFieldInit() throws Exception { final String code = "package test;\n" + "public class Test {\n" + " private static String s = bflmpsvz;\n" + "}\n"; final String golden = "package test;\n" + "public class Test {\n" + " static {\n" + " throw new RuntimeException(\"Uncompilable source code - cannot find symbol\\n symbol: variable bflmpsvz\\n location: class test.Test\");" + " }\n" + " private static String s;\n" + "}\n"; compareResults(golden, code); } public void testInvalidCase() throws Exception { final String code = "package test;\n" + "public class Test {\n" + " private void method(int i) {\n" + " switch(i) {\n" + " case Unknown.CONSTANT:\n" + " break;\n" + " }\n" + " }\n" + "}\n"; final String golden = "package test;\n" + "public class Test {\n" + " private void method(int i) {\n" + " throw new RuntimeException(\"Uncompilable source code - cannot find symbol\\n symbol: variable Unknown\\n location: class test.Test\");" + " }\n" + "}\n"; compareResults(golden, code); } public void testInvalidImport() throws Exception { final String code = "package test;\n" + "import a.b.c.List;\n" + "public class Test {\n" + "}\n"; final String golden = "package test;\n" + "public class Test {\n" + " static {\n" + " throw new RuntimeException(\"Uncompilable source code - package a.b.c does not exist\");\n" + " }\n" + "}\n"; compareResults(golden, code); } public void testInvalidImportWithStaticInit() throws Exception { final String code = "package test;\n" + "import a.b.c.List;\n" + "public class Test {\n" + " static {\n" + " System.out.println();\n" + " }\n" + "}\n"; final String golden = "package test;\n" + "public class Test {\n" + " static {\n" + " throw new RuntimeException(\"Uncompilable source code - package a.b.c does not exist\");\n" + " }\n" + "}\n"; compareResults(golden, code); } public void testInvalidCodeBeforePackage() throws Exception { final String code = "xyz\n" + "package test;\n" + "public class Test {\n" + "}\n"; final String golden = "package test;\n" + "public class Test {\n" + "}\n"; compareResults(golden, code); } public void testInvalidCodeAfterClass() throws Exception { final String code = "package test;\n" + "public class Test {\n" + "}\n" + "xyz\n"; final String golden = "package test;\n" + "public class Test {\n" + "}\n"; compareResults(golden, code); } public void testMethodWithoutBody1() throws Exception { final String code = "package test;\n" + "public class Test {\n" + " public void test();\n" + "}\n"; final String golden = "package test;\n" + "public class Test {\n" + " public void test() {" + " throw new RuntimeException(\"Uncompilable source code - missing method body, or declare abstract\");\n" + " }\n" + "}\n"; compareResults(golden, code); } public void testMethodWithoutBody2() throws Exception { final String code = "package test;\n" + "public abstract class Test {\n" + " public abstract void test() {}\n" + "}\n"; final String golden = "package test;\n" + "public abstract class Test {\n" + " public void test() {" + " throw new RuntimeException(\"Uncompilable source code - abstract methods cannot have a body\");\n" + " }\n" + "}\n"; compareResults(golden, code); } public void testDuplicateMethods() throws Exception { final String code = "package test;\n" + "public class Test {\n" + " public void test() {\n" + " };\n" + " public void test() {\n" + " };\n" + "}\n"; final String golden = "package test;\n" + "public class Test {\n" + " static {\n" + " throw new RuntimeException(\"Uncompilable source code - method test() is already defined in class test.Test\");\n" + " }\n" + " public void test() {" + " }\n" + "}\n"; compareResults(golden, code); } public void testDuplicateClasses() throws Exception { final String code = "package test;\n" + "public class Test {\n" + " public static class Nested {\n" + " }\n" + " public static class Nested {\n" + " }\n" + "}\n"; final String golden = "package test;\n" + "public class Test {\n" + " static {\n" + " throw new RuntimeException(\"Uncompilable source code - class test.Test.Nested is already defined in class test.Test\");\n" + " }\n" + " public static class Nested {\n" + " }\n" + "}\n"; compareResults(golden, code); } public void testIssue147516() throws Exception { final String code = "package test;\n" + "public class Test {\n" + " public static final Nested NESTED = new Nested();\n" + " public static class Nested implements Runnable {\n" + " }\n" + "}\n"; final String golden = "package test;\n" + "public class Test {\n" + " static {\n" + " throw new RuntimeException(\"Uncompilable source code - test.Test.Nested is not abstract and does not override abstract method run() in java.lang.Runnable\");\n" + " }\n" + " public static final Nested NESTED = new Nested();\n" + " public static class Nested implements Runnable {\n" + " static {\n" + " throw new RuntimeException(\"Uncompilable source code - test.Test.Nested is not abstract and does not override abstract method run() in java.lang.Runnable\");\n" + " }\n" + " };\n" + "}\n"; compareResults(golden, code); } public void testIssue212342a() throws Exception { final String code = "package test;\n" + "@global.ap1.Ann(fqnToGenerate=\"test.G\", content=\"package test; public class G {}\") public class Test { void t1(G g) {} G t2() { return null; } }\n"; final String golden = "package test;\n" + "public class Test { void t1(G g) {} G t2() { return null; } }\n" + "class G {}\n"; compile(code, true, AP.class.getName()); Collection codeSig = dumpSignatures("test.Test"); compile(golden, true); Collection goldenSig = dumpSignatures("test.Test"); assertEquals(goldenSig, codeSig); } public void testIssue212342b() throws Exception { final String code = "package test;\n" + "@global.ap1.Ann(fqnToGenerate=\"test.G\", content=\"package test; @global.ap1.Ann(fqnToGenerate=\\\"test.H\\\", content=\\\"package test; public class H {}\\\") public class G {}\") public class Test { void t(H h) { System.err.println(1); } void t(G g) { System.err.println(2); } }\n"; final String golden = "package test;\n" + "public class Test { void t(H h) { System.err.println(1); } void t(G g) { System.err.println(2); } }\n" + "class G {}\n" + "class H {}\n"; compile(code, true, AP.class.getName()); Collection codeSig = dumpSignatures("test.Test"); compile(golden, true); Collection goldenSig = dumpSignatures("test.Test"); assertEquals(goldenSig, codeSig); } public void testIssue212342c() throws Exception { final String code = "package test;\n" + "@global.ap1.Ann(fqnToGenerate=\"test.G\", content=\"package test; @global.ap1.Ann(fqnToGenerate=\\\"test.H\\\", content=\\\"package test; public class H {}\\\") public class G {}\") public class Test { void t(G g) { System.err.println(2); } void t(H h) { System.err.println(1); } }\n"; final String golden = "package test;\n" + "public class Test { void t(G g) { System.err.println(2); } void t(H h) { System.err.println(1); } }\n" + "class G {}\n" + "class H {}\n"; compile(code, true, AP.class.getName()); Collection codeSig = dumpSignatures("test.Test"); compile(golden, true); Collection goldenSig = dumpSignatures("test.Test"); assertEquals(goldenSig, codeSig); } public void testIssue212342d() throws Exception { final String code = "package test;\n" + "@global.ap1.Ann(fqnToGenerate=\"test.G\", content=\"package test; @global.ap1.Ann(fqnToGenerate=\\\"test.H\\\", content=\\\"package test; public class H {}\\\") public class G {}\") public class Test { void t(G g, String str) { System.err.println(2); } void t(H h, String str) { System.err.println(1); } }\n"; final String golden = "package test;\n" + "public class Test { void t(G g, String str) { System.err.println(2); } void t(H h, String str) { System.err.println(1); } }\n" + "class G {}\n" + "class H {}\n"; compile(code, true, AP.class.getName()); Collection codeSig = dumpSignatures("test.Test"); compile(golden, true); Collection goldenSig = dumpSignatures("test.Test"); assertEquals(goldenSig, codeSig); } public void testIssue212342e() throws Exception { final String code = "package test;\n" + "@global.ap1.Ann(fqnToGenerate=\"test.G\", content=\"package test; @global.ap1.Ann(fqnToGenerate=\\\"test.H\\\", content=\\\"package test; public class H {}\\\") public class G {}\") public class Test { void t(G g, T t) { System.err.println(2); } void t(H h, T t) { System.err.println(1); } }\n"; final String golden = "package test;\n" + "public class Test { void t(G g, T t) { System.err.println(2); } void t(H h, T t) { System.err.println(1); } }\n" + "class G {}\n" + "class H {}\n"; compile(code, true, AP.class.getName()); Collection codeSig = dumpSignatures("test.Test"); compile(golden, true); Collection goldenSig = dumpSignatures("test.Test"); assertEquals(goldenSig, codeSig); } public void testIssue212342f() throws Exception { final String code = "package test;\n" + "@global.ap1.Ann(fqnToGenerate=\"test.G\", content=\"package test; @global.ap1.Ann(fqnToGenerate=\\\"test.H\\\", content=\\\"package test; public class H {}\\\") public class G {}\") public class Test { void t(G g, T t) { System.err.println(2); } void t(H h, T t) { System.err.println(1); } }\n"; final String golden = "package test;\n" + "public class Test { void t(G g, T t) { System.err.println(2); } void t(H h, T t) { System.err.println(1); } }\n" + "class G {}\n" + "class H {}\n"; compile(code, true, AP.class.getName()); Collection codeSig = dumpSignatures("test.Test"); compile(golden, true); Collection goldenSig = dumpSignatures("test.Test"); assertEquals(goldenSig, codeSig); } public void testIssue212342g() throws Exception { final String code = "package test;\n" + "@global.ap1.Ann(fqnToGenerate=\"test.G\", content=\"package test; @global.ap1.Ann(fqnToGenerate=\\\"test.H\\\", content=\\\"package test; public class H {}\\\") public class G {}\") public class Test { H h = new H(); G g = new G(); }\n"; final String golden = "package test;\n" + "public class Test { H h = new H(); G g = new G(); }\n" + "class G {}\n" + "class H {}\n"; compile(code, true, AP.class.getName()); Collection codeSig = dumpSignatures("test.Test"); compile(golden, true); Collection goldenSig = dumpSignatures("test.Test"); assertEquals(goldenSig, codeSig); } // static class MyFileObject extends SimpleJavaFileObject { private String text; public MyFileObject(String text) { super(URI.create("myfo:/Test.java"), JavaFileObject.Kind.SOURCE); this.text = text; } @Override public CharSequence getCharContent(boolean ignoreEncodingErrors) { return text; } } private File workingDir; @Override protected void setUp() throws Exception { super.setUp(); workingDir = File.createTempFile("ErrorToleranceTest", ""); workingDir.delete(); workingDir.mkdirs(); } @Override protected void tearDown() throws Exception { deleteRecursively(workingDir); super.tearDown(); } private String[] compile(String code, boolean repair) throws Exception { return compile(code, repair, null); } private String[] compile(String code, boolean repair, String apToRun) throws Exception { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; StandardJavaFileManager std = tool.getStandardFileManager(null, null, null); MemoryJavaFileManager mjfm = new MemoryJavaFileManager(std); std.setLocation(StandardLocation.CLASS_OUTPUT, Collections.singleton(workingDir)); List compilerOptions = new ArrayList(); compilerOptions.addAll(Arrays.asList("-bootclasspath", bootPath, "-Xjcov", "-XDshouldStopPolicy=GENERATE", "-XDbackgroundCompilation")); if (apToRun != null) { URL myself = AnnotationProcessingTest.class.getProtectionDomain().getCodeSource().getLocation(); File sourceOutput = new File(workingDir, "sourceOutput"); sourceOutput.mkdirs(); compilerOptions.addAll(Arrays.asList("-classpath", myself.toExternalForm(), "-processor", AP.class.getName(), "-s", sourceOutput.getAbsolutePath())); } JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, mjfm, null, compilerOptions, null, Arrays.asList(new MyFileObject(code))); com.sun.tools.javac.main.JavaCompiler.instance(ct.getContext()).doRepair = repair; ct.parse(); Iterable analyze = ct.analyze(); List result = new LinkedList(); for (TypeElement te : ElementFilter.typesIn(analyze)) { result.add(ct.getElements().getBinaryName(te).toString()); } ct.generate(); return result.toArray(new String[0]); } private Collection dumpSignatures(String... fqns) throws Exception { List result = new LinkedList(); for (String fqn : fqns) { StringWriter s = new StringWriter(); PrintWriter w = new PrintWriter(s); DisassemblerTask javapTool = new JavapTask(w, null, null, Arrays.asList("-classpath", workingDir.getAbsolutePath(), "-private", "-c"), Collections.singletonList(fqn)); javapTool.call(); w.close(); result.add(s.toString()); } return result; } private void compareResults(String golden, String code) throws Exception { Collection codeSig = dumpSignatures(compile(code, true)); Collection goldenSig = dumpSignatures(compile(golden, false)); assertEquals(goldenSig, codeSig); } private void deleteRecursively(File f) { if (f.isDirectory()) { for (File c : f.listFiles()) { deleteRecursively(c); } } f.delete(); } private static final class MemoryJavaFileManager extends ForwardingJavaFileManager { public MemoryJavaFileManager(JavaFileManager jfm) { super(jfm); } @Override public JavaFileObject getJavaFileForOutput(Location location, String className, Kind kind, FileObject sibling) throws IOException { JavaFileObject jfo = super.getJavaFileForOutput(location, className, kind, sibling); System.err.println("output=" + jfo); return jfo; } } // } ././@LongLink0000000000000000000000000000014700000000000011217 Lustar 00000000000000libnb-javaparser-java_7.4.orig/make/netbeans/nb-javac/test/global/MethodInvocationAttributionTest.javalibnb-javaparser-java_7.4.orig/make/netbeans/nb-javac/test/global/MethodInvocationAttributionTest.ja0000644000000000000000000001321612214026367032171 0ustar 00000000000000/* * Copyright 2003-2004 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Sun designates this * particular file as subject to the "Classpath" exception as provided * by Sun in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, * CA 95054 USA or visit www.sun.com if you need additional information or * have any questions. */ package global; import com.sun.source.tree.CompilationUnitTree; import com.sun.source.tree.IdentifierTree; import com.sun.source.tree.MethodInvocationTree; import com.sun.source.tree.Tree.Kind; import com.sun.source.util.JavacTask; import com.sun.source.util.TreePathScanner; import com.sun.source.util.Trees; import java.net.URI; import java.util.Arrays; import javax.lang.model.element.Element; import javax.lang.model.element.TypeElement; import javax.tools.JavaCompiler; import javax.tools.JavaFileObject; import javax.tools.SimpleJavaFileObject; import javax.tools.ToolProvider; import junit.framework.TestCase; public class MethodInvocationAttributionTest extends TestCase { public MethodInvocationAttributionTest(String name) { super(name); } static class MyFileObject extends SimpleJavaFileObject { private String text; public MyFileObject(String text) { super(URI.create("myfo:/Test.java"), JavaFileObject.Kind.SOURCE); this.text = text; } @Override public CharSequence getCharContent(boolean ignoreEncodingErrors) { return text; } } public void testSimple1() throws Exception { final String code = "package test;\n" + "import static java.nio.MappedByteBuffer.*;\n" + "public class Test {\n" + " private void x() {\n" + " allocate(4);\n" + " }\n" + "}\n"; performTest(code); } public void testSimple2() throws Exception { final String code = "package test;\n" + "import java.nio.MappedByteBuffer;\n" + "public class Test {\n" + " private void x() {\n" + " MappedByteBuffer.allocate(4);\n" + " }\n" + "}\n"; performTest(code); } public void testSimple3() throws Exception { final String code = "package test;\n" + "import javax.swing.SwingUtilities;\n" + "public class Test {\n" + " private void x() {\n" + " int x = SwingUtilities.CENTER;\n" + " }\n" + "}\n"; performTest(code); } public void testSimple4() throws Exception { final String code = "package test;\n" + "import static javax.swing.SwingUtilities.*;\n" + "public class Test {\n" + " private void x() {\n" + " int x = CENTER;\n" + " }\n" + "}\n"; performTest(code); } private void performTest(String code) throws Exception { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; JavacTask ct = (JavacTask)tool.getTask(null, null, null, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject(code))); Iterable trees = ct.parse(); ct.analyze(); final Trees t = Trees.instance(ct); new TreePathScanner() { @Override public Void visitMethodInvocation(MethodInvocationTree node, Void p) { if (node.getArguments().size() == 0) { return null; } Element e = t.getElement(getCurrentPath()); assertEquals("allocate", e.getSimpleName().toString()); assertEquals("java.nio.ByteBuffer", ((TypeElement) e.getEnclosingElement()).getQualifiedName().toString()); return null; } @Override public Void visitIdentifier(IdentifierTree node, Void p) { if (getCurrentPath().getParentPath().getLeaf().getKind() != Kind.VARIABLE) { return super.visitIdentifier(node, p); } Element e = t.getElement(getCurrentPath()); assertEquals("CENTER", e.getSimpleName().toString()); assertEquals("javax.swing.SwingConstants", ((TypeElement) e.getEnclosingElement()).getQualifiedName().toString()); return null; } }.scan(trees.iterator().next(), null); } } libnb-javaparser-java_7.4.orig/make/netbeans/nb-javac/test/global/PackageInfoTest.java0000644000000000000000000001036112214026367027166 0ustar 00000000000000/* * Copyright 2003-2004 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Sun designates this * particular file as subject to the "Classpath" exception as provided * by Sun in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, * CA 95054 USA or visit www.sun.com if you need additional information or * have any questions. */ package global; import com.sun.source.tree.CompilationUnitTree; import com.sun.tools.javac.api.JavacTaskImpl; import java.io.IOException; import java.net.URI; import java.util.Arrays; import java.util.EnumSet; import java.util.Set; import javax.lang.model.element.TypeElement; import javax.tools.ForwardingJavaFileManager; import javax.tools.JavaCompiler; import javax.tools.JavaFileManager; import javax.tools.JavaFileObject; import javax.tools.JavaFileObject.Kind; import javax.tools.SimpleJavaFileObject; import javax.tools.StandardLocation; import javax.tools.ToolProvider; import junit.framework.TestCase; public class PackageInfoTest extends TestCase { public PackageInfoTest(String name) { super(name); } static class MyFileObject extends SimpleJavaFileObject { private String text; public MyFileObject(String text) { super(URI.create("myfo:/test/package-info.java"), JavaFileObject.Kind.SOURCE); this.text = text; } @Override public CharSequence getCharContent(boolean ignoreEncodingErrors) { return text; } } public void testPositionForSuperConstructorCalls() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; JFM fm = new JFM(tool.getStandardFileManager(null, null, null)); JavaFileObject jfo = fm.list(StandardLocation.CLASS_PATH, "test", EnumSet.of(Kind.SOURCE), false).iterator().next(); assertNotNull(jfo); JavacTaskImpl ct = (JavacTaskImpl) tool.getTask(null,fm, null, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(jfo)); Iterable trees = ct.parse(); Iterable types = ct.enter(trees); boolean seenType = false; for (TypeElement te : types) { assertEquals("test.package-info", te.getQualifiedName().toString()); assertFalse(seenType); seenType = true; } assertTrue(seenType); } private static final class JFM extends ForwardingJavaFileManager { public JFM(JavaFileManager delegate) { super(delegate); } @Override public Iterable list(Location location, String packageName, Set kinds, boolean recurse) throws IOException { if (StandardLocation.CLASS_PATH == location && "test".equals(packageName) && kinds.contains(Kind.SOURCE)) { return Arrays.asList(new MyFileObject("package test;\n")); } return super.list(location, packageName, kinds, recurse); } @Override public String inferBinaryName(Location location, JavaFileObject file) { if (file instanceof MyFileObject) { return "test.package-info"; } return super.inferBinaryName(location, file); } } } libnb-javaparser-java_7.4.orig/make/netbeans/nb-javac/test/global/ScopeTest.java0000644000000000000000000001565112214026367026077 0ustar 00000000000000/* * Copyright 2003-2004 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Sun designates this * particular file as subject to the "Classpath" exception as provided * by Sun in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, * CA 95054 USA or visit www.sun.com if you need additional information or * have any questions. */ package global; import com.sun.source.tree.CompilationUnitTree; import com.sun.source.tree.IdentifierTree; import com.sun.source.tree.VariableTree; import com.sun.source.util.JavacTask; import com.sun.source.util.TreePath; import com.sun.source.util.TreePathScanner; import com.sun.source.util.Trees; import com.sun.tools.javac.code.Scope; import com.sun.tools.javac.code.Type; import java.io.IOException; import java.net.URI; import java.util.Arrays; import javax.lang.model.element.Element; import javax.lang.model.element.TypeElement; import javax.lang.model.element.VariableElement; import javax.lang.model.type.TypeKind; import javax.lang.model.type.TypeMirror; import javax.lang.model.util.ElementFilter; import javax.tools.JavaCompiler; import javax.tools.JavaFileObject; import javax.tools.SimpleJavaFileObject; import javax.tools.ToolProvider; import junit.framework.TestCase; public class ScopeTest extends TestCase { public ScopeTest(String name) { super(name); } static class MyFileObject extends SimpleJavaFileObject { private String text; public MyFileObject(String text) { super(URI.create("myfo:/Test.java"), JavaFileObject.Kind.SOURCE); this.text = text; } @Override public CharSequence getCharContent(boolean ignoreEncodingErrors) { return text; } } public void testPositionForSuperConstructorCalls() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String code = "package test;\n" + "public class Test {\n" + " private void x() {\n" + " RequestProcessor.post(new Runnable() {\n" + " public void run() {\n" + " String test = null;\n" + " test.length();\n" + " }\n" + " });\n" + " }\n" + "}\n"; JavacTask ct = (JavacTask)tool.getTask(null, null, null, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject(code))); Iterable trees = ct.parse(); ct.analyze(); final Trees t = Trees.instance(ct); new TreePathScanner() { @Override public Void visitIdentifier(IdentifierTree node, Void p) { if ("RequestProcessor".equals(node.getName().toString())) { t.getScope(getCurrentPath()); } return super.visitIdentifier(node, p); } }.scan(trees.iterator().next(), null); new TreePathScanner() { @Override public Void visitVariable(VariableTree node, Void p) { Element e = t.getElement(getCurrentPath()); assertNotNull(t.getPath(e)); return super.visitVariable(node, p); } }.scan(trees.iterator().next(), null); } public void test142924() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String code = "package test;\n" + "public class Test {\n" + " public Unresolved field;" + "}\n"; JavacTask ct = (JavacTask)tool.getTask(null, null, null, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject(code))); ct.parse(); ct.analyze(); TypeElement te = ct.getElements().getTypeElement("test.Test"); for (VariableElement field : ElementFilter.fieldsIn(te.getEnclosedElements())) { TypeMirror type = field.asType(); if (type.getKind() == TypeKind.ERROR) { Type.ErrorType et = (Type.ErrorType)type; for (Scope.Entry e = et.tsym.members().lookup(et.tsym.name.table.fromString("XYZ")); e.sym != null; e = e.next()); } } } public void testScope180164() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String code = "package test;\n" + "public class Test {\n" + " private final Object o = new Runnable() {\n" + " public void run() {\n" + " String u = null;\n" + " String n = u;\n" + " }\n" + " };\n" + "}\n"; final JavacTask ct = (JavacTask)tool.getTask(null, null, null, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject(code))); Iterable cut = ct.parse(); ct.analyze(); final TreePath[] paths = new TreePath[1]; final Element[] el = new Element[1]; new TreePathScanner() { @Override public Void visitIdentifier(IdentifierTree node, Void p) { if (node.getName().contentEquals("u")) { paths[0] = getCurrentPath(); el[0] = Trees.instance(ct).getElement(getCurrentPath()); } return super.visitIdentifier(node, p); } }.scan(cut, null); assertNotNull(paths[0]); assertNotNull(Trees.instance(ct).getPath(el[0])); Trees.instance(ct).getScope(paths[0]); assertNotNull(Trees.instance(ct).getPath(el[0])); } } libnb-javaparser-java_7.4.orig/make/netbeans/nb-javac/test/global/Test116436.java0000644000000000000000000000617612214026367025574 0ustar 00000000000000/* * Copyright 2003-2004 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Sun designates this * particular file as subject to the "Classpath" exception as provided * by Sun in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, * CA 95054 USA or visit www.sun.com if you need additional information or * have any questions. */ package global; import com.sun.source.util.JavacTask; import java.io.IOException; import java.net.URI; import java.util.Arrays; import javax.tools.JavaCompiler; import javax.tools.JavaFileObject; import javax.tools.SimpleJavaFileObject; import javax.tools.ToolProvider; import junit.framework.TestCase; public class Test116436 extends TestCase { public Test116436(String name) { super(name); } static class MyFileObject extends SimpleJavaFileObject { private String text; public MyFileObject(String text) { super(URI.create("myfo:/Test.java"), JavaFileObject.Kind.SOURCE); this.text = text; } @Override public CharSequence getCharContent(boolean ignoreEncodingErrors) { return text; } } /**Superseded by test/tools/javac/api/6608214/T6608214.java * keeping here for convenience * */ public void test116436() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String code = "package test; public class Test { void test() {} }"; JavacTask ct = (JavacTask)tool.getTask(null, null, null, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject(code))); ct.analyze(); } public void test131101() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String code = "package test; public class Test { void f() {} }"; JavacTask ct = (JavacTask)tool.getTask(null, null, null, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject(code))); ct.analyze(); } } libnb-javaparser-java_7.4.orig/make/netbeans/nb-javac/test/global/Test122900.java0000644000000000000000000000500612214026367025554 0ustar 00000000000000/* * Copyright 2003-2004 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Sun designates this * particular file as subject to the "Classpath" exception as provided * by Sun in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, * CA 95054 USA or visit www.sun.com if you need additional information or * have any questions. */ package global; import com.sun.source.util.JavacTask; import java.io.IOException; import java.net.URI; import java.util.Arrays; import javax.tools.JavaCompiler; import javax.tools.JavaFileObject; import javax.tools.SimpleJavaFileObject; import javax.tools.ToolProvider; import junit.framework.TestCase; public class Test122900 extends TestCase { public Test122900(String name) { super(name); } static class MyFileObject extends SimpleJavaFileObject { private String text; public MyFileObject(String text) { super(URI.create("myfo:/Test.java"), JavaFileObject.Kind.SOURCE); this.text = text; } @Override public CharSequence getCharContent(boolean ignoreEncodingErrors) { return text; } } public void test122900() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String code = "package test; public class Test{}"; JavacTask ct = (JavacTask)tool.getTask(null, null, null, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject(code))); ct.analyze(); ct.getElements().getTypeElement("java.lang.Object.abc.xyz"); } } libnb-javaparser-java_7.4.orig/make/netbeans/nb-javac/test/global/Test144555.java0000644000000000000000000000522512214026367025571 0ustar 00000000000000/* * Copyright 2003-2004 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Sun designates this * particular file as subject to the "Classpath" exception as provided * by Sun in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, * CA 95054 USA or visit www.sun.com if you need additional information or * have any questions. */ package global; import com.sun.source.util.JavacTask; import java.io.IOException; import java.net.URI; import java.util.Arrays; import javax.tools.JavaCompiler; import javax.tools.JavaFileObject; import javax.tools.SimpleJavaFileObject; import javax.tools.ToolProvider; import junit.framework.TestCase; public class Test144555 extends TestCase { public Test144555(String name) { super(name); } static class MyFileObject extends SimpleJavaFileObject { private String text; public MyFileObject(String text) { super(URI.create("myfo:/Test.java"), JavaFileObject.Kind.SOURCE); this.text = text; } @Override public CharSequence getCharContent(boolean ignoreEncodingErrors) { return text; } } public void test144555() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String code = "package test; public class Test {\n" + " public Test() {\n" + " super();\n" + " this((JTable)x);\n" + " }\n" + "}\n"; JavacTask ct = (JavacTask)tool.getTask(null, null, null, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject(code))); ct.analyze(); } } libnb-javaparser-java_7.4.orig/make/netbeans/nb-javac/test/global/TestAnnotationPackageInfo.java0000644000000000000000000000770712214026367031233 0ustar 00000000000000/* * Copyright 2003-2004 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Sun designates this * particular file as subject to the "Classpath" exception as provided * by Sun in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, * CA 95054 USA or visit www.sun.com if you need additional information or * have any questions. */ package global; import com.sun.source.util.JavacTask; import java.io.IOException; import java.net.URI; import java.util.Arrays; import javax.tools.Diagnostic; import javax.tools.DiagnosticCollector; import javax.tools.JavaCompiler; import javax.tools.JavaFileObject; import javax.tools.SimpleJavaFileObject; import javax.tools.ToolProvider; import junit.framework.TestCase; public class TestAnnotationPackageInfo extends TestCase { public TestAnnotationPackageInfo(String name) { super(name); } static class MyFileObject extends SimpleJavaFileObject { private String text; public MyFileObject(String fileName, String text) { super(URI.create("myfo:/" + fileName), JavaFileObject.Kind.SOURCE); this.text = text; } @Override public CharSequence getCharContent(boolean ignoreEncodingErrors) { return text; } } public void test178452() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String codeAnnotation = "package test; public @interface Test {\n" + " public int mandatory();\n" + "}\n"; String codePackageInfo = "@Test package test;"; DiagnosticCollector coll = new DiagnosticCollector(); JavacTask ct = (JavacTask)tool.getTask(null, null, coll, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject("test/Test.java", codeAnnotation), new MyFileObject("test/package-info.java", codePackageInfo))); ct.analyze(); for (Diagnostic d : coll.getDiagnostics()) { if (d.getKind() != Diagnostic.Kind.ERROR) continue; return; } fail(coll.getDiagnostics().toString()); } public void testMutualAnnotations() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String codeAnnotationFoo = "package test; @Bar @java.lang.annotation.Target(java.lang.annotation.ElementType.CLASS) public @interface Foo {}\n"; String codeAnnotationBar = "package test; @Foo @java.lang.annotation.Target(java.lang.annotation.ElementType.CLASS) public @interface Bar {}\n"; JavacTask ct = (JavacTask)tool.getTask(null, null, null, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject("test/Foo.java", codeAnnotationFoo), new MyFileObject("test/Bar.java", codeAnnotationBar))); ct.analyze(); } } ././@LongLink0000000000000000000000000000015300000000000011214 Lustar 00000000000000libnb-javaparser-java_7.4.orig/make/netbeans/nb-javac/test/global/TestNPEFromSymbolHasOutterInstances.javalibnb-javaparser-java_7.4.orig/make/netbeans/nb-javac/test/global/TestNPEFromSymbolHasOutterInstance0000644000000000000000000000655512214026367032071 0ustar 00000000000000/* * Copyright 2003-2004 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Sun designates this * particular file as subject to the "Classpath" exception as provided * by Sun in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, * CA 95054 USA or visit www.sun.com if you need additional information or * have any questions. */ package global; import com.sun.source.tree.CompilationUnitTree; import com.sun.source.tree.NewClassTree; import com.sun.source.util.JavacTask; import com.sun.source.util.TreeScanner; import com.sun.tools.javac.tree.JCTree.JCNewClass; import java.io.IOException; import java.net.URI; import java.util.Arrays; import javax.tools.JavaCompiler; import javax.tools.JavaFileObject; import javax.tools.SimpleJavaFileObject; import javax.tools.ToolProvider; import junit.framework.TestCase; public class TestNPEFromSymbolHasOutterInstances extends TestCase { public TestNPEFromSymbolHasOutterInstances(String name) { super(name); } static class MyFileObject extends SimpleJavaFileObject { private String text; public MyFileObject(String text) { super(URI.create("myfo:/Test.java"), JavaFileObject.Kind.SOURCE); this.text = text; } @Override public CharSequence getCharContent(boolean ignoreEncodingErrors) { return text; } } public void test144555() throws IOException { final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); assert tool != null; String code = "package test; public class Test {\n" + " public void test(java.util.Comparator c) {\n" + " test(new java.util.Comparator());\n" + " }\n" + "}\n"; JavacTask ct = (JavacTask)tool.getTask(null, null, null, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Arrays.asList(new MyFileObject(code))); CompilationUnitTree cut = ct.parse().iterator().next(); ct.analyze(); new TreeScanner() { @Override public Void visitNewClass(NewClassTree node, Void p) { JCNewClass nc = (JCNewClass) node; assertNotNull(nc.constructor); assertNotNull(nc.constructor.owner); nc.constructor.owner.hasOuterInstance(); return super.visitNewClass(node, p); } }.scan(cut, null); } } libnb-javaparser-java_7.4.orig/make/netbeans/nb-javac/test/global/ap1/AP.java0000644000000000000000000000657612214026367025155 0ustar 00000000000000/* * Copyright 2003-2004 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Sun designates this * particular file as subject to the "Classpath" exception as provided * by Sun in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, * CA 95054 USA or visit www.sun.com if you need additional information or * have any questions. */ package global.ap1; import com.sun.tools.javac.code.Symbol.ClassSymbol; import java.io.IOException; import java.io.Writer; import java.util.Arrays; import java.util.HashSet; import java.util.Set; import java.util.logging.Level; import java.util.logging.Logger; import javax.annotation.processing.AbstractProcessor; import javax.annotation.processing.RoundEnvironment; import javax.annotation.processing.SupportedSourceVersion; import javax.lang.model.SourceVersion; import javax.lang.model.element.Element; import javax.lang.model.element.TypeElement; import javax.tools.Diagnostic.Kind; import javax.tools.JavaFileObject; /** * * @author lahvac */ @SupportedSourceVersion(SourceVersion.RELEASE_6) public class AP extends AbstractProcessor { @Override public boolean process(Set annotations, RoundEnvironment roundEnv) { for (Element e : roundEnv.getElementsAnnotatedWith(Ann.class)) { //XXX: JavacFiler.getElementURLs expects that e.classfile != null //workarounding here for the time being ClassSymbol s = (ClassSymbol) e; if (s.classfile == null) s.classfile = s.sourcefile; //XXX end Ann ann = e.getAnnotation(Ann.class); Writer w = null; try { JavaFileObject jfo = processingEnv.getFiler().createSourceFile(ann.fqnToGenerate(), e); w = jfo.openWriter(); w.write(ann.content()); } catch (IOException ex) { Logger.getLogger(AP.class.getName()).log(Level.SEVERE, null, ex); } finally { if (w != null) { try { w.close(); } catch (IOException ex) { Logger.getLogger(AP.class.getName()).log(Level.SEVERE, null, ex); } } } } return false; } private static final String ANNOTATION = Ann.class.getName(); private static final Set SUPPORTED_ANNOTATIONS = new HashSet(Arrays.asList(ANNOTATION)); @Override public Set getSupportedAnnotationTypes() { return SUPPORTED_ANNOTATIONS; } } libnb-javaparser-java_7.4.orig/make/netbeans/nb-javac/test/global/ap1/Ann.java0000644000000000000000000000250312214026367025353 0ustar 00000000000000/* * Copyright 2003-2004 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Sun designates this * particular file as subject to the "Classpath" exception as provided * by Sun in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, * CA 95054 USA or visit www.sun.com if you need additional information or * have any questions. */ package global.ap1; /** * * @author lahvac */ public @interface Ann { public String fqnToGenerate(); public String content(); } libnb-javaparser-java_7.4.orig/make/netbeans/nb-javac/test/global/ap1/ClassBasedAP.java0000644000000000000000000000520112214026367027062 0ustar 00000000000000/* * Copyright 2003-2004 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Sun designates this * particular file as subject to the "Classpath" exception as provided * by Sun in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, * CA 95054 USA or visit www.sun.com if you need additional information or * have any questions. */ package global.ap1; import java.io.IOException; import java.util.Arrays; import java.util.HashSet; import java.util.Set; import java.util.logging.Level; import java.util.logging.Logger; import javax.annotation.processing.AbstractProcessor; import javax.annotation.processing.RoundEnvironment; import javax.annotation.processing.SupportedSourceVersion; import javax.lang.model.SourceVersion; import javax.lang.model.element.TypeElement; import javax.lang.model.util.ElementFilter; import javax.tools.FileObject; import javax.tools.StandardLocation; /** * * @author lahvac */ @SupportedSourceVersion(SourceVersion.RELEASE_6) public class ClassBasedAP extends AbstractProcessor { @Override public boolean process(Set annotations, RoundEnvironment roundEnv) { for (TypeElement te : ElementFilter.typesIn(roundEnv.getRootElements())) { try { FileObject jfo = processingEnv.getFiler().createResource(StandardLocation.SOURCE_OUTPUT, "", te.getQualifiedName() + ".txt"); jfo.openWriter().close(); } catch (IOException ex) { Logger.getLogger(ClassBasedAP.class.getName()).log(Level.SEVERE, null, ex); } } return false; } private static final Set SUPPORTED_ANNOTATIONS = new HashSet(Arrays.asList("*")); @Override public Set getSupportedAnnotationTypes() { return SUPPORTED_ANNOTATIONS; } } libnb-javaparser-java_7.4.orig/make/netbeans/nb-javac/test/global/ap1/ErrorProducingAP.java0000644000000000000000000000473612214026367030036 0ustar 00000000000000/* * Copyright 2003-2004 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Sun designates this * particular file as subject to the "Classpath" exception as provided * by Sun in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, * CA 95054 USA or visit www.sun.com if you need additional information or * have any questions. */ package global.ap1; import java.util.Arrays; import java.util.HashSet; import java.util.Set; import javax.annotation.processing.AbstractProcessor; import javax.annotation.processing.RoundEnvironment; import javax.annotation.processing.SupportedSourceVersion; import javax.lang.model.SourceVersion; import javax.lang.model.element.Element; import javax.lang.model.element.TypeElement; import javax.tools.Diagnostic.Kind; /** * * @author lahvac */ @SupportedSourceVersion(SourceVersion.RELEASE_6) public class ErrorProducingAP extends AbstractProcessor { @Override public boolean process(Set annotations, RoundEnvironment roundEnv) { for (Element e : roundEnv.getElementsAnnotatedWith(Ann.class)) { processingEnv.getMessager().printMessage(Kind.ERROR, "message 1", e); processingEnv.getMessager().printMessage(Kind.ERROR, "message 2", e); processingEnv.getMessager().printMessage(Kind.ERROR, "message 3", e); } return false; } private static final String ANNOTATION = Ann.class.getName(); private static final Set SUPPORTED_ANNOTATIONS = new HashSet(Arrays.asList(ANNOTATION)); @Override public Set getSupportedAnnotationTypes() { return SUPPORTED_ANNOTATIONS; } } libnb-javaparser-java_7.4.orig/make/test/HelloWorld.apt.gold.txt0000644000000000000000000000054712214026367023124 0ustar 00000000000000 /** * This class is used to test the results of the langtools build. */ public class HelloWorld { public HelloWorld(); /** * The old standby! * @param args The parameters are ignored. */ public static void main(java.lang.String... args); /** * This declaration is for the benefit of javah tests. */ public native void test(); } libnb-javaparser-java_7.4.orig/make/test/HelloWorld.gold.h0000644000000000000000000000056712214026367021753 0ustar 00000000000000/* DO NOT EDIT THIS FILE - it is machine generated */ #include /* Header for class HelloWorld */ #ifndef _Included_HelloWorld #define _Included_HelloWorld #ifdef __cplusplus extern "C" { #endif /* * Class: HelloWorld * Method: test * Signature: ()V */ JNIEXPORT void JNICALL Java_HelloWorld_test (JNIEnv *, jobject); #ifdef __cplusplus } #endif #endif libnb-javaparser-java_7.4.orig/make/test/HelloWorld.java0000644000000000000000000000317212214026367021514 0ustar 00000000000000/* * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ // NOTE: The javadoc comments are used by the apt tests. /** * This class is used to test the results of the langtools build. */ public class HelloWorld { /** * The old standby! * @param args The parameters are ignored. */ public static void main(String... args) { System.out.println("Hello World!"); } /** * This declaration is for the benefit of javah tests. */ public native void test(); } libnb-javaparser-java_7.4.orig/make/test/HelloWorld.javadoc.gold.txt0000644000000000000000000000045512214026367023745 0ustar 00000000000000./HelloWorld.html ./allclasses-frame.html ./allclasses-noframe.html ./constant-values.html ./deprecated-list.html ./help-doc.html ./index-all.html ./index.html ./overview-tree.html ./package-frame.html ./package-list ./package-summary.html ./package-tree.html ./resources/inherit.gif ./stylesheet.css libnb-javaparser-java_7.4.orig/make/test/HelloWorld.javap.gold.txt0000644000000000000000000000027612214026367023440 0ustar 00000000000000Compiled from "HelloWorld.java" public class HelloWorld extends java.lang.Object{ public HelloWorld(); public static void main(java.lang.String[]); public native void test(); } libnb-javaparser-java_7.4.orig/make/test/README0000644000000000000000000000027112214026367017453 0ustar 00000000000000This is a small quick test suite to (provide a framework to) verify the output of a JDK build of the langtools component. It verifies the contents exist and are minimally functional. libnb-javaparser-java_7.4.orig/make/test/TEST.ROOT0000644000000000000000000000000012214026367020045 0ustar 00000000000000libnb-javaparser-java_7.4.orig/make/test/bootstrap/javac.sh0000644000000000000000000000267212214026367022237 0ustar 00000000000000#!/bin/sh # # Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License version 2 only, as # published by the Free Software Foundation. # # This code is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # version 2 for more details (a copy is included in the LICENSE file that # accompanied this code). # # You should have received a copy of the GNU General Public License version # 2 along with this work; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. # # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA # or visit www.oracle.com if you need additional information or have any # questions. # # @test # @summary Verify basic execution of the bootstrap javac compiler. TESTSRC=${TESTSRC:-.} TOPDIR=${TESTSRC}/../../.. TESTJAVAEXE="${TESTJAVA:+${TESTJAVA}/bin/}java" ${TOPDIR}/dist/bootstrap/bin/javac -d . "${TESTSRC}"/../HelloWorld.java "${TESTJAVAEXE}" -classpath . HelloWorld > HelloWorld.tmp if [ "`cat HelloWorld.tmp`" = "Hello World!" ]; then echo "Test passed." else echo "Test failed." exit 1 fi libnb-javaparser-java_7.4.orig/make/test/bootstrap/javadoc.sh0000644000000000000000000000267112214026367022561 0ustar 00000000000000#!/bin/sh # # Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License version 2 only, as # published by the Free Software Foundation. # # This code is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # version 2 for more details (a copy is included in the LICENSE file that # accompanied this code). # # You should have received a copy of the GNU General Public License version # 2 along with this work; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. # # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA # or visit www.oracle.com if you need additional information or have any # questions. # # @test # @summary Verify the basic execution of the bootstrap javadoc tool. TESTSRC=${TESTSRC:-.} TOPDIR=${TESTSRC}/../../.. rm -rf doc mkdir doc ${TOPDIR}/dist/bootstrap/bin/javadoc -d doc "${TESTSRC}"/../HelloWorld.java ( cd doc ; find . -type f -print | LANG=C sort) > javadoc.tmp if diff ${TESTSRC}/../HelloWorld.javadoc.gold.txt javadoc.tmp ; then echo "Test passed." else echo "Test failed." exit 1 fi libnb-javaparser-java_7.4.orig/make/test/bootstrap/javah.sh0000644000000000000000000000263412214026367022242 0ustar 00000000000000#!/bin/sh # # Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License version 2 only, as # published by the Free Software Foundation. # # This code is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # version 2 for more details (a copy is included in the LICENSE file that # accompanied this code). # # You should have received a copy of the GNU General Public License version # 2 along with this work; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. # # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA # or visit www.oracle.com if you need additional information or have any # questions. # # @test # @summary Verify the basic execution of the bootstrap javah tool. TESTSRC=${TESTSRC:-.} TOPDIR=${TESTSRC}/../../.. ${TOPDIR}/dist/bootstrap/bin/javac -d . "${TESTSRC}"/../HelloWorld.java ${TOPDIR}/dist/bootstrap/bin/javah -classpath . -d . HelloWorld if diff ${TESTSRC}/../HelloWorld.gold.h HelloWorld.h ; then echo "Test passed." else echo "Test failed." exit 1 fi libnb-javaparser-java_7.4.orig/make/test/contents.gold.txt0000644000000000000000000000032012214026367022110 0ustar 00000000000000./bootstrap/bin/javac ./bootstrap/bin/javadoc ./bootstrap/bin/javah ./bootstrap/lib/doclets.jar ./bootstrap/lib/javac.jar ./bootstrap/lib/javadoc.jar ./bootstrap/lib/javah.jar ./lib/classes.jar ./lib/src.zip libnb-javaparser-java_7.4.orig/make/test/contents.sh0000644000000000000000000000260612214026367020770 0ustar 00000000000000#!/bin/sh # # Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License version 2 only, as # published by the Free Software Foundation. # # This code is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # version 2 for more details (a copy is included in the LICENSE file that # accompanied this code). # # You should have received a copy of the GNU General Public License version # 2 along with this work; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. # # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA # or visit www.oracle.com if you need additional information or have any # questions. # # @test # @summary # Verify the contents of the dist directory by name, # to make sure all necessary files are present. TESTSRC=${TESTSRC:-.} TOPDIR=${TESTSRC}/../.. ( cd ${TOPDIR}/dist ; find . -type f -print | LANG=C sort ) > contents.tmp if diff ${TESTSRC}/contents.gold.txt contents.tmp ; then echo "Test passed." else echo "Test failed." exit 1 fi libnb-javaparser-java_7.4.orig/make/test/lib/classes.gold.txt0000644000000000000000000000333412214026367022466 0ustar 00000000000000META-INF/MANIFEST.MF com/sun/tools/apt/Main.class com/sun/tools/apt/main/Main.class com/sun/tools/apt/resources/apt.class com/sun/tools/apt/resources/apt_ja.class com/sun/tools/apt/resources/apt_zh_CN.class com/sun/tools/doclets/formats/html/resources/standard.class com/sun/tools/doclets/formats/html/resources/standard_ja.class com/sun/tools/doclets/formats/html/resources/standard_zh_CN.class com/sun/tools/doclets/internal/toolkit/resources/doclet.xml com/sun/tools/doclets/internal/toolkit/resources/doclets.class com/sun/tools/doclets/internal/toolkit/resources/doclets_ja.class com/sun/tools/doclets/internal/toolkit/resources/doclets_zh_CN.class com/sun/tools/doclets/internal/toolkit/resources/inherit.gif com/sun/tools/javac/Main.class com/sun/tools/javac/main/Main.class com/sun/tools/javac/resources/compiler.class com/sun/tools/javac/resources/compiler_ja.class com/sun/tools/javac/resources/compiler_zh_CN.class com/sun/tools/javac/resources/javac.class com/sun/tools/javac/resources/javac_ja.class com/sun/tools/javac/resources/javac_zh_CN.class com/sun/tools/javac/resources/legacy.class com/sun/tools/javac/resources/version.class com/sun/tools/javadoc/Main.class com/sun/tools/javadoc/resources/javadoc.class com/sun/tools/javadoc/resources/javadoc_ja.class com/sun/tools/javadoc/resources/javadoc_zh_CN.class com/sun/tools/javah/Main.class com/sun/tools/javah/resources/Linux_ppc.class com/sun/tools/javah/resources/Linux_sparc.class com/sun/tools/javah/resources/SunOS_sparc.class com/sun/tools/javah/resources/SunOS_sparcv9.class com/sun/tools/javah/resources/l10n.class com/sun/tools/javah/resources/l10n_ja.class com/sun/tools/javah/resources/l10n_zh_CN.class com/sun/tools/javah/resources/win32_x86.class sun/tools/javap/Main.class libnb-javaparser-java_7.4.orig/make/test/lib/classes.sh0000644000000000000000000000333012214026367021331 0ustar 00000000000000#!/bin/sh # # Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License version 2 only, as # published by the Free Software Foundation. # # This code is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # version 2 for more details (a copy is included in the LICENSE file that # accompanied this code). # # You should have received a copy of the GNU General Public License version # 2 along with this work; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. # # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA # or visit www.oracle.com if you need additional information or have any # questions. # # @test # @summary verify that selected files exist in classes.jar # It would be too brittle to check the complete contents of classes.jar, # so instead, we check for the following # - Main classes # - contents of resource directories # - any other non-.class files TESTSRC=${TESTSRC:-.} TOPDIR=${TESTSRC}/../../.. TESTJAREXE="${TESTJAVA:+${TESTJAVA}/bin/}jar" ${TESTJAREXE} -tf ${TOPDIR}/dist/lib/classes.jar | grep -v '/$' > files.lst egrep 'Main\.class$|resources' files.lst > expect1.lst grep -v '.class$' files.lst > expect2.lst LANG=C sort -u expect1.lst expect2.lst > expect.lst if diff ${TESTSRC}/classes.gold.txt expect.lst ; then echo "Test passed." else echo "Test failed." exit 1 fi libnb-javaparser-java_7.4.orig/make/test/lib/javac.sh0000644000000000000000000000300212214026367020754 0ustar 00000000000000#!/bin/sh # # Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License version 2 only, as # published by the Free Software Foundation. # # This code is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # version 2 for more details (a copy is included in the LICENSE file that # accompanied this code). # # You should have received a copy of the GNU General Public License version # 2 along with this work; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. # # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA # or visit www.oracle.com if you need additional information or have any # questions. # # @test # @summary Verify basic execution of the javac classes in classes.jar. TESTSRC=${TESTSRC:-.} TOPDIR=${TESTSRC}/../../.. TESTJAVAEXE="${TESTJAVA:+${TESTJAVA}/bin/}java" "${TESTJAVAEXE}" -Xbootclasspath/p:${TOPDIR}/dist/lib/classes.jar \ com.sun.tools.javac.Main \ -d . "${TESTSRC}"/../HelloWorld.java "${TESTJAVAEXE}" -classpath . HelloWorld > HelloWorld.tmp if [ "`cat HelloWorld.tmp`" = "Hello World!" ]; then echo "Test passed." else echo "Test failed." exit 1 fi libnb-javaparser-java_7.4.orig/make/test/lib/javadoc.sh0000644000000000000000000000306712214026367021312 0ustar 00000000000000#!/bin/sh # # Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License version 2 only, as # published by the Free Software Foundation. # # This code is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # version 2 for more details (a copy is included in the LICENSE file that # accompanied this code). # # You should have received a copy of the GNU General Public License version # 2 along with this work; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. # # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA # or visit www.oracle.com if you need additional information or have any # questions. # # @test # @summary Verify the basic execution of the javadoc classes in classes.jar. TESTSRC=${TESTSRC:-.} TOPDIR=${TESTSRC}/../../.. TESTJAVAEXE="${TESTJAVA:+${TESTJAVA}/bin/}java" rm -rf doc mkdir doc "${TESTJAVAEXE}" -Xbootclasspath/p:${TOPDIR}/dist/lib/classes.jar \ com.sun.tools.javadoc.Main \ -d doc "${TESTSRC}"/../HelloWorld.java ( cd doc ; find . -type f -print | LANG=C sort ) > javadoc.tmp if diff ${TESTSRC}/../HelloWorld.javadoc.gold.txt javadoc.tmp ; then echo "Test passed." else echo "Test failed." exit 1 fi libnb-javaparser-java_7.4.orig/make/test/lib/javah.sh0000644000000000000000000000313512214026367020770 0ustar 00000000000000#!/bin/sh # # Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License version 2 only, as # published by the Free Software Foundation. # # This code is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # version 2 for more details (a copy is included in the LICENSE file that # accompanied this code). # # You should have received a copy of the GNU General Public License version # 2 along with this work; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. # # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA # or visit www.oracle.com if you need additional information or have any # questions. # # @test # @summary Verify the basic execution of the javah classes in classes.jar. TESTSRC=${TESTSRC:-.} TOPDIR=${TESTSRC}/../../.. TESTJAVAEXE="${TESTJAVA:+${TESTJAVA}/bin/}java" "${TESTJAVAEXE}" -Xbootclasspath/p:${TOPDIR}/dist/lib/classes.jar \ com.sun.tools.javac.Main \ -d . "${TESTSRC}"/../HelloWorld.java "${TESTJAVAEXE}" -Xbootclasspath/p:${TOPDIR}/dist/lib/classes.jar \ com.sun.tools.javah.Main \ -classpath . -d . HelloWorld if diff ${TESTSRC}/../HelloWorld.gold.h HelloWorld.h ; then echo "Test passed." else echo "Test failed." exit 1 fi libnb-javaparser-java_7.4.orig/make/test/lib/javap.sh0000644000000000000000000000313712214026367021002 0ustar 00000000000000#!/bin/sh # # Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License version 2 only, as # published by the Free Software Foundation. # # This code is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # version 2 for more details (a copy is included in the LICENSE file that # accompanied this code). # # You should have received a copy of the GNU General Public License version # 2 along with this work; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. # # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA # or visit www.oracle.com if you need additional information or have any # questions. # # @test # @summary Verify the basic execution of the javap classes in classes.jar. TESTSRC=${TESTSRC:-.} TOPDIR=${TESTSRC}/../../.. TESTJAVAEXE="${TESTJAVA:+${TESTJAVA}/bin/}java" "${TESTJAVAEXE}" -Xbootclasspath/p:${TOPDIR}/dist/lib/classes.jar \ com.sun.tools.javac.Main \ -d . "${TESTSRC}"/../HelloWorld.java "${TESTJAVAEXE}" -Xbootclasspath/p:${TOPDIR}/dist/lib/classes.jar \ sun.tools.javap.Main \ -classpath . HelloWorld > javap.tmp if diff ${TESTSRC}/../HelloWorld.javap.gold.txt javap.tmp ; then echo "Test passed." else echo "Test failed." exit 1 fi libnb-javaparser-java_7.4.orig/make/test/lib/src.gold.txt0000644000000000000000000000422312214026367021616 0ustar 00000000000000com/sun/javadoc/package.html com/sun/tools/doclets/formats/html/markup/package.html com/sun/tools/doclets/formats/html/package.html com/sun/tools/doclets/formats/html/resources/standard.properties com/sun/tools/doclets/formats/html/resources/standard_ja.properties com/sun/tools/doclets/formats/html/resources/standard_zh_CN.properties com/sun/tools/doclets/internal/toolkit/builders/package.html com/sun/tools/doclets/internal/toolkit/package.html com/sun/tools/doclets/internal/toolkit/resources/doclet.xml com/sun/tools/doclets/internal/toolkit/resources/doclets.properties com/sun/tools/doclets/internal/toolkit/resources/doclets_ja.properties com/sun/tools/doclets/internal/toolkit/resources/doclets_zh_CN.properties com/sun/tools/doclets/internal/toolkit/resources/inherit.gif com/sun/tools/doclets/internal/toolkit/taglets/package.html com/sun/tools/doclets/internal/toolkit/util/links/package.html com/sun/tools/doclets/internal/toolkit/util/package.html com/sun/tools/doclets/package.html com/sun/tools/javac/Main.java com/sun/tools/javac/main/Main.java com/sun/tools/javac/resources/compiler.properties com/sun/tools/javac/resources/compiler_ja.properties com/sun/tools/javac/resources/compiler_zh_CN.properties com/sun/tools/javac/resources/javac.properties com/sun/tools/javac/resources/javac_ja.properties com/sun/tools/javac/resources/javac_zh_CN.properties com/sun/tools/javac/resources/legacy.properties com/sun/tools/javac/services/javax.tools.JavaCompilerTool com/sun/tools/javadoc/Main.java com/sun/tools/javadoc/resources/javadoc.properties com/sun/tools/javadoc/resources/javadoc_ja.properties com/sun/tools/javadoc/resources/javadoc_zh_CN.properties com/sun/tools/javah/Main.java com/sun/tools/javah/resources/Linux_ppc.properties com/sun/tools/javah/resources/Linux_sparc.properties com/sun/tools/javah/resources/SunOS_sparc.properties com/sun/tools/javah/resources/SunOS_sparcv9.properties com/sun/tools/javah/resources/l10n.properties com/sun/tools/javah/resources/l10n_ja.properties com/sun/tools/javah/resources/l10n_zh_CN.properties com/sun/tools/javah/resources/win32_x86.properties javax/lang/model/overview.html javax/tools/overview.html sun/tools/javap/Main.java libnb-javaparser-java_7.4.orig/make/test/lib/src.sh0000644000000000000000000000333512214026367020470 0ustar 00000000000000#!/bin/sh # # Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License version 2 only, as # published by the Free Software Foundation. # # This code is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # version 2 for more details (a copy is included in the LICENSE file that # accompanied this code). # # You should have received a copy of the GNU General Public License version # 2 along with this work; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. # # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA # or visit www.oracle.com if you need additional information or have any # questions. # # @test # @summary verify that selected files exist in src.zip # It would be too brittle to check the complete contents of src.zip, # so instead, we check for the following # - Main classes # - contents of resource directories # - any other non-.class files TESTSRC=${TESTSRC:-.} TOPDIR=${TESTSRC}/../../.. TESTJAREXE="${TESTJAVA:+${TESTJAVA}/bin/}jar" unzip -l ${TOPDIR}/dist/lib/src.zip | awk '{print $4}' | egrep -v '^$|/$|^Name$|-' > files.lst egrep 'Main\.java$|resources' files.lst > expect1.lst grep -v '.java$' files.lst > expect2.lst LANG=C sort -u expect1.lst expect2.lst > expect.lst if diff ${TESTSRC}/src.gold.txt expect.lst ; then echo "Test passed." else echo "Test failed." exit 1 fi libnb-javaparser-java_7.4.orig/make/tools/anttasks/CompilePropertiesTask.java0000644000000000000000000000756612214026367025755 0ustar 00000000000000/* * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package anttasks; import compileproperties.CompileProperties; import java.io.File; import java.util.ArrayList; import java.util.List; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.DirectoryScanner; import org.apache.tools.ant.Project; import org.apache.tools.ant.taskdefs.MatchingTask; public class CompilePropertiesTask extends MatchingTask { public void setSrcDir(File srcDir) { this.srcDir = srcDir; } public void setDestDir(File destDir) { this.destDir = destDir; } public void setSuperclass(String superclass) { this.superclass = superclass; } @Override public void execute() { CompileProperties.Log log = new CompileProperties.Log() { public void error(String msg, Exception e) { log(msg, Project.MSG_ERR); } public void info(String msg) { log(msg, Project.MSG_INFO); } public void verbose(String msg) { log(msg, Project.MSG_VERBOSE); } }; List mainOpts = new ArrayList(); int count = 0; DirectoryScanner s = getDirectoryScanner(srcDir); for (String path: s.getIncludedFiles()) { if (path.endsWith(".properties")) { String destPath = path.substring(0, path.length() - ".properties".length()) + ".java"; File srcFile = new File(srcDir, path); File destFile = new File(destDir, destPath); // Arguably, the comparison in the next line should be ">", not ">=" // but that assumes the resolution of the last modified time is fine // grained enough; in practice, it is better to use ">=". if (destFile.exists() && destFile.lastModified() >= srcFile.lastModified()) continue; destFile.getParentFile().mkdirs(); mainOpts.add("-compile"); mainOpts.add(srcFile.getPath()); mainOpts.add(destFile.getPath()); mainOpts.add(superclass); count++; } } if (mainOpts.size() > 0) { log("Generating " + count + " resource files to " + destDir, Project.MSG_INFO); CompileProperties cp = new CompileProperties(); cp.setLog(log); boolean ok = cp.run(mainOpts.toArray(new String[mainOpts.size()])); if (!ok) throw new BuildException("CompileProperties failed."); } } private File srcDir; private File destDir; private String superclass = "java.util.ListResourceBundle"; } libnb-javaparser-java_7.4.orig/make/tools/anttasks/GenStubsTask.java0000644000000000000000000001345712214026367024036 0ustar 00000000000000/* * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package anttasks; import genstubs.GenStubs; import java.io.*; import java.util.*; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.DirectoryScanner; import org.apache.tools.ant.taskdefs.MatchingTask; import org.apache.tools.ant.types.Path; import org.apache.tools.ant.types.Reference; /** * Files are specified with an implicit fileset, using srcdir as a base directory. * The set of files to be included is specified with an includes attribute or * nested set. However, unlike a normal fileset, an empty includes attribute * means "no files" instead of "all files". The Ant task also accepts "fork=true" and * classpath attribute or nested element to run GenStubs in a separate VM * with the specified path. This is likely necessary if a JDK 7 parser is required to read the * JDK 7 input files. */ public class GenStubsTask extends MatchingTask { private File srcDir; private File destDir; private boolean fork; private Path classpath; private String includes; public void setSrcDir(File dir) { this.srcDir = dir; } public void setDestDir(File dir) { this.destDir = dir; } public void setFork(boolean v) { this.fork = v; } public void setClasspath(Path cp) { if (classpath == null) classpath = cp; else classpath.append(cp); } public Path createClasspath() { if (classpath == null) { classpath = new Path(getProject()); } return classpath.createPath(); } public void setClasspathRef(Reference r) { createClasspath().setRefid(r); } public void setIncludes(String includes) { super.setIncludes(includes); this.includes = includes; } @Override public void execute() { if (includes != null && includes.trim().isEmpty()) return; DirectoryScanner s = getDirectoryScanner(srcDir); String[] files = s.getIncludedFiles(); // System.err.println("Ant.execute: srcDir " + srcDir); // System.err.println("Ant.execute: destDir " + destDir); // System.err.println("Ant.execute: files " + Arrays.asList(files)); files = filter(srcDir, destDir, files); if (files.length == 0) return; System.out.println("Generating " + files.length + " stub files to " + destDir); List classNames = new ArrayList(); for (String file: files) { classNames.add(file.replaceAll(".java$", "").replace('/', '.')); } if (!fork) { GenStubs m = new GenStubs(); boolean ok = m.run(srcDir.getPath(), destDir, classNames); if (!ok) throw new BuildException("genstubs failed"); } else { List cmd = new ArrayList(); String java_home = System.getProperty("java.home"); cmd.add(new File(new File(java_home, "bin"), "java").getPath()); if (classpath != null) cmd.add("-Xbootclasspath/p:" + classpath); cmd.add(GenStubs.class.getName()); cmd.add("-sourcepath"); cmd.add(srcDir.getPath()); cmd.add("-s"); cmd.add(destDir.getPath()); cmd.addAll(classNames); //System.err.println("GenStubs exec " + cmd); ProcessBuilder pb = new ProcessBuilder(cmd); pb.redirectErrorStream(true); try { Process p = pb.start(); BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream())); try { String line; while ((line = in.readLine()) != null) System.out.println(line); } finally { in.close(); } int rc = p.waitFor(); if (rc != 0) throw new BuildException("genstubs failed"); } catch (IOException e) { throw new BuildException("genstubs failed", e); } catch (InterruptedException e) { throw new BuildException("genstubs failed", e); } } } String[] filter(File srcDir, File destDir, String[] files) { List results = new ArrayList(); for (String f: files) { long srcTime = new File(srcDir, f).lastModified(); long destTime = new File(destDir, f).lastModified(); if (srcTime > destTime) results.add(f); } return results.toArray(new String[results.size()]); } } libnb-javaparser-java_7.4.orig/make/tools/anttasks/SelectToolTask.java0000644000000000000000000002377412214026367024364 0ustar 00000000000000/* * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package anttasks; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.FocusEvent; import java.awt.event.FocusListener; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.File; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import java.io.Reader; import java.io.Writer; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Properties; import javax.swing.JButton; import javax.swing.JCheckBox; import javax.swing.JComboBox; import javax.swing.JDialog; import javax.swing.JLabel; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JTextField; import javax.swing.SwingUtilities; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Project; import org.apache.tools.ant.Task; /** * Task to allow the user to control langtools tools built when using NetBeans. * * There are two primary modes. * 1) Property mode. In this mode, property names are provided to get values * that may be specified by the user, either directly in a GUI dialog, or * read from a properties file. If the GUI dialog is invoked, values may * optionally be set for future use. * 2) Setup mode. In this mode, no property names are provided, and the GUI * is invoked to allow the user to set or reset values for use in property mode. */ public class SelectToolTask extends Task { /** * Set the location of the private properties file used to keep the retain * user preferences for this repository. */ public void setPropertyFile(File propertyFile) { this.propertyFile = propertyFile; } /** * Set the name of the property which will be set to the name of the * selected tool, if any. If no tool is selected, the property will * remain unset. */ public void setToolProperty(String toolProperty) { this.toolProperty = toolProperty; } /** * Set the name of the property which will be set to the execution args of the * selected tool, if any. The args default to an empty string. */ public void setArgsProperty(String argsProperty) { this.argsProperty = argsProperty; } /** * Specify whether or not to pop up a dialog if the user has not specified * a default value for a property. */ public void setAskIfUnset(boolean askIfUnset) { this.askIfUnset = askIfUnset; } @Override public void execute() { Project p = getProject(); Properties props = readProperties(propertyFile); toolName = props.getProperty("tool.name"); if (toolName != null) { toolArgs = props.getProperty(toolName + ".args", ""); } if (toolProperty == null || askIfUnset && (toolName == null || (argsProperty != null && toolArgs == null))) { showGUI(props); } // finally, return required values, if any if (toolProperty != null && !(toolName == null || toolName.equals(""))) { p.setProperty(toolProperty, toolName); if (argsProperty != null && toolArgs != null) p.setProperty(argsProperty, toolArgs); } } void showGUI(Properties fileProps) { Properties guiProps = new Properties(fileProps); JOptionPane p = createPane(guiProps); p.createDialog("Select Tool").setVisible(true); toolName = (String) toolChoice.getSelectedItem(); toolArgs = argsField.getText(); if (defaultCheck.isSelected()) { if (toolName.equals("")) { fileProps.remove("tool.name"); } else { fileProps.put("tool.name", toolName); fileProps.put(toolName + ".args", toolArgs); } writeProperties(propertyFile, fileProps); } } JOptionPane createPane(final Properties props) { JPanel body = new JPanel(new GridBagLayout()); GridBagConstraints lc = new GridBagConstraints(); lc.insets.right = 10; lc.insets.bottom = 3; GridBagConstraints fc = new GridBagConstraints(); fc.anchor = GridBagConstraints.WEST; fc.gridx = 1; fc.gridwidth = GridBagConstraints.REMAINDER; fc.insets.bottom = 3; JLabel toolLabel = new JLabel("Tool:"); body.add(toolLabel, lc); String[] toolChoices = { "apt", "javac", "javadoc", "javah", "javap" }; if (true || toolProperty == null) { // include empty value in setup mode List l = new ArrayList(Arrays.asList(toolChoices)); l.add(0, ""); toolChoices = l.toArray(new String[l.size()]); } toolChoice = new JComboBox(toolChoices); if (toolName != null) toolChoice.setSelectedItem(toolName); toolChoice.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent e) { String tn = (String) e.getItem(); argsField.setText(getDefaultArgsForTool(props, tn)); if (toolProperty != null) okButton.setEnabled(!tn.equals("")); } }); body.add(toolChoice, fc); argsField = new JTextField(getDefaultArgsForTool(props, toolName), 40); if (toolProperty == null || argsProperty != null) { JLabel argsLabel = new JLabel("Args:"); body.add(argsLabel, lc); body.add(argsField, fc); argsField.addFocusListener(new FocusListener() { public void focusGained(FocusEvent e) { } public void focusLost(FocusEvent e) { String toolName = (String) toolChoice.getSelectedItem(); if (toolName.length() > 0) props.put(toolName + ".args", argsField.getText()); } }); } defaultCheck = new JCheckBox("Set as default"); if (toolProperty == null) defaultCheck.setSelected(true); else body.add(defaultCheck, fc); final JOptionPane p = new JOptionPane(body); okButton = new JButton("OK"); okButton.setEnabled(toolProperty == null || (toolName != null && !toolName.equals(""))); okButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { JDialog d = (JDialog) SwingUtilities.getAncestorOfClass(JDialog.class, p); d.setVisible(false); } }); p.setOptions(new Object[] { okButton }); return p; } Properties readProperties(File file) { Properties p = new Properties(); if (file != null && file.exists()) { Reader in = null; try { in = new BufferedReader(new FileReader(file)); p.load(in); in.close(); } catch (IOException e) { throw new BuildException("error reading property file", e); } finally { if (in != null) { try { in.close(); } catch (IOException e) { throw new BuildException("cannot close property file", e); } } } } return p; } void writeProperties(File file, Properties p) { if (file != null) { Writer out = null; try { File dir = file.getParentFile(); if (dir != null && !dir.exists()) dir.mkdirs(); out = new BufferedWriter(new FileWriter(file)); p.store(out, "langtools properties"); out.close(); } catch (IOException e) { throw new BuildException("error writing property file", e); } finally { if (out != null) { try { out.close(); } catch (IOException e) { throw new BuildException("cannot close property file", e); } } } } } String getDefaultArgsForTool(Properties props, String tn) { return (tn == null || tn.equals("")) ? "" : props.getProperty(tn + ".args", ""); } // Ant task parameters private boolean askIfUnset; private String toolProperty; private String argsProperty; private File propertyFile; // GUI components private JComboBox toolChoice; private JTextField argsField; private JCheckBox defaultCheck; private JButton okButton; // Result values for the client private String toolName; private String toolArgs; } libnb-javaparser-java_7.4.orig/make/tools/compileproperties/CompileProperties.java0000644000000000000000000003555412214026367027045 0ustar 00000000000000/* * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package compileproperties; import java.io.BufferedWriter; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStreamWriter; import java.io.Writer; import java.text.MessageFormat; import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; import java.util.List; import java.util.Properties; /** Translates a .properties file into a .java file containing the * definition of a java.util.Properties subclass which can then be * compiled with javac.

* * Usage: java CompileProperties [path to .properties file] [path to .java file to be output] [super class] * * Infers the package by looking at the common suffix of the two * inputs, eliminating "classes" from it. * * @author Scott Violet * @author Kenneth Russell */ public class CompileProperties { public static void main(String[] args) { CompileProperties cp = new CompileProperties(); boolean ok = cp.run(args); if ( !ok ) { System.exit(1); } } public static interface Log { void info(String msg); void verbose(String msg); void error(String msg, Exception e); } private String propfiles[]; private String outfiles[] ; private String supers[] ; private int compileCount = 0; private boolean quiet = false; public Log log; public void setLog(Log log) { this.log = log; } public boolean run(String[] args) { if (log == null) { log = new Log() { public void error(String msg, Exception e) { System.err.println("ERROR: CompileProperties: " + msg); if ( e != null ) { System.err.println("EXCEPTION: " + e.toString()); e.printStackTrace(); } } public void info(String msg) { System.out.println(msg); } public void verbose(String msg) { if (!quiet) System.out.println(msg); } }; } boolean ok = true; /* Original usage */ if (args.length == 2 && args[0].charAt(0) != '-' ) { ok = createFile(args[0], args[1], "java.util.ListResourceBundle"); } else if (args.length == 3) { ok = createFile(args[0], args[1], args[2]); } else if (args.length == 0) { usage(log); ok = false; } else { /* New batch usage */ ok = parseOptions(args); if ( ok && compileCount == 0 ) { log.error("options parsed but no files to compile", null); ok = false; } /* Need at least one file. */ if ( !ok ) { usage(log); } else { /* Process files */ for ( int i = 0; i < compileCount && ok ; i++ ) { ok = createFile(propfiles[i], outfiles[i], supers[i]); } } } return ok; } private boolean parseOptions(String args[]) { boolean ok = true; if ( compileCount > 0 ) { String new_propfiles[] = new String[compileCount + args.length]; String new_outfiles[] = new String[compileCount + args.length]; String new_supers[] = new String[compileCount + args.length]; System.arraycopy(propfiles, 0, new_propfiles, 0, compileCount); System.arraycopy(outfiles, 0, new_outfiles, 0, compileCount); System.arraycopy(supers, 0, new_supers, 0, compileCount); propfiles = new_propfiles; outfiles = new_outfiles; supers = new_supers; } else { propfiles = new String[args.length]; outfiles = new String[args.length]; supers = new String[args.length]; } for ( int i = 0; i < args.length ; i++ ) { if ( "-compile".equals(args[i]) && i+3 < args.length ) { propfiles[compileCount] = args[++i]; outfiles[compileCount] = args[++i]; supers[compileCount] = args[++i]; compileCount++; } else if ( "-optionsfile".equals(args[i]) && i+1 < args.length ) { String filename = args[++i]; FileInputStream finput = null; byte contents[] = null; try { finput = new FileInputStream(filename); int byteCount = finput.available(); if ( byteCount <= 0 ) { log.error("The -optionsfile file is empty", null); ok = false; } else { contents = new byte[byteCount]; int bytesRead = finput.read(contents); if ( byteCount != bytesRead ) { log.error("Cannot read all of -optionsfile file", null); ok = false; } } } catch ( IOException e ) { log.error("cannot open " + filename, e); ok = false; } if ( finput != null ) { try { finput.close(); } catch ( IOException e ) { ok = false; log.error("cannot close " + filename, e); } } if ( ok = true && contents != null ) { String tokens[] = (new String(contents)).split("\\s+"); if ( tokens.length > 0 ) { ok = parseOptions(tokens); } } if ( !ok ) { break; } } else if ( "-quiet".equals(args[i]) ) { quiet = true; } else { log.error("argument error", null); ok = false; } } return ok; } private boolean createFile(String propertiesPath, String outputPath, String superClass) { boolean ok = true; log.verbose("parsing: " + propertiesPath); Properties p = new Properties(); try { p.load(new FileInputStream(propertiesPath)); } catch ( FileNotFoundException e ) { ok = false; log.error("Cannot find file " + propertiesPath, e); } catch ( IOException e ) { ok = false; log.error("IO error on file " + propertiesPath, e); } if ( ok ) { String packageName = inferPackageName(propertiesPath, outputPath); log.verbose("inferred package name: " + packageName); List sortedKeys = new ArrayList(); for ( Object key : p.keySet() ) { sortedKeys.add((String)key); } Collections.sort(sortedKeys); Iterator keys = sortedKeys.iterator(); StringBuffer data = new StringBuffer(); while (keys.hasNext()) { String key = keys.next(); data.append(" { \"" + escape(key) + "\", \"" + escape((String)p.get(key)) + "\" },\n"); } // Get class name from java filename, not the properties filename. // (zh_TW properties might be used to create zh_HK files) File file = new File(outputPath); String name = file.getName(); int dotIndex = name.lastIndexOf('.'); String className; if (dotIndex == -1) { className = name; } else { className = name.substring(0, dotIndex); } String packageString = ""; if (packageName != null && !packageName.equals("")) { packageString = "package " + packageName + ";\n\n"; } Writer writer = null; try { writer = new BufferedWriter( new OutputStreamWriter(new FileOutputStream(outputPath), "8859_1")); MessageFormat format = new MessageFormat(FORMAT); writer.write(format.format(new Object[] { packageString, className, superClass, data })); } catch ( IOException e ) { ok = false; log.error("IO error writing to file " + outputPath, e); } if ( writer != null ) { try { writer.flush(); } catch ( IOException e ) { ok = false; log.error("IO error flush " + outputPath, e); } try { writer.close(); } catch ( IOException e ) { ok = false; log.error("IO error close " + outputPath, e); } } log.verbose("wrote: " + outputPath); } return ok; } private static void usage(Log log) { log.info("usage:"); log.info(" java CompileProperties path_to_properties_file path_to_java_output_file [super_class]"); log.info(" -OR-"); log.info(" java CompileProperties {-compile path_to_properties_file path_to_java_output_file super_class} -or- -optionsfile filename"); log.info(""); log.info("Example:"); log.info(" java CompileProperties -compile test.properties test.java java.util.ListResourceBundle"); log.info(" java CompileProperties -optionsfile option_file"); log.info("option_file contains: -compile test.properties test.java java.util.ListResourceBundle"); } private static String escape(String theString) { // This is taken from Properties.saveConvert with changes for Java strings int len = theString.length(); StringBuffer outBuffer = new StringBuffer(len*2); for(int x=0; x 0x007e)) { outBuffer.append('\\'); outBuffer.append('u'); outBuffer.append(toHex((aChar >> 12) & 0xF)); outBuffer.append(toHex((aChar >> 8) & 0xF)); outBuffer.append(toHex((aChar >> 4) & 0xF)); outBuffer.append(toHex( aChar & 0xF)); } else { if (specialSaveChars.indexOf(aChar) != -1) { outBuffer.append('\\'); } outBuffer.append(aChar); } } } return outBuffer.toString(); } private static String inferPackageName(String inputPath, String outputPath) { // Normalize file names inputPath = new File(inputPath).getPath(); outputPath = new File(outputPath).getPath(); // Split into components String sep; if (File.separatorChar == '\\') { sep = "\\\\"; } else { sep = File.separator; } String[] inputs = inputPath.split(sep); String[] outputs = outputPath.split(sep); // Match common names, eliminating first "classes" entry from // each if present int inStart = 0; int inEnd = inputs.length - 2; int outEnd = outputs.length - 2; int i = inEnd; int j = outEnd; while (i >= 0 && j >= 0) { if (!inputs[i].equals(outputs[j]) || (inputs[i].equals("gensrc") && inputs[j].equals("gensrc"))) { ++i; ++j; break; } --i; --j; } String result; if (i < 0 || j < 0 || i >= inEnd || j >= outEnd) { result = ""; } else { if (inputs[i].equals("classes") && outputs[j].equals("classes")) { ++i; } inStart = i; StringBuffer buf = new StringBuffer(); for (i = inStart; i <= inEnd; i++) { buf.append(inputs[i]); if (i < inEnd) { buf.append('.'); } } result = buf.toString(); } return result; } private static final String FORMAT = "{0}" + "public final class {1} extends {2} '{'\n" + " protected final Object[][] getContents() '{'\n" + " return new Object[][] '{'\n" + "{3}" + " };\n" + " }\n" + "}\n"; // This comes from Properties private static char toHex(int nibble) { return hexDigit[(nibble & 0xF)]; } // This comes from Properties private static final char[] hexDigit = { '0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F' }; // Note: different from that in Properties private static final String specialSaveChars = "\""; } libnb-javaparser-java_7.4.orig/make/tools/crules/AbstractCodingRulesAnalyzer.java0000644000000000000000000001015012214026367026521 0ustar 00000000000000/* * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package crules; import java.text.MessageFormat; import java.util.Locale; import java.util.ResourceBundle; import javax.lang.model.element.TypeElement; import javax.tools.JavaFileObject; import com.sun.source.tree.Tree; import com.sun.source.util.JavacTask; import com.sun.source.util.Plugin; import com.sun.source.util.TaskEvent; import com.sun.source.util.TaskListener; import com.sun.source.util.Trees; import com.sun.tools.javac.api.BasicJavacTask; import com.sun.tools.javac.tree.JCTree; import com.sun.tools.javac.tree.TreeScanner; import com.sun.tools.javac.util.Context; import com.sun.tools.javac.util.Log; import static com.sun.source.util.TaskEvent.Kind; public abstract class AbstractCodingRulesAnalyzer implements Plugin { protected Log log; protected Trees trees; protected TreeScanner treeVisitor; protected Kind eventKind; protected Messages messages; public void init(JavacTask task, String... args) { BasicJavacTask impl = (BasicJavacTask)task; Context context = impl.getContext(); log = Log.instance(context); trees = Trees.instance(task); messages = new Messages(); task.addTaskListener(new PostAnalyzeTaskListener()); } public class PostAnalyzeTaskListener implements TaskListener { @Override public void started(TaskEvent taskEvent) {} @Override public void finished(TaskEvent taskEvent) { if (taskEvent.getKind().equals(eventKind)) { TypeElement typeElem = taskEvent.getTypeElement(); Tree tree = trees.getTree(typeElem); if (tree != null) { JavaFileObject prevSource = log.currentSourceFile(); try { log.useSource(taskEvent.getCompilationUnit().getSourceFile()); treeVisitor.scan((JCTree)tree); } finally { log.useSource(prevSource); } } } } } class Messages { ResourceBundle bundle; Messages() { String name = getClass().getPackage().getName() + ".resources.crules"; bundle = ResourceBundle.getBundle(name, Locale.ENGLISH); } public void error(JCTree tree, String code, Object... args) { String msg = (code == null) ? (String) args[0] : localize(code, args); log.error(tree, "proc.messager", msg.toString()); } private String localize(String code, Object... args) { String msg = bundle.getString(code); if (msg == null) { StringBuilder sb = new StringBuilder(); sb.append("message file broken: code=").append(code); if (args.length > 0) { sb.append(" arguments={0}"); for (int i = 1; i < args.length; i++) { sb.append(", {").append(i).append("}"); } } msg = sb.toString(); } return MessageFormat.format(msg, args); } } } libnb-javaparser-java_7.4.orig/make/tools/crules/MutableFieldsAnalyzer.java0000644000000000000000000001070212214026367025342 0ustar 00000000000000/* * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package crules; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; import com.sun.tools.javac.code.Kinds; import com.sun.tools.javac.tree.TreeScanner; import static com.sun.source.util.TaskEvent.Kind; import static com.sun.tools.javac.code.Flags.*; import static com.sun.tools.javac.tree.JCTree.JCVariableDecl; public class MutableFieldsAnalyzer extends AbstractCodingRulesAnalyzer { public MutableFieldsAnalyzer() { treeVisitor = new MutableFieldsVisitor(); eventKind = Kind.ANALYZE; } public String getName() { return "mutable_fields_analyzer"; } private boolean ignoreField(String className, String field) { List currentFieldsToIgnore = classFieldsToIgnoreMap.get(className); if (currentFieldsToIgnore != null) { for (String fieldToIgnore : currentFieldsToIgnore) { if (field.equals(fieldToIgnore)) { return true; } } } return false; } class MutableFieldsVisitor extends TreeScanner { @Override public void visitVarDef(JCVariableDecl tree) { boolean isJavacPack = tree.sym.outermostClass().fullname.toString() .contains(packageToCheck); if (isJavacPack && (tree.sym.flags() & SYNTHETIC) == 0 && tree.sym.owner.kind == Kinds.TYP) { if (!ignoreField(tree.sym.owner.flatName().toString(), tree.getName().toString())) { boolean enumClass = (tree.sym.owner.flags() & ENUM) != 0; boolean nonFinalStaticEnumField = (tree.sym.flags() & (ENUM | FINAL)) == 0; boolean nonFinalStaticField = (tree.sym.flags() & STATIC) != 0 && (tree.sym.flags() & FINAL) == 0; if (enumClass ? nonFinalStaticEnumField : nonFinalStaticField) { messages.error(tree, "crules.err.var.must.be.final", tree); } } } super.visitVarDef(tree); } } private static final String packageToCheck = "com.sun.tools.javac"; private static final Map> classFieldsToIgnoreMap = new HashMap>(); static { classFieldsToIgnoreMap. put("com.sun.tools.javac.util.JCDiagnostic", Arrays.asList("fragmentFormatter")); classFieldsToIgnoreMap. put("com.sun.tools.javac.util.JavacMessages", Arrays.asList("defaultBundle", "defaultMessages")); classFieldsToIgnoreMap. put("com.sun.tools.javac.file.ZipFileIndexCache", Arrays.asList("sharedInstance")); classFieldsToIgnoreMap. put("com.sun.tools.javac.main.JavaCompiler", Arrays.asList("versionRB")); classFieldsToIgnoreMap. put("com.sun.tools.javac.code.Type", Arrays.asList("moreInfo")); classFieldsToIgnoreMap. put("com.sun.tools.javac.util.SharedNameTable", Arrays.asList("freelist")); classFieldsToIgnoreMap. put("com.sun.tools.javac.util.Log", Arrays.asList("useRawMessages")); } } libnb-javaparser-java_7.4.orig/make/tools/crules/resources/crules.properties0000644000000000000000000000236012214026367025677 0ustar 00000000000000# # Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License version 2 only, as # published by the Free Software Foundation. Oracle designates this # particular file as subject to the "Classpath" exception as provided # by Oracle in the LICENSE file that accompanied this code. # # This code is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # version 2 for more details (a copy is included in the LICENSE file that # accompanied this code). # # You should have received a copy of the GNU General Public License version # 2 along with this work; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. # # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA # or visit www.oracle.com if you need additional information or have any # questions. # # 0: symbol crules.err.var.must.be.final=\ Static variable {0} must be final libnb-javaparser-java_7.4.orig/make/tools/genstubs/GenStubs.java0000644000000000000000000003152112214026367023205 0ustar 00000000000000/* * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package genstubs; import java.io.*; import java.util.*; import javax.tools.JavaFileObject; import javax.tools.StandardJavaFileManager; import javax.tools.StandardLocation; import com.sun.source.tree.CompilationUnitTree; import com.sun.source.util.JavacTask; import com.sun.tools.javac.api.JavacTool; import com.sun.tools.javac.code.Flags; import com.sun.tools.javac.code.TypeTag; import com.sun.tools.javac.tree.JCTree; import com.sun.tools.javac.tree.JCTree.JCClassDecl; import com.sun.tools.javac.tree.JCTree.JCCompilationUnit; import com.sun.tools.javac.tree.JCTree.JCFieldAccess; import com.sun.tools.javac.tree.JCTree.JCIdent; import com.sun.tools.javac.tree.JCTree.JCImport; import com.sun.tools.javac.tree.JCTree.JCLiteral; import com.sun.tools.javac.tree.JCTree.JCMethodDecl; import com.sun.tools.javac.tree.JCTree.JCModifiers; import com.sun.tools.javac.tree.JCTree.JCVariableDecl; import com.sun.tools.javac.tree.Pretty; import com.sun.tools.javac.tree.TreeMaker; import com.sun.tools.javac.tree.TreeScanner; import com.sun.tools.javac.tree.TreeTranslator; import com.sun.tools.javac.util.Context; import com.sun.tools.javac.util.ListBuffer; import com.sun.tools.javac.util.Name; import javax.tools.JavaFileManager; /** * Generate stub source files by removing implementation details from input files. * * This is a special purpose stub generator, specific to the needs of generating * stub files for JDK 7 API that are needed to compile langtools files that depend * on that API. The stub generator works by removing as much of the API source code * as possible without affecting the public signature, in order to reduce the * transitive closure of the API being referenced. The resulting stubs can be * put on the langtools sourcepath with -implicit:none to compile the langtools * files that depend on the JDK 7 API. * * Usage: * genstubs -s -sourcepath * * The specified class names are looked up on the sourcepath, and corresponding * stubs are written to the source output directory. * * Classes are parsed into javac ASTs, then processed with a javac TreeTranslator * to remove implementation details, and written out in the source output directory. * Documentation comments and annotations are removed. Method bodies are removed * and methods are marked native. Private and package-private field definitions * have their initializers replace with 0, 0.0, false, null as appropriate. */ public class GenStubs { static class Fault extends Exception { private static final long serialVersionUID = 0; Fault(String message) { super(message); } Fault(String message, Throwable cause) { super(message); initCause(cause); } } public static void main(String[] args) { boolean ok = new GenStubs().run(args); if (!ok) System.exit(1); } public boolean run(String... args) { File outdir = null; String sourcepath = null; List classes = new ArrayList(); for (ListIterator iter = Arrays.asList(args).listIterator(); iter.hasNext(); ) { String arg = iter.next(); if (arg.equals("-s") && iter.hasNext()) outdir = new File(iter.next()); else if (arg.equals("-sourcepath") && iter.hasNext()) sourcepath = iter.next(); else if (arg.startsWith("-")) throw new IllegalArgumentException(arg); else { classes.add(arg); while (iter.hasNext()) classes.add(iter.next()); } } return run(sourcepath, outdir, classes); } public boolean run(String sourcepath, File outdir, List classes) { //System.err.println("run: sourcepath:" + sourcepath + " outdir:" + outdir + " classes:" + classes); if (sourcepath == null) throw new IllegalArgumentException("sourcepath not set"); if (outdir == null) throw new IllegalArgumentException("source output dir not set"); JavacTool tool = JavacTool.create(); StandardJavaFileManager fm = tool.getStandardFileManager(null, null, null); try { fm.setLocation(StandardLocation.SOURCE_OUTPUT, Collections.singleton(outdir)); fm.setLocation(StandardLocation.SOURCE_PATH, splitPath(sourcepath)); List files = new ArrayList(); for (String c: classes) { JavaFileObject fo = fm.getJavaFileForInput( StandardLocation.SOURCE_PATH, c, JavaFileObject.Kind.SOURCE); if (fo == null) error("class not found: " + c); else files.add(fo); } JavacTask t = tool.getTask(null, fm, null, null, null, files); Iterable trees = t.parse(); for (CompilationUnitTree tree: trees) { makeStub(fm, tree); } } catch (IOException e) { error("IO error " + e, e); } return (errors == 0); } void makeStub(StandardJavaFileManager fm, CompilationUnitTree tree) throws IOException { CompilationUnitTree tree2 = new StubMaker().translate(tree); CompilationUnitTree tree3 = new ImportCleaner(fm).removeRedundantImports(tree2); String className = fm.inferBinaryName(StandardLocation.SOURCE_PATH, tree.getSourceFile()); JavaFileObject fo = fm.getJavaFileForOutput(StandardLocation.SOURCE_OUTPUT, className, JavaFileObject.Kind.SOURCE, null); // System.err.println("Writing " + className + " to " + fo.getName()); Writer out = fo.openWriter(); try { new Pretty(out, true).printExpr((JCTree) tree3); } finally { out.close(); } } List splitPath(String path) { List list = new ArrayList(); for (String p: path.split(File.pathSeparator)) { if (p.length() > 0) list.add(new File(p)); } return list; } void error(String message) { System.err.println(message); errors++; } void error(String message, Throwable cause) { error(message); } int errors; class StubMaker extends TreeTranslator { CompilationUnitTree translate(CompilationUnitTree tree) { return super.translate((JCCompilationUnit) tree); } /** * compilation units: remove javadoc comments * -- required, in order to remove @deprecated tags, since we * (separately) remove all annotations, including @Deprecated */ public void visitTopLevel(JCCompilationUnit tree) { super.visitTopLevel(tree); tree.docComments = null; } /** * methods: remove method bodies, make methods native */ @Override public void visitClassDef(JCClassDecl tree) { long prevClassMods = currClassMods; currClassMods = tree.mods.flags; try { super.visitClassDef(tree);; } finally { currClassMods = prevClassMods; } } private long currClassMods = 0; /** * methods: remove method bodies, make methods native */ @Override public void visitMethodDef(JCMethodDecl tree) { tree.mods = translate(tree.mods); tree.restype = translate(tree.restype); tree.typarams = translateTypeParams(tree.typarams); tree.params = translateVarDefs(tree.params); tree.thrown = translate(tree.thrown); if (tree.body != null) { if ((currClassMods & Flags.INTERFACE) != 0) { tree.mods.flags &= ~(Flags.DEFAULT | Flags.STATIC); } else { tree.mods.flags |= Flags.NATIVE; } tree.body = null; } result = tree; } /** * modifiers: remove annotations */ @Override public void visitModifiers(JCModifiers tree) { tree.annotations = com.sun.tools.javac.util.List.nil(); result = tree; } /** * field definitions: replace initializers with 0, 0.0, false etc * when possible -- i.e. leave public, protected initializers alone */ @Override public void visitVarDef(JCVariableDecl tree) { tree.mods = translate(tree.mods); tree.vartype = translate(tree.vartype); if (tree.init != null) { if ((tree.mods.flags & (Flags.PUBLIC | Flags.PROTECTED)) != 0) tree.init = translate(tree.init); else { String t = tree.vartype.toString(); if (t.equals("boolean")) tree.init = new JCLiteral(TypeTag.BOOLEAN, 0) { }; else if (t.equals("byte")) tree.init = new JCLiteral(TypeTag.BYTE, 0) { }; else if (t.equals("char")) tree.init = new JCLiteral(TypeTag.CHAR, 0) { }; else if (t.equals("double")) tree.init = new JCLiteral(TypeTag.DOUBLE, 0.d) { }; else if (t.equals("float")) tree.init = new JCLiteral(TypeTag.FLOAT, 0.f) { }; else if (t.equals("int")) tree.init = new JCLiteral(TypeTag.INT, 0) { }; else if (t.equals("long")) tree.init = new JCLiteral(TypeTag.LONG, 0) { }; else if (t.equals("short")) tree.init = new JCLiteral(TypeTag.SHORT, 0) { }; else tree.init = new JCLiteral(TypeTag.BOT, null) { }; } } result = tree; } } class ImportCleaner extends TreeScanner { private Set names = new HashSet(); private TreeMaker m; ImportCleaner(JavaFileManager fm) { // ImportCleaner itself doesn't require a filemanager, but instantiating // a TreeMaker does, indirectly (via ClassReader, sigh) Context c = new Context(); c.put(JavaFileManager.class, fm); m = TreeMaker.instance(c); } CompilationUnitTree removeRedundantImports(CompilationUnitTree t) { JCCompilationUnit tree = (JCCompilationUnit) t; tree.accept(this); ListBuffer defs = new ListBuffer(); for (JCTree def: tree.defs) { if (def.getTag() == JCTree.Tag.IMPORT) { JCImport imp = (JCImport) def; if (imp.qualid.getTag() == JCTree.Tag.SELECT) { JCFieldAccess qualid = (JCFieldAccess) imp.qualid; if (!qualid.name.toString().equals("*") && !names.contains(qualid.name)) { continue; } } } defs.add(def); } return m.TopLevel(tree.packageAnnotations, tree.pid, defs.toList()); } @Override public void visitImport(JCImport tree) { } // ignore names found in imports @Override public void visitIdent(JCIdent tree) { names.add(tree.name); } @Override public void visitSelect(JCFieldAccess tree) { super.visitSelect(tree); names.add(tree.name); } } } libnb-javaparser-java_7.4.orig/makefiles/BuildLangtools.gmk0000644000000000000000000002442412214026367022267 0ustar 00000000000000# # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License version 2 only, as # published by the Free Software Foundation. Oracle designates this # particular file as subject to the "Classpath" exception as provided # by Oracle in the LICENSE file that accompanied this code. # # This code is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # version 2 for more details (a copy is included in the LICENSE file that # accompanied this code). # # You should have received a copy of the GNU General Public License version # 2 along with this work; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. # # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA # or visit www.oracle.com if you need additional information or have any # questions. # # This must be the first rule default: all include $(SPEC) include MakeBase.gmk include JavaCompilation.gmk # The BOOT_JAVAC setup uses the bootdir compiler to compile the tools # and the bootstrap javac, to be run by the bootdir jvm. $(eval $(call SetupJavaCompiler,BOOT_JAVAC,\ JAVAC:=$(JAVAC),\ SERVER_DIR:=$(SJAVAC_SERVER_DIR),\ SERVER_JVM:=$(SJAVAC_SERVER_JAVA),\ FLAGS:=-XDignore.symbol.file=true -g -Xlint:all$(COMMA)-deprecation -Werror)) # javax.tools.JavaCompilerTool isn't really a suffix but this gets the file copied. RESOURCE_SUFFIXES:=.gif .xml .css .js javax.tools.JavaCompilerTool # Now setup the compilation of the properties compilation tool. You can depend # upon $(BUILD_TOOLS) to trigger a compilation of the tools. Note that we # add src/share/classes to the sourcepath. This is necessary since the GenStubs # program needs to be linked and run towards the new javac sources. $(eval $(call SetupJavaCompilation,BUILD_TOOLS,\ SETUP:=BOOT_JAVAC,\ DISABLE_SJAVAC:=true,\ ADD_JAVAC_FLAGS:=-Xprefer:source,\ SRC:=$(LANGTOOLS_TOPDIR)/make/tools $(LANGTOOLS_TOPDIR)/src/share/classes,\ INCLUDES:=compileproperties genstubs,\ BIN:=$(LANGTOOLS_OUTPUTDIR)/btclasses)) # The compileprops tools compiles a properties file into a resource bundle. TOOL_COMPILEPROPS_CMD:=$(JAVA) -cp $(LANGTOOLS_OUTPUTDIR)/btclasses compileproperties.CompileProperties -quiet # Lookup the properties that need to be compiled into resource bundles. PROPSOURCES:=$(shell $(FIND) $(LANGTOOLS_TOPDIR)/src/share/classes -name "*.properties") # Strip away prefix and suffix, leaving for example only: "com/sun/tools/javac/resources/javac_zh_CN" PROPPATHS:=$(patsubst $(LANGTOOLS_TOPDIR)/src/share/classes/%.properties,%,$(PROPSOURCES)) # Generate the list of java files to be created. PROPJAVAS:=$(patsubst %,$(LANGTOOLS_OUTPUTDIR)/gensrc/%.java,$(PROPPATHS)) # Generate the package dirs for the tobe generated java files. PROPDIRS:=$(dir $(PROPJAVAS)) # Now generate a sequence of "-compile ...javac_zh_CN.properties ...javac_zh_CN.java java.util.ListResourceBundle" # suitable to be fed into the CompileProperties command. PROPCMDLINE:=$(subst _SPACE_,$(SPACE),$(join $(addprefix -compile_SPACE_,$(PROPSOURCES)), \ $(addsuffix _SPACE_java.util.ListResourceBundle,$(addprefix _SPACE_$(LANGTOOLS_OUTPUTDIR)/gensrc/,$(addsuffix .java,$(PROPPATHS)))))) # Now setup the rule for the generation of the resource bundles. $(LANGTOOLS_OUTPUTDIR)/gensrc/_the_props.d : $(PROPSOURCES) $(BUILD_TOOLS) $(RM) -r $(@D)/* $(MKDIR) -p $(@D) $(PROPDIRS) $(PRINTF) "jdk=$(JDK_VERSION)\nfull=$(FULL_VERSION)\nrelease=$(RELEASE)\n" > $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javah/resources/version.properties $(PRINTF) "jdk=$(JDK_VERSION)\nfull=$(FULL_VERSION)\nrelease=$(RELEASE)\n" > $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javap/resources/version.properties $(PRINTF) "jdk=$(JDK_VERSION)\nfull=$(FULL_VERSION)\nrelease=$(RELEASE)\n" > $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javac/resources/version.properties $(PRINTF) "jdk=$(JDK_VERSION)\nfull=$(FULL_VERSION)\nrelease=$(RELEASE)\n" > $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/jdeps/resources/version.properties $(ECHO) Compiling $(words $(PROPSOURCES) v1 v2 v3) properties into resource bundles $(TOOL_COMPILEPROPS_CMD) $(PROPCMDLINE) \ -compile $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javah/resources/version.properties \ $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javah/resources/version.java \ java.util.ListResourceBundle \ -compile $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javap/resources/version.properties \ $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javap/resources/version.java \ java.util.ListResourceBundle \ -compile $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javac/resources/version.properties \ $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javac/resources/version.java \ java.util.ListResourceBundle \ -compile $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/jdeps/resources/version.properties \ $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/jdeps/resources/version.java \ java.util.ListResourceBundle $(ECHO) PROPS_ARE_CREATED=yes > $@ # Trigger the generation of the resource bundles. After the resource bundles have # been compiled, then the makefile will restart and the newly created java files # will become part of the build further along in the makefile. -include $(LANGTOOLS_OUTPUTDIR)/gensrc/_the_props.d ifeq ($(PROPS_ARE_CREATED),yes) # Setup the rules to build a dist/bootstrap/lib/javac.jar, ie a smaller intermediate javac # that can be compiled with an old javac. The intermediate javac is then used # to compile javac again and to build the complete new jdk. $(eval $(call SetupJavaCompilation,BUILD_BOOTSTRAP_LANGTOOLS,\ SETUP:=BOOT_JAVAC,\ DISABLE_SJAVAC:=true,\ SRC:=$(LANGTOOLS_TOPDIR)/src/share/classes $(LANGTOOLS_OUTPUTDIR)/gensrc,\ EXCLUDES:=com/sun/tools/javac/nio,\ COPY:=$(RESOURCE_SUFFIXES),\ BIN:=$(LANGTOOLS_OUTPUTDIR)/btclasses/bootstrap)) $(eval $(call SetupArchive,ARCHIVE_BOOTSTRAP_JAVAC,$(BUILD_BOOTSTRAP_LANGTOOLS),\ SRCS:=$(LANGTOOLS_OUTPUTDIR)/btclasses/bootstrap,\ JAR:=$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar,\ SUFFIXES:=.class $(RESOURCE_SUFFIXES))) # GenStubs is used to bootstrap any dependencies from javac to the new JDK that is not # yet built. It is currently not needed but might be again in the future. The following # exercises the functionality to verify that it works. TOOL_GENSTUBS_CMD=$(JAVA) \ "-Xbootclasspath/p:$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar" \ -classpath $(LANGTOOLS_OUTPUTDIR)/btclasses \ genstubs.GenStubs # We fetch source from the JDK... JDKS=$(JDK_TOPDIR)/src/share/classes # Build the list of classes to generate stubs from. java/util/function/Predicate.java isn't # currently needed, but is used as a demo for now. STUBSOURCES:=$(shell $(FIND) $(JDKS) -name "*.java" | $(GREP) \ -e "$(JDKS)/java/util/function/Predicate.java") # Rewrite the file names into class names because the GenStubs tool require this. STUBCLASSES:=$(subst /,.,$(patsubst $(JDKS)/%.java,%,$(STUBSOURCES))) # Now setup the build recipe for genstubs. $(LANGTOOLS_OUTPUTDIR)/genstubs/_the_stubs.d : $(STUBSOURCES) $(BUILD_TOOLS) \ $(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar \ $(LANGTOOLS_OUTPUTDIR)/gensrc/_the_props.d $(MKDIR) -p $(@D) $(MKDIR) -p $(LANGTOOLS_OUTPUTDIR)/tmpstubs $(ECHO) $(LOG_INFO) Generating stubs from JDK sources. ($(TOOL_GENSTUBS_CMD) -s $(LANGTOOLS_OUTPUTDIR)/tmpstubs -sourcepath $(JDKS) $(STUBCLASSES) && $(ECHO) STUBS_ARE_CREATED=yes > $@) if $(DIFF) -x "_the*" -rq $(LANGTOOLS_OUTPUTDIR)/tmpstubs $(LANGTOOLS_OUTPUTDIR)/genstubs > /dev/null 2>&1; then \ $(ECHO) $(LOG_INFO) No changes in the stubs!; \ $(RM) -r $(LANGTOOLS_OUTPUTDIR)/tmpstubs; \ else \ $(ECHO) $(LOG_INFO) Changes in stubs detected!; \ $(RM) -r $(@D); \ $(MV) $(LANGTOOLS_OUTPUTDIR)/tmpstubs $(@D); \ fi $(ECHO) STUBS_ARE_CREATED=yes > $@ # Trigger a generation of the genstubs java source code and a restart # of the makefile to make sure that the following build setup use the # newly created java files. -include $(LANGTOOLS_OUTPUTDIR)/genstubs/_the_stubs.d ifeq ($(STUBS_ARE_CREATED),yes) # Setup a compiler configuration using the intermediate javac in dist/bootstrap/lib/javac.jar # that generates code for the new jdk that is being built. # The code compiled by this compiler setup, cannot necessarily be run with the bootstrap jvm. $(eval $(call SetupJavaCompiler,GENERATE_NEWBYTECODE,\ JVM:=$(JAVA),\ JAVAC:="-Xbootclasspath/p:$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar" \ -cp $(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar \ com.sun.tools.javac.Main,\ FLAGS:=-XDignore.symbol.file=true -Xlint:all$(COMMA)-deprecation -Werror,\ SERVER_DIR:=$(SJAVAC_SERVER_DIR),\ SERVER_JVM:=$(SJAVAC_SERVER_JAVA))) $(eval $(call SetupJavaCompilation,BUILD_FULL_JAVAC,\ SETUP:=GENERATE_NEWBYTECODE,\ SRC:=$(LANGTOOLS_TOPDIR)/src/share/classes $(LANGTOOLS_OUTPUTDIR)/gensrc \ $(LANGTOOLS_OUTPUTDIR)/genstubs,\ EXCLUDES:=java/util java/io java/nio,\ COPY:=$(RESOURCE_SUFFIXES),\ BIN:=$(LANGTOOLS_OUTPUTDIR)/classes)) $(eval $(call SetupArchive,ARCHIVE_FULL_JAVAC,$(BUILD_FULL_JAVAC),\ SETUP:=GENERATE_NEWBYTECODE,\ SRCS:=$(LANGTOOLS_OUTPUTDIR)/classes,\ SUFFIXES:=.class $(RESOURCE_SUFFIXES),\ JAR:=$(LANGTOOLS_OUTPUTDIR)/dist/lib/classes.jar)) $(eval $(call SetupZipArchive,ZIP_FULL_JAVAC_SOURCE,\ SRC:=$(LANGTOOLS_TOPDIR)/src/share/classes $(LANGTOOLS_OUTPUTDIR)/gensrc,\ ZIP:=$(LANGTOOLS_OUTPUTDIR)/dist/lib/src.zip)) all: $(LANGTOOLS_OUTPUTDIR)/dist/lib/classes.jar \ $(LANGTOOLS_OUTPUTDIR)/dist/lib/src.zip \ $(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar endif endif libnb-javaparser-java_7.4.orig/makefiles/Makefile0000644000000000000000000000405012214026367020276 0ustar 00000000000000# # Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License version 2 only, as # published by the Free Software Foundation. Oracle designates this # particular file as subject to the "Classpath" exception as provided # by Oracle in the LICENSE file that accompanied this code. # # This code is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # version 2 for more details (a copy is included in the LICENSE file that # accompanied this code). # # You should have received a copy of the GNU General Public License version # 2 along with this work; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. # # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA # or visit www.oracle.com if you need additional information or have any # questions. # # Locate this Makefile ifeq ($(filter /%,$(lastword $(MAKEFILE_LIST))),) makefile_path:=$(CURDIR)/$(lastword $(MAKEFILE_LIST)) else makefile_path:=$(lastword $(MAKEFILE_LIST)) endif repo_dir:=$(patsubst %/makefiles/Makefile,%,$(makefile_path)) # What is the name of this subsystem (langtools, corba, etc)? subsystem_name:=$(notdir $(repo_dir)) # Try to locate top-level makefile top_level_makefile:=$(repo_dir)/../common/makefiles/Makefile ifneq ($(wildcard $(top_level_makefile)),) $(info Will run $(subsystem_name) target on top-level Makefile) $(info WARNING: This is a non-recommended way of building!) $(info ===================================================) else $(info Cannot locate top-level Makefile. Is this repo not checked out as part of a complete forest?) $(error Build from top-level Makefile instead) endif all: @$(MAKE) -f $(top_level_makefile) $(subsystem_name) libnb-javaparser-java_7.4.orig/src/share/bin/launcher.sh-template0000644000000000000000000000543512214026367023315 0ustar 00000000000000#!/bin/sh # # Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License version 2 only, as # published by the Free Software Foundation. Oracle designates this # particular file as subject to the "Classpath" exception as provided # by Oracle in the LICENSE file that accompanied this code. # # This code is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # version 2 for more details (a copy is included in the LICENSE file that # accompanied this code). # # You should have received a copy of the GNU General Public License version # 2 along with this work; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. # # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA # or visit www.oracle.com if you need additional information or have any # questions. # mydir="`dirname $0`" case `uname -s` in CYGWIN*) mydir=`cygpath -m $mydir` ;; esac mylib="$mydir/../lib" # By default, put the jar file and its dependencies on the bootclasspath. # This is always required on a Mac, because the system langtools classes # are always on the main class path; in addition, it may be required on # standard versions of JDK (i.e. using rt.jar and tools.jar) because some # langtools interfaces are in rt.jar. # Assume that the jar file being invoked lists all the necessary langtools # jar files in its Class-Path manifest entry, so there is no need to search # dependent jar files for additional dependencies. if [ "$LANGTOOLS_USE_BOOTCLASSPATH" != "no" ]; then cp=`unzip -c "$mylib/#PROGRAM#.jar" META-INF/MANIFEST.MF | grep "Class-Path:" | sed -e 's|Class-Path: *||' -e 's|\([a-z]*\.jar\) *|'"$mylib"'/\1#PS#|g'` bcp="$mylib/#PROGRAM#.jar#PS#$cp" fi # tools currently assumes that assertions are enabled in the launcher ea=-ea:com.sun.tools... # Any parameters starting with -J are passed to the JVM. # All other parameters become parameters of #PROGRAM#. # Separate out -J* options for the JVM # Unset IFS and use newline as arg separator to preserve spaces in args DUALCASE=1 # for MKS: make case statement case-sensitive (6709498) saveIFS="$IFS" nl=' ' for i in "$@" ; do IFS= case $i in -J* ) javaOpts=$javaOpts$nl`echo $i | sed -e 's/^-J//'` ;; * ) toolOpts=$toolOpts$nl$i ;; esac IFS="$saveIFS" done unset DUALCASE IFS=$nl "#TARGET_JAVA#" "${bcp:+-Xbootclasspath/p:"$bcp"}" ${ea} ${javaOpts} -jar "${mylib}/#PROGRAM#.jar" ${toolOpts} libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/javadoc/AnnotatedType.java0000644000000000000000000000277412214026367026653 0ustar 00000000000000/* * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.javadoc; /** * Represents an annotated type. * For example: *

 *      {@code @NonNull String}
 *      {@code @Positive int}
 * 
* * @author Mahmood Ali * @since 1.8 */ public interface AnnotatedType extends Type { AnnotationDesc[] annotations(); Type underlyingType(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/javadoc/AnnotationDesc.java0000644000000000000000000000525212214026367026777 0ustar 00000000000000/* * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.javadoc; /** * Represents an annotation. * An annotation associates a value with each element of an annotation type. * * @author Scott Seligman * @since 1.5 */ public interface AnnotationDesc { /** * Returns the annotation type of this annotation. * * @return the annotation type of this annotation. */ AnnotationTypeDoc annotationType(); /** * Returns this annotation's elements and their values. * Only those explicitly present in the annotation are * included, not those assuming their default values. * Returns an empty array if there are none. * * @return this annotation's elements and their values. */ ElementValuePair[] elementValues(); /** * Check for the synthesized bit on the annotation. * * @return true if the annotation is synthesized. */ boolean isSynthesized(); /** * Represents an association between an annotation type element * and one of its values. * * @author Scott Seligman * @since 1.5 */ public interface ElementValuePair { /** * Returns the annotation type element. * * @return the annotation type element. */ AnnotationTypeElementDoc element(); /** * Returns the value associated with the annotation type element. * * @return the value associated with the annotation type element. */ AnnotationValue value(); } } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/javadoc/AnnotationTypeDoc.java0000644000000000000000000000310412214026367027462 0ustar 00000000000000/* * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.javadoc; /** * Represents an annotation type. * * @author Scott Seligman * @since 1.5 */ public interface AnnotationTypeDoc extends ClassDoc { /** * Returns the elements of this annotation type. * Returns an empty array if there are none. * * @return the elements of this annotation type. */ AnnotationTypeElementDoc[] elements(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/javadoc/AnnotationTypeElementDoc.java0000644000000000000000000000312012214026367030772 0ustar 00000000000000/* * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.javadoc; /** * Represents an element of an annotation type. * * @author Scott Seligman * @since 1.5 */ public interface AnnotationTypeElementDoc extends MethodDoc { /** * Returns the default value of this element. * Returns null if this element has no default. * * @return the default value of this element. */ AnnotationValue defaultValue(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/javadoc/AnnotationValue.java0000644000000000000000000000406312214026367027174 0ustar 00000000000000/* * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.javadoc; /** * Represents a value of an annotation type element. * * @author Scott Seligman * @since 1.5 */ public interface AnnotationValue { /** * Returns the value. * The type of the returned object is one of the following: *
  • a wrapper class for a primitive type *
  • String *
  • Type (representing a class literal) *
  • FieldDoc (representing an enum constant) *
  • AnnotationDesc *
  • AnnotationValue[] *
* * @return the value. */ Object value(); /** * Returns a string representation of the value. * * @return the text of a Java language annotation value expression * whose value is the value of this element. */ String toString(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/javadoc/ClassDoc.java0000644000000000000000000003147612214026367025570 0ustar 00000000000000/* * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.javadoc; /** * Represents a java class or interface and provides access to * information about the class, the class's comment and tags, and the * members of the class. A ClassDoc only exists if it was * processed in this run of javadoc. References to classes * which may or may not have been processed in this run are * referred to using Type (which can be converted to ClassDoc, * if possible). * * @see Type * * @since 1.2 * @author Kaiyang Liu (original) * @author Robert Field (rewrite) */ public interface ClassDoc extends ProgramElementDoc, Type { /** * Return true if this class is abstract. Return true * for all interfaces. */ boolean isAbstract(); /** * Return true if this class implements or interface extends * java.io.Serializable. * * Since java.io.Externalizable extends * java.io.Serializable, * Externalizable objects are also Serializable. */ boolean isSerializable(); /** * Return true if this class implements or interface extends * java.io.Externalizable. */ boolean isExternalizable(); /** * Return true if this class can be used as a target type of a lambda expression * or method reference. */ boolean isFunctionalInterface(); /** * Return the serialization methods for this class or * interface. * * @return an array of MethodDoc objects that represents * the serialization methods for this class or interface. */ MethodDoc[] serializationMethods(); /** * Return the Serializable fields of this class or interface. *

* Return either a list of default fields documented by * serial tag
* or return a single FieldDoc for * serialPersistentField member. * There should be a serialField tag for * each Serializable field defined by an ObjectStreamField * array component of serialPersistentField. * * @return an array of FieldDoc objects for the Serializable * fields of this class or interface. * * @see #definesSerializableFields() * @see SerialFieldTag */ FieldDoc[] serializableFields(); /** * Return true if Serializable fields are explicitly defined with * the special class member serialPersistentFields. * * @see #serializableFields() * @see SerialFieldTag */ boolean definesSerializableFields(); /** * Return the superclass of this class. Return null if this is an * interface. * *

This method cannot accommodate certain generic type constructs. * The superclassType method should be used instead. * * @return the ClassDoc for the superclass of this class, null if * there is no superclass. * @see #superclassType */ ClassDoc superclass(); /** * Return the superclass of this class. Return null if this is an * interface. A superclass is represented by either a * ClassDoc or a ParametrizedType. * * @return the superclass of this class, or null if there is no superclass. * @since 1.5 */ Type superclassType(); /** * Test whether this class is a subclass of the specified class. * If this is an interface, return false for all classes except * java.lang.Object (we must keep this unexpected * behavior for compatibility reasons). * * @param cd the candidate superclass. * @return true if cd is a superclass of this class. */ boolean subclassOf(ClassDoc cd); /** * Return interfaces implemented by this class or interfaces extended * by this interface. Includes only directly-declared interfaces, not * inherited interfaces. * Return an empty array if there are no interfaces. * *

This method cannot accommodate certain generic type constructs. * The interfaceTypes method should be used instead. * * @return an array of ClassDoc objects representing the interfaces. * @see #interfaceTypes */ ClassDoc[] interfaces(); /** * Return interfaces implemented by this class or interfaces extended * by this interface. Includes only directly-declared interfaces, not * inherited interfaces. * Return an empty array if there are no interfaces. * * @return an array of interfaces, each represented by a * ClassDoc or a ParametrizedType. * @since 1.5 */ Type[] interfaceTypes(); /** * Return the formal type parameters of this class or interface. * Return an empty array if there are none. * * @return the formal type parameters of this class or interface. * @since 1.5 */ TypeVariable[] typeParameters(); /** * Return the type parameter tags of this class or interface. * Return an empty array if there are none. * * @return the type parameter tags of this class or interface. * @since 1.5 */ ParamTag[] typeParamTags(); /** * Return * included * fields in this class or interface. * Excludes enum constants if this is an enum type. * * @return an array of FieldDoc objects representing the included * fields in this class or interface. */ FieldDoc[] fields(); /** * Return fields in this class or interface, filtered to the specified * access * modifier option. * Excludes enum constants if this is an enum type. * * @param filter Specify true to filter according to the specified access * modifier option. * Specify false to include all fields regardless of * access modifier option. * @return an array of FieldDoc objects representing the included * fields in this class or interface. */ FieldDoc[] fields(boolean filter); /** * Return the enum constants if this is an enum type. * Return an empty array if there are no enum constants, or if * this is not an enum type. * * @return the enum constants if this is an enum type. */ FieldDoc[] enumConstants(); /** * Return * included * methods in this class or interface. * Same as methods(true). * * @return an array of MethodDoc objects representing the included * methods in this class or interface. Does not include * constructors or annotation type elements. */ MethodDoc[] methods(); /** * Return methods in this class or interface, filtered to the specified * access * modifier option. Does not include constructors or annotation * type elements. * * @param filter Specify true to filter according to the specified access * modifier option. * Specify false to include all methods regardless of * access modifier option. * @return an array of MethodDoc objects representing the included * methods in this class or interface. */ MethodDoc[] methods(boolean filter); /** * Return * included * constructors in this class. An array containing the default * no-arg constructor is returned if no other constructors exist. * Return empty array if this is an interface. * * @return an array of ConstructorDoc objects representing the included * constructors in this class. */ ConstructorDoc[] constructors(); /** * Return constructors in this class, filtered to the specified * access * modifier option. Return an array containing the default * no-arg constructor if no other constructors exist. * * @param filter Specify true to filter according to the specified access * modifier option. * Specify false to include all constructors regardless of * access modifier option. * @return an array of ConstructorDoc objects representing the included * constructors in this class. */ ConstructorDoc[] constructors(boolean filter); /** * Return * included * nested classes and interfaces within this class or interface. * This includes both static and non-static nested classes. * (This method should have been named nestedClasses(), * as inner classes are technically non-static.) Anonymous and local classes * or interfaces are not included. * * @return an array of ClassDoc objects representing the included classes * and interfaces defined in this class or interface. */ ClassDoc[] innerClasses(); /** * Return nested classes and interfaces within this class or interface * filtered to the specified * access * modifier option. * This includes both static and non-static nested classes. * Anonymous and local classes are not included. * * @param filter Specify true to filter according to the specified access * modifier option. * Specify false to include all nested classes regardless of * access modifier option. * @return a filtered array of ClassDoc objects representing the included * classes and interfaces defined in this class or interface. */ ClassDoc[] innerClasses(boolean filter); /** * Find the specified class or interface within the context of this class doc. * Search order: 1) qualified name, 2) nested in this class or interface, * 3) in this package, 4) in the class imports, 5) in the package imports. * Return the ClassDoc if found, null if not found. */ ClassDoc findClass(String className); /** * Get the list of classes and interfaces declared as imported. * These are called "single-type-import declarations" in * The Java™ Language Specification. * * @return an array of ClassDoc representing the imported classes. * * @deprecated Import declarations are implementation details that * should not be exposed here. In addition, not all imported * classes are imported through single-type-import declarations. */ @Deprecated ClassDoc[] importedClasses(); /** * Get the list of packages declared as imported. * These are called "type-import-on-demand declarations" in * The Java™ Language Specification. * * @return an array of PackageDoc representing the imported packages. * * @deprecated Import declarations are implementation details that * should not be exposed here. In addition, this method's * return type does not allow for all type-import-on-demand * declarations to be returned. */ @Deprecated PackageDoc[] importedPackages(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/javadoc/ConstructorDoc.java0000644000000000000000000000256612214026367027046 0ustar 00000000000000/* * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.javadoc; /** * Represents a constructor of a java class. * * @since 1.2 * @author Robert Field */ public interface ConstructorDoc extends ExecutableMemberDoc { } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/javadoc/Doc.java0000644000000000000000000002007212214026367024570 0ustar 00000000000000/* * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.javadoc; import java.text.BreakIterator; import java.util.Locale; /** * Represents Java language constructs (package, class, constructor, * method, field) which have comments and have been processed by this * run of javadoc. All Doc objects are unique, that is, they * are == comparable. * * @since 1.2 * @author Robert Field * @author Scott Seligman (generics, enums, annotations) */ public interface Doc extends Comparable { /** * Return the text of the comment for this doc item. * Tags have been removed. */ String commentText(); /** * Return all tags in this Doc item. * * @return an array of {@link Tag} objects containing all tags on * this Doc item. */ Tag[] tags(); /** * Return tags of the specified {@linkplain Tag#kind() kind} in * this Doc item. * * For example, if 'tagname' has value "@serial", all tags in * this Doc item of kind "@serial" will be returned. * * @param tagname name of the tag kind to search for. * @return an array of Tag containing all tags whose 'kind()' * matches 'tagname'. */ Tag[] tags(String tagname); /** * Return the see also tags in this Doc item. * * @return an array of SeeTag containing all @see tags. */ SeeTag[] seeTags(); /** * Return comment as an array of tags. Includes inline tags * (i.e. {@link reference} tags) but not * block tags. * Each section of plain text is represented as a {@link Tag} * of {@linkplain Tag#kind() kind} "Text". * Inline tags are represented as a {@link SeeTag} of kind "@see" * and name "@link". * * @return an array of {@link Tag}s representing the comment */ Tag[] inlineTags(); /** * Return the first sentence of the comment as an array of tags. * Includes inline tags * (i.e. {@link reference} tags) but not * block tags. * Each section of plain text is represented as a {@link Tag} * of {@linkplain Tag#kind() kind} "Text". * Inline tags are represented as a {@link SeeTag} of kind "@see" * and name "@link". *

* If the locale is English language, the first sentence is * determined by the rules described in the Java Language * Specification (first version): "This sentence ends * at the first period that is followed by a blank, tab, or * line terminator or at the first tagline.", in * addition a line will be terminated by block * HTML tags: <p> </p> <h1> * <h2> <h3> <h4> <h5> <h6> * <hr> <pre> or </pre>. * If the locale is not English, the sentence end will be * determined by * {@link BreakIterator#getSentenceInstance(Locale)}. * @return an array of {@link Tag}s representing the * first sentence of the comment */ Tag[] firstSentenceTags(); /** * Return the full unprocessed text of the comment. Tags * are included as text. Used mainly for store and retrieve * operations like internalization. */ String getRawCommentText(); /** * Set the full unprocessed text of the comment. Tags * are included as text. Used mainly for store and retrieve * operations like internalization. */ void setRawCommentText(String rawDocumentation); /** * Returns the non-qualified name of this Doc item. * * @return the name */ String name(); /** * Compares this doc object with the specified object for order. Returns a * negative integer, zero, or a positive integer as this doc object is less * than, equal to, or greater than the given object. *

* This method satisfies the {@link java.lang.Comparable} interface. * * @param obj the Object to be compared. * @return a negative integer, zero, or a positive integer as this Object * is less than, equal to, or greater than the given Object. * @exception ClassCastException the specified Object's type prevents it * from being compared to this Object. */ int compareTo(Object obj); /** * Is this Doc item a field (but not an enum constant)? * * @return true if it represents a field */ boolean isField(); /** * Is this Doc item an enum constant? * * @return true if it represents an enum constant * @since 1.5 */ boolean isEnumConstant(); /** * Is this Doc item a constructor? * * @return true if it represents a constructor */ boolean isConstructor(); /** * Is this Doc item a method (but not a constructor or annotation * type element)? * * @return true if it represents a method */ boolean isMethod(); /** * Is this Doc item an annotation type element? * * @return true if it represents an annotation type element * @since 1.5 */ boolean isAnnotationTypeElement(); /** * Is this Doc item an interface (but not an annotation type)? * * @return true if it represents an interface */ boolean isInterface(); /** * Is this Doc item an exception class? * * @return true if it represents an exception */ boolean isException(); /** * Is this Doc item an error class? * * @return true if it represents a error */ boolean isError(); /** * Is this Doc item an enum type? * * @return true if it represents an enum type * @since 1.5 */ boolean isEnum(); /** * Is this Doc item an annotation type? * * @return true if it represents an annotation type * @since 1.5 */ boolean isAnnotationType(); /** * Is this Doc item an * ordinary * class? * (i.e. not an interface, annotation type, enum, exception, or error)? * * @return true if it represents an ordinary class */ boolean isOrdinaryClass(); /** * Is this Doc item a * class * (and not an interface or annotation type)? * This includes ordinary classes, enums, errors and exceptions. * * @return true if it represents a class */ boolean isClass(); /** * Return true if this Doc item is * included * in the result set. */ boolean isIncluded(); /** * Return the source position of the first line of the * corresponding declaration, or null if * no position is available. A default constructor returns * null because it has no location in the source file. * * @since 1.4 */ SourcePosition position(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/javadoc/DocErrorReporter.java0000644000000000000000000000472612214026367027335 0ustar 00000000000000/* * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.javadoc; /** * This interface provides error, warning and notice printing. * * @since 1.2 * @author Robert Field */ public interface DocErrorReporter { /** * Print error message and increment error count. * * @param msg message to print */ void printError(String msg); /** * Print an error message and increment error count. * * @param pos the position item where the error occurs * @param msg message to print * @since 1.4 */ void printError(SourcePosition pos, String msg); /** * Print warning message and increment warning count. * * @param msg message to print */ void printWarning(String msg); /** * Print warning message and increment warning count. * * @param pos the position item where the warning occurs * @param msg message to print * @since 1.4 */ void printWarning(SourcePosition pos, String msg); /** * Print a message. * * @param msg message to print */ void printNotice(String msg); /** * Print a message. * * @param pos the position item where the message occurs * @param msg message to print * @since 1.4 */ void printNotice(SourcePosition pos, String msg); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/javadoc/Doclet.java0000644000000000000000000001026312214026367025276 0ustar 00000000000000/* * Copyright (c) 1997, 2003, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.javadoc; /** * This is an example of a starting class for a doclet, * showing the entry-point methods. A starting class must * import com.sun.javadoc.* and implement the * start(RootDoc) method, as described in the * package * description. If the doclet takes command line options, * it must also implement optionLength and * validOptions. * *

A doclet supporting the language features added since 1.1 * (such as generics and annotations) should indicate this * by implementing languageVersion. In the absence of * this the doclet should not invoke any of the Doclet API methods * added since 1.5, and * the results of several other methods are modified so as * to conceal the new constructs (such as type parameters) from * the doclet. * *

To start the doclet, pass * -doclet followed by the fully-qualified * name of the starting class on the javadoc tool command line. */ public abstract class Doclet { /** * Generate documentation here. * This method is required for all doclets. * * @return true on success. */ public static boolean start(RootDoc root) { return true; } /** * Check for doclet-added options. Returns the number of * arguments you must specify on the command line for the * given option. For example, "-d docs" would return 2. *

* This method is required if the doclet contains any options. * If this method is missing, Javadoc will print an invalid flag * error for every option. * * @return number of arguments on the command line for an option * including the option name itself. Zero return means * option not known. Negative value means error occurred. */ public static int optionLength(String option) { return 0; // default is option unknown } /** * Check that options have the correct arguments. *

* This method is not required, but is recommended, * as every option will be considered valid if this method * is not present. It will default gracefully (to true) * if absent. *

* Printing option related error messages (using the provided * DocErrorReporter) is the responsibility of this method. * * @return true if the options are valid. */ public static boolean validOptions(String options[][], DocErrorReporter reporter) { return true; // default is options are valid } /** * Return the version of the Java Programming Language supported * by this doclet. *

* This method is required by any doclet supporting a language version * newer than 1.1. * * @return the language version supported by this doclet. * @since 1.5 */ public static LanguageVersion languageVersion() { return LanguageVersion.JAVA_1_1; } } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/javadoc/ExecutableMemberDoc.java0000644000000000000000000001122412214026367027721 0ustar 00000000000000/* * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.javadoc; /** * Represents a method or constructor of a java class. * * @since 1.2 * @author Robert Field */ public interface ExecutableMemberDoc extends MemberDoc { /** * Return exceptions this method or constructor throws. * If the type of the exception is a type variable, return the * ClassDoc of its erasure. * *

The thrownExceptions method cannot * accommodate certain generic type constructs. The * thrownExceptionTypes method should be used * instead. * * @return an array of ClassDoc[] representing the exceptions * thrown by this method. * @see #thrownExceptionTypes */ ClassDoc[] thrownExceptions(); /** * Return exceptions this method or constructor throws. * * @return an array representing the exceptions thrown by this method. * Each array element is either a ClassDoc or a * TypeVariable. * @since 1.5 */ Type[] thrownExceptionTypes(); /** * Return true if this method is native */ boolean isNative(); /** * Return true if this method is synchronized */ boolean isSynchronized(); /** * Return true if this method was declared to take a variable number * of arguments. * * @since 1.5 */ public boolean isVarArgs(); /** * Get argument information. * * @see Parameter * * @return an array of Parameter, one element per argument * in the order the arguments are present. */ Parameter[] parameters(); /** * Get the receiver type of this executable element. * * @return the receiver type of this executable element. * @since 1.8 */ Type receiverType(); /** * Return the throws tags in this method. * * @return an array of ThrowTag containing all @exception * and @throws tags. */ ThrowsTag[] throwsTags(); /** * Return the param tags in this method, excluding the type * parameter tags. * * @return an array of ParamTag containing all @param tags * corresponding to the parameters of this method. */ ParamTag[] paramTags(); /** * Return the type parameter tags in this method. * * @return an array of ParamTag containing all @param tags * corresponding to the type parameters of this method. * @since 1.5 */ ParamTag[] typeParamTags(); /** * Get the signature. It is the parameter list, type is qualified. * For instance, for a method mymethod(String x, int y), * it will return (java.lang.String,int). */ String signature(); /** * get flat signature. all types are not qualified. * return a String, which is the flat signiture of this member. * It is the parameter list, type is not qualified. * For instance, for a method mymethod(String x, int y), * it will return (String, int). */ String flatSignature(); /** * Return the formal type parameters of this method or constructor. * Return an empty array if this method or constructor is not generic. * * @return the formal type parameters of this method or constructor. * @since 1.5 */ TypeVariable[] typeParameters(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/javadoc/FieldDoc.java0000644000000000000000000000467012214026367025542 0ustar 00000000000000/* * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.javadoc; /** * Represents a field in a java class. * * @see MemberDoc * * @since 1.2 * @author Robert Field */ public interface FieldDoc extends MemberDoc { /** * Get type of this field. */ Type type(); /** * Return true if this field is transient */ boolean isTransient(); /** * Return true if this field is volatile */ boolean isVolatile(); /** * Return the serialField tags in this FieldDoc item. * * @return an array of SerialFieldTag objects containing * all @serialField tags. */ SerialFieldTag[] serialFieldTags(); /** * Get the value of a constant field. * * @return the value of a constant field. The value is * automatically wrapped in an object if it has a primitive type. * If the field is not constant, returns null. */ Object constantValue(); /** * Get the value of a constant field. * * @return the text of a Java language expression whose value * is the value of the constant. The expression uses no identifiers * other than primitive literals. If the field is * not constant, returns null. */ String constantValueExpression(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/javadoc/LanguageVersion.java0000644000000000000000000000333212214026367027154 0ustar 00000000000000/* * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.javadoc; /** * Java Programming Language version. The constants of this enum * identify the JDK and J2SE releases containing language changes * relevant to doclets. *

* All doclets support at least the 1.1 language version. * The first release subsequent to this with language changes * affecting doclets is 1.5. * * @since 1.5 */ public enum LanguageVersion { /** 1.1 added nested classes and interfaces. */ JAVA_1_1, /** 1.5 added generic types, annotations, enums, and varArgs. */ JAVA_1_5 } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/javadoc/MemberDoc.java0000644000000000000000000000340212214026367025716 0ustar 00000000000000/* * Copyright (c) 1998, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.javadoc; /** * Represents a member of a java class: field, constructor, or method. * This is an abstract class dealing with information common to * method, constructor and field members. Class members of a class * (innerclasses) are represented instead by ClassDoc. * * @see MethodDoc * @see FieldDoc * @see ClassDoc * * @author Kaiyang Liu (original) * @author Robert Field (rewrite) */ public interface MemberDoc extends ProgramElementDoc { /** * Returns true if this member was synthesized by the compiler. */ boolean isSynthetic(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/javadoc/MethodDoc.java0000644000000000000000000000641012214026367025731 0ustar 00000000000000/* * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.javadoc; /** * Represents a method of a java class. * * @since 1.2 * @author Robert Field */ public interface MethodDoc extends ExecutableMemberDoc { /** * Return true if this method is abstract */ boolean isAbstract(); /** * Return true if this method is default */ boolean isDefault(); /** * Get return type. * * @return the return type of this method, null if it * is a constructor. */ Type returnType(); /** * Return the class containing the method that this method overrides. * *

The overriddenClass method cannot * accommodate certain generic type constructs. The * overriddenType method should be used instead. * * @return a ClassDoc representing the superclass * defining a method that this method overrides, or null if * this method does not override. */ ClassDoc overriddenClass(); /** * Return the type containing the method that this method overrides. * It may be a ClassDoc or a ParameterizedType. * * @return the supertype whose method is overridden, or null if this * method does not override another in a superclass * @since 1.5 */ Type overriddenType(); /** * Return the method that this method overrides. * * @return a MethodDoc representing a method definition * in a superclass this method overrides, null if * this method does not override. */ MethodDoc overriddenMethod(); /** * Tests whether this method overrides another. * The overridden method may be one declared in a superclass or * a superinterface (unlike {@link #overriddenMethod()}). * *

When a non-abstract method overrides an abstract one, it is * also said to implement the other. * * @param meth the other method to examine * @return true if this method overrides the other * @since 1.5 */ boolean overrides(MethodDoc meth); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/javadoc/PackageDoc.java0000644000000000000000000001011312214026367026037 0ustar 00000000000000/* * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.javadoc; /** * Represents a java package. Provides access to information * about the package, the package's comment and tags, and the * classes in the package. *

* Each method whose return type is an array will return an empty * array (never null) when there are no objects in the result. * * @since 1.2 * @author Kaiyang Liu (original) * @author Robert Field (rewrite) */ public interface PackageDoc extends Doc { /** * Get all classes and interfaces in the package, filtered to the specified * access * modifier option. * * @return filtered classes and interfaces in this package * @param filter Specifying true filters according to the specified access * modifier option. * Specifying false includes all classes and interfaces * regardless of access modifier option. * @since 1.4 */ ClassDoc[] allClasses(boolean filter); /** * Get all * included * classes and interfaces in the package. Same as allClasses(true). * * @return all included classes and interfaces in this package. */ ClassDoc[] allClasses(); /** * Get included * ordinary * classes (that is, exclude exceptions, errors, enums, interfaces, and * annotation types) * in this package. * * @return included ordinary classes in this package. */ ClassDoc[] ordinaryClasses(); /** * Get included Exception classes in this package. * * @return included Exceptions in this package. */ ClassDoc[] exceptions(); /** * Get included Error classes in this package. * * @return included Errors in this package. */ ClassDoc[] errors(); /** * Get included enum types in this package. * * @return included enum types in this package. * @since 1.5 */ ClassDoc[] enums(); /** * Get included interfaces in this package, omitting annotation types. * * @return included interfaces in this package. */ ClassDoc[] interfaces(); /** * Get included annotation types in this package. * * @return included annotation types in this package. * @since 1.5 */ AnnotationTypeDoc[] annotationTypes(); /** * Get the annotations of this package. * Return an empty array if there are none. * * @return the annotations of this package. * @since 1.5 */ AnnotationDesc[] annotations(); /** * Lookup a class or interface within this package. * * @return ClassDoc of found class or interface, * or null if not found. */ ClassDoc findClass(String className); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/javadoc/ParamTag.java0000644000000000000000000000442612214026367025564 0ustar 00000000000000/* * Copyright (c) 1998, 2003, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.javadoc; /** * Represents an @param documentation tag. * Stores the name and comment parts of the parameter tag. * An @param tag may represent either a method or constructor parameter, * or a type parameter. * * @author Robert Field * */ public interface ParamTag extends Tag { /** * Return the name of the parameter or type parameter * associated with this ParamTag. * The angle brackets delimiting a type parameter are not part of * its name. * * @return the parameter name. */ String parameterName(); /** * Return the parameter comment * associated with this ParamTag. * * @return the parameter comment. */ String parameterComment(); /** * Return true if this ParamTag corresponds to a type * parameter. Return false if it corresponds to an ordinary parameter * of a method or constructor. * * @return true if this ParamTag corresponds to a type * parameter. * @since 1.5 */ boolean isTypeParameter(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/javadoc/Parameter.java0000644000000000000000000000460012214026367026002 0ustar 00000000000000/* * Copyright (c) 1998, 2004, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.javadoc; /** * Parameter information. * This includes a parameter type and parameter name. * * @author Robert Field */ public interface Parameter { /** * Get the type of this parameter. */ Type type(); /** * Get local name of this parameter. * For example if parameter is the short 'index', returns "index". */ String name(); /** * Get type name of this parameter. * For example if parameter is the short 'index', returns "short". *

* This method returns a complete string * representation of the type, including the dimensions of arrays and * the type arguments of parameterized types. Names are qualified. */ String typeName(); /** * Returns a string representation of the parameter. *

* For example if parameter is the short 'index', returns "short index". * * @return type and parameter name of this parameter. */ String toString(); /** * Get the annotations of this parameter. * Return an empty array if there are none. * * @return the annotations of this parameter. * @since 1.5 */ AnnotationDesc[] annotations(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/javadoc/ParameterizedType.java0000644000000000000000000000755612214026367027535 0ustar 00000000000000/* * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.javadoc; /** * Represents an invocation of a generic class or interface. For example, * given the generic interface {@code List}, possible invocations * include: *

 *      {@code List}
 *      {@code List}
 *      {@code List}
 * 
* A generic inner class {@code Outer.Inner} might be invoked as: *
 *      {@code Outer.Inner}
 * 
* * @author Scott Seligman * @since 1.5 */ public interface ParameterizedType extends Type { /** * Return the generic class or interface that declared this type. * * @return the generic class or interface that declared this type. */ ClassDoc asClassDoc(); /** * Return the actual type arguments of this type. * For a generic type that is nested within some other generic type * (such as {@code Outer.Inner}), * only the type arguments of the innermost type are included. * * @return the actual type arguments of this type. */ Type[] typeArguments(); /** * Return the class type that is a direct supertype of this one. * This is the superclass of this type's declaring class, * with type arguments substituted in. * Return null if this is an interface type. * *

For example, if this parameterized type is * {@code java.util.ArrayList}, the result will be * {@code java.util.AbstractList}. * * @return the class type that is a direct supertype of this one. */ Type superclassType(); /** * Return the interface types directly implemented by or extended by this * parameterized type. * These are the interfaces directly implemented or extended * by this type's declaring class or interface, * with type arguments substituted in. * Return an empty array if there are no interfaces. * *

For example, the interface extended by * {@code java.util.Set} is {@code java.util.Collection}. * * @return the interface types directly implemented by or extended by this * parameterized type. */ Type[] interfaceTypes(); /** * Return the type that contains this type as a member. * Return null is this is a top-level type. * *

For example, the containing type of * {@code AnInterface.Nested} is the ClassDoc * representing {@code AnInterface}, and the containing type of * {@code Outer.Inner} is the * ParameterizedType representing {@code Outer}. * * @return the type that contains this type as a member. */ Type containingType(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/javadoc/ProgramElementDoc.java0000644000000000000000000000714412214026367027437 0ustar 00000000000000/* * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.javadoc; /** * Represents a java program element: class, interface, field, * constructor, or method. * This is an abstract class dealing with information common to * these elements. * * @see MemberDoc * @see ClassDoc * * @author Robert Field */ public interface ProgramElementDoc extends Doc { /** * Get the containing class or interface of this program element. * * @return a ClassDoc for this element's containing class or interface. * If this is a top-level class or interface, return null. */ ClassDoc containingClass(); /** * Get the package that this program element is contained in. * * @return a PackageDoc for this element containing package. * If in the unnamed package, this PackageDoc will have the * name "". */ PackageDoc containingPackage(); /** * Get the fully qualified name of this program element. * For example, for the class java.util.Hashtable, * return "java.util.Hashtable". *

* For the method bar() in class Foo * in the unnamed package, return "Foo.bar". * * @return the qualified name of the program element as a String. */ String qualifiedName(); /** * Get the modifier specifier integer. * * @see java.lang.reflect.Modifier */ int modifierSpecifier(); /** * Get modifiers string. * For example, for: *

     *   public abstract int foo() { ... }
     * 
* return "public abstract". * Annotations are not included. */ String modifiers(); /** * Get the annotations of this program element. * Return an empty array if there are none. * * @return the annotations of this program element. * @since 1.5 */ AnnotationDesc[] annotations(); /** * Return true if this program element is public. */ boolean isPublic(); /** * Return true if this program element is protected. */ boolean isProtected(); /** * Return true if this program element is private. */ boolean isPrivate(); /** * Return true if this program element is package private. */ boolean isPackagePrivate(); /** * Return true if this program element is static. */ boolean isStatic(); /** * Return true if this program element is final. */ boolean isFinal(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/javadoc/RootDoc.java0000644000000000000000000000702712214026367025441 0ustar 00000000000000/* * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.javadoc; /** * Represents the root of the program structure information * for one run of javadoc. From this root all other program * structure information can be extracted. * Also represents the command line information -- the * packages, classes and options specified by the user. * * @since 1.2 * @author Robert Field */ public interface RootDoc extends Doc, DocErrorReporter { /** * Command line options. *

* For example, given: *

     *     javadoc -foo this that -bar other ...
* * this method will return: *
     *      options()[0][0] = "-foo"
     *      options()[0][1] = "this"
     *      options()[0][2] = "that"
     *      options()[1][0] = "-bar"
     *      options()[1][1] = "other"
* * @return an array of arrays of String. */ String[][] options(); /** * Return the packages * specified * on the command line. * If -subpackages and -exclude options * are used, return all the non-excluded packages. * * @return packages specified on the command line. */ PackageDoc[] specifiedPackages(); /** * Return the classes and interfaces * specified * as source file names on the command line. * * @return classes and interfaces specified on the command line. */ ClassDoc[] specifiedClasses(); /** * Return the * included classes and interfaces in all packages. * * @return included classes and interfaces in all packages. */ ClassDoc[] classes(); /** * Return a PackageDoc for the specified package name. * * @param name package name * * @return a PackageDoc holding the specified package, null if * this package is not referenced. */ PackageDoc packageNamed(String name); /** * Return a ClassDoc for the specified class or interface name. * * @param qualifiedName * qualified * class or package name * * @return a ClassDoc holding the specified class, null if * this class is not referenced. */ ClassDoc classNamed(String qualifiedName); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/javadoc/SeeTag.java0000644000000000000000000001137612214026367025242 0ustar 00000000000000/* * Copyright (c) 1998, 2002, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.javadoc; /** * Represents a user-defined cross-reference to related documentation. * The tag can reference a package, class or member, or can hold * plain text. (The plain text might be a reference * to something not online, such as a printed book, or be a hard-coded * HTML link.) The reference can either be inline with the comment, * using {@link}, or a separate block comment, * using @see. * Method name() returns "@link" (no curly braces) or * "@see", depending on the tag. * Method kind() returns "@see" for both tags. * * @author Kaiyang Liu (original) * @author Robert Field (rewrite) * @author Atul M Dambalkar * */ public interface SeeTag extends Tag { /** * Get the label of the @see tag. * Return null if no label is present. * For example, for: *

*   @see String#trim() the trim method *

* return "the trim method". */ String label(); /** * Get the package doc when @see references only a package. * Return null if the package cannot be found, or if * @see references any other element (class, * interface, field, constructor, method) or non-element. * For example, for: *

*   @see java.lang *

* return the PackageDoc for java.lang. */ public PackageDoc referencedPackage(); /** * Get the class or interface name of the @see reference. * The name is fully qualified if the name specified in the * original @see tag was fully qualified, or if the class * or interface can be found; otherwise it is unqualified. * If @see references only a package name, then return * the package name instead. * For example, for: *

*   @see String#valueOf(java.lang.Object) *

* return "java.lang.String". * For "@see java.lang", return "java.lang". * Return null if @see references a non-element, such as * @see <a href="java.sun.com">. */ String referencedClassName(); /** * Get the class doc referenced by the class name part of @see. * Return null if the class cannot be found. * For example, for: *

*   @see String#valueOf(java.lang.Object) *

* return the ClassDoc for java.lang.String. */ ClassDoc referencedClass(); /** * Get the field, constructor or method substring of the @see * reference. Return null if the reference is to any other * element or to any non-element. * References to member classes (nested classes) return null. * For example, for: *

*   @see String#startsWith(String) *

* return "startsWith(String)". */ String referencedMemberName(); /** * Get the member doc for the field, constructor or method * referenced by @see. Return null if the member cannot * be found or if the reference is to any other element or to any * non-element. * References to member classes (nested classes) return null. * For example, for: *

*   @see String#startsWith(java.lang.String) *

* return the MethodDoc for startsWith. */ MemberDoc referencedMember(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/javadoc/SerialFieldTag.java0000644000000000000000000000576312214026367026714 0ustar 00000000000000/* * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.javadoc; /** * Documents a Serializable field defined by an ObjectStreamField. *
 * The class parses and stores the three serialField tag parameters:
 *
 * - field name
 * - field type name
 *      (fully-qualified or visible from the current import context)
 * - description of the valid values for the field

 * 
* This tag is only allowed in the javadoc for the special member * serialPersistentFields. * * @author Joe Fialli * * @see java.io.ObjectStreamField */ public interface SerialFieldTag extends Tag, Comparable { /** * Return the serializable field name. */ public String fieldName(); /** * Return the field type string. */ public String fieldType(); /** * Return the ClassDoc for field type. * * @return null if no ClassDoc for field type is visible from * containingClass context. */ public ClassDoc fieldTypeDoc(); /** * Return the field comment. If there is no serialField comment, return * javadoc comment of corresponding FieldDoc. */ public String description(); /** * Compares this Object with the specified Object for order. Returns a * negative integer, zero, or a positive integer as this Object is less * than, equal to, or greater than the given Object. *

* Included to make SerialFieldTag items java.lang.Comparable. * * @param obj the Object to be compared. * @return a negative integer, zero, or a positive integer as this Object * is less than, equal to, or greater than the given Object. * @exception ClassCastException the specified Object's type prevents it * from being compared to this Object. * @since 1.2 */ public int compareTo(Object obj); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/javadoc/SourcePosition.java0000644000000000000000000000400712214026367027050 0ustar 00000000000000/* * Copyright (c) 2001, 2002, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.javadoc; import java.io.File; /** * This interface describes a source position: filename, line number, * and column number. * * @since 1.4 * @author Neal M Gafter */ public interface SourcePosition { /** The source file. Returns null if no file information is * available. */ File file(); /** The line in the source file. The first line is numbered 1; * 0 means no line number information is available. */ int line(); /** The column in the source file. The first column is * numbered 1; 0 means no column information is available. * Columns count characters in the input stream; a tab * advances the column number to the next 8-column tab stop. */ int column(); /** Convert the source position to the form "Filename:line". */ String toString(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/javadoc/Tag.java0000644000000000000000000001425012214026367024577 0ustar 00000000000000/* * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.javadoc; import java.text.BreakIterator; import java.util.Locale; /** * Represents a simple documentation tag, such as @since, @author, @version. * Given a tag (e.g. "@since 1.2"), holds tag name (e.g. "@since") * and tag text (e.g. "1.2"). Tags with structure or which require * special processing are handled by subclasses such as ParamTag * (for @param), SeeTag (for @see and {@link}), and ThrowsTag * (for @throws). * * @author Robert Field * @author Atul M Dambalkar * @see SeeTag * @see ParamTag * @see ThrowsTag * @see SerialFieldTag * @see Doc#tags() * */ public interface Tag { /** * Return the name of this tag. The name is the string * starting with "@" that is used in a doc comment, such as * @return. For inline tags, such as * {@link}, the curly brackets * are not part of the name, so in this example the name * would be simply @link. * * @return the name of this tag */ String name(); /** * Return the containing {@link Doc} of this Tag element. * * @return the containing {@link Doc} of this Tag element */ Doc holder(); /** * Return the kind of this tag. * For most tags, * kind() == name(); * the following table lists those cases where there is more * than one tag of a given kind: *

* * * * * * * * * *
{@code kind() } {@code name() }
{@code @throws } {@code @throws }
{@code @throws } {@code @exception }
{@code @see } {@code @see }
{@code @see } {@code @link }
{@code @see } {@code @linkplain }
{@code @serial } {@code @serial }
{@code @serial } {@code @serialData }
* * @return the kind of this tag. */ String kind(); /** * Return the text of this tag, that is, the portion beyond tag name. * * @return the text of this tag */ String text(); /** * Convert this object to a string. */ String toString(); /** * For a documentation comment with embedded {@link} * tags, return an array of Tag objects. The entire * doc comment is broken down into strings separated by * {@link} tags, where each successive element * of the array represents either a string or * {@link} tag, in order, from start to end. * Each string is represented by a Tag object of * name "Text", where {@link #text()} returns the string. Each * {@link} tag is represented by a * {@link SeeTag} of name "@link" and kind "@see". * For example, given the following comment * tag: *

* This is a {@link Doc commentlabel} example. *

* return an array of Tag objects: *

    *
  • tags[0] is a {@link Tag} with name "Text" and text consisting * of "This is a " *
  • tags[1] is a {@link SeeTag} with name "@link", referenced * class Doc and label "commentlabel" *
  • tags[2] is a {@link Tag} with name "Text" and text consisting * of " example." *
* * @return Tag[] array of tags * @see ParamTag * @see ThrowsTag */ Tag[] inlineTags(); /** * Return the first sentence of the comment as an array of tags. * Includes inline tags * (i.e. {@link reference} tags) but not * block tags. * Each section of plain text is represented as a {@link Tag} * of kind "Text". * Inline tags are represented as a {@link SeeTag} of kind "@link". * If the locale is English language, the first sentence is * determined by the rules described in the Java Language * Specification (first version): "This sentence ends * at the first period that is followed by a blank, tab, or * line terminator or at the first tagline.", in * addition a line will be terminated by paragraph and * section terminating HTML tags: <p> </p> <h1> * <h2> <h3> <h4> <h5> <h6> * <hr> <pre> or </pre>. * If the locale is not English, the sentence end will be * determined by * {@link BreakIterator#getSentenceInstance(Locale)}. * * @return an array of {@link Tag} objects representing the * first sentence of the comment */ Tag[] firstSentenceTags(); /** * Return the source position of this tag. * @return the source position of this tag. */ public SourcePosition position(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/javadoc/ThrowsTag.java0000644000000000000000000000522112214026367026004 0ustar 00000000000000/* * Copyright (c) 1998, 2003, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.javadoc; /** * Represents a @throws or @exception documentation tag. * Parses and holds the exception name and exception comment. * Note: @exception is a backwards compatible synonymy for @throws. * * @author Robert Field * @author Atul M Dambalkar * @see ExecutableMemberDoc#throwsTags() * */ public interface ThrowsTag extends Tag { /** * Return the name of the exception * associated with this ThrowsTag. * * @return name of the exception. */ String exceptionName(); /** * Return the exception comment * associated with this ThrowsTag. * * @return exception comment. */ String exceptionComment(); /** * Return a ClassDoc that represents the exception. * If the type of the exception is a type variable, return the * ClassDoc of its erasure. * *

This method cannot accommodate certain generic type * constructs. The exceptionType method * should be used instead. * * @return ClassDoc that represents the exception. * @see #exceptionType */ ClassDoc exception(); /** * Return the type of the exception * associated with this ThrowsTag. * This may be a ClassDoc or a TypeVariable. * * @return the type of the exception. * @since 1.5 */ Type exceptionType(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/javadoc/Type.java0000644000000000000000000001336112214026367025007 0ustar 00000000000000/* * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.javadoc; /** * Represents a type. A type can be a class or interface, an * invocation (like {@code List}) of a generic class or interface, * a type variable, a wildcard type ("?"), * or a primitive data type (like char). * * @since 1.2 * @author Kaiyang Liu (original) * @author Robert Field (rewrite) * @author Scott Seligman (generics) */ public interface Type { /** * Return unqualified name of type excluding any dimension information. *

* For example, a two dimensional array of String returns * "String". */ String typeName(); /** * Return qualified name of type excluding any dimension information. *

* For example, a two dimensional array of String * returns "java.lang.String". */ String qualifiedTypeName(); /** * Return the simple name of this type excluding any dimension information. * This is the unqualified name of the type, except that for nested types * only the identifier of the innermost type is included. *

* For example, the class {@code Outer.Inner} returns * "Inner". * * @since 1.5 */ String simpleTypeName(); /** * Return the type's dimension information, as a string. *

* For example, a two dimensional array of String returns * "[][]". */ String dimension(); /** * Return a string representation of the type. * This includes any dimension information and type arguments. *

* For example, a two dimensional array of String may return * "java.lang.String[][]", * and the parameterized type {@code List} may return * "{@code java.util.List}". * * @return a string representation of the type. */ String toString(); /** * Return true if this type represents a primitive type. * * @return true if this type represents a primitive type. * @since 1.5 */ boolean isPrimitive(); /** * Return this type as a ClassDoc if it represents a class * or interface. Array dimensions are ignored. * If this type is a ParameterizedType, * TypeVariable, or WildcardType, return * the ClassDoc of the type's erasure. If this is an * AnnotationTypeDoc, return this as a ClassDoc * (but see {@link #asAnnotationTypeDoc()}). * If this is a primitive type, return null. * * @return the ClassDoc of this type, * or null if it is a primitive type. */ ClassDoc asClassDoc(); /** * Return this type as a ParameterizedType if it represents * an invocation of a generic class or interface. Array dimensions * are ignored. * * @return a ParameterizedType if the type is an * invocation of a generic type, or null if it is not. * @since 1.5 */ ParameterizedType asParameterizedType(); /** * Return this type as a TypeVariable if it represents * a type variable. Array dimensions are ignored. * * @return a TypeVariable if the type is a type variable, * or null if it is not. * @since 1.5 */ TypeVariable asTypeVariable(); /** * Return this type as a WildcardType if it represents * a wildcard type. * * @return a WildcardType if the type is a wildcard type, * or null if it is not. * @since 1.5 */ WildcardType asWildcardType(); /** * Returns this type as a AnnotatedType if it represents * an annotated type. * * @return a AnnotatedType if the type if an annotated type, * or null if it is not * @since 1.8 */ AnnotatedType asAnnotatedType(); /** * Return this type as an AnnotationTypeDoc if it represents * an annotation type. Array dimensions are ignored. * * @return an AnnotationTypeDoc if the type is an annotation * type, or null if it is not. * @since 1.5 */ AnnotationTypeDoc asAnnotationTypeDoc(); /** * If this type is an array type, return the element type of the * array. Otherwise, return null. * * @return a Type representing the element type or null. * @since 1.8 */ Type getElementType(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/javadoc/TypeVariable.java0000644000000000000000000000432612214026367026456 0ustar 00000000000000/* * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.javadoc; /** * Represents a type variable. * For example, the generic interface {@code List} has a single * type variable {@code E}. * A type variable may have explicit bounds, as in * {@code C}. * * @author Scott Seligman * @since 1.5 */ public interface TypeVariable extends Type { /** * Return the bounds of this type variable. * These are the types given by the extends clause. * Return an empty array if there are no explicit bounds. * * @return the bounds of this type variable. */ Type[] bounds(); /** * Return the class, interface, method, or constructor within * which this type variable is declared. * * @return the class, interface, method, or constructor within * which this type variable is declared. */ ProgramElementDoc owner(); /** * Get the annotations of this program element. * Return an empty array if there are none. */ public AnnotationDesc[] annotations(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/javadoc/WildcardType.java0000644000000000000000000000420212214026367026453 0ustar 00000000000000/* * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.javadoc; /** * Represents a wildcard type argument. * Examples include:

 * {@code }
 * {@code }
 * {@code }
 * 
* A wildcard type can have explicit extends bounds * or explicit super bounds or neither, but not both. * * @author Scott Seligman * @since 1.5 */ public interface WildcardType extends Type { /** * Return the upper bounds of this wildcard type argument * as given by the extends clause. * Return an empty array if no such bounds are explicitly given. * * @return the extends bounds of this wildcard type argument */ Type[] extendsBounds(); /** * Return the lower bounds of this wildcard type argument * as given by the super clause. * Return an empty array if no such bounds are explicitly given. * * @return the super bounds of this wildcard type argument */ Type[] superBounds(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/javadoc/package.html0000644000000000000000000001440312214026367025502 0ustar 00000000000000 Doclet API Package The Doclet API (also called the Javadoc API) provides a mechanism for clients to inspect the source-level structure of programs and libraries, including javadoc comments embedded in the source. This is useful for documentation, program checking, automatic code generation and many other tools.

Doclets are invoked by javadoc and use this API to write out program information to files. For example, the standard doclet is called by default and writes out documentation to HTML files.

The invocation is defined by the abstract {@link com.sun.javadoc.Doclet} class -- the entry point is the {@link com.sun.javadoc.Doclet#start(RootDoc) start} method:

    public static boolean start(RootDoc root)
The {@link com.sun.javadoc.RootDoc} instance holds the root of the program structure information. From this root all other program structure information can be extracted.

Terminology

When calling javadoc, you pass in package names and source file names -- these are called the specified packages and classes. You also pass in Javadoc options; the access control Javadoc options (-public, -protected, -package, and -private) filter program elements, producing a result set, called the included set, or "documented" set. (The unfiltered set is also available through {@link com.sun.javadoc.PackageDoc#allClasses(boolean) allClasses(false)}.)

Throughout this API, the term class is normally a shorthand for "class or interface", as in: {@link com.sun.javadoc.ClassDoc}, {@link com.sun.javadoc.PackageDoc#allClasses() allClasses()}, and {@link com.sun.javadoc.PackageDoc#findClass(String) findClass(String)}. In only a couple of other places, it means "class, as opposed to interface", as in: {@link com.sun.javadoc.Doc#isClass()}. In the second sense, this API calls out four kinds of classes: {@linkplain com.sun.javadoc.Doc#isOrdinaryClass() ordinary classes}, {@linkplain com.sun.javadoc.Doc#isEnum() enums}, {@linkplain com.sun.javadoc.Doc#isError() errors} and {@linkplain com.sun.javadoc.Doc#isException() exceptions}. Throughout the API, the detailed description of each program element describes explicitly which meaning is being used.

A qualified class or interface name is one that has its package name prepended to it, such as java.lang.String. A non-qualified name has no package name, such as String.

Example

The following is an example doclet that displays information in the @param tags of the processed classes:
import com.sun.javadoc.*;

public class ListParams extends Doclet {

    public static boolean start(RootDoc root) {
        ClassDoc[] classes = root.classes();
        for (int i = 0; i < classes.length; ++i) {
            ClassDoc cd = classes[i];
            printMembers(cd.constructors());
            printMembers(cd.methods());
        }
        return true;
    }

    static void printMembers(ExecutableMemberDoc[] mems) {
        for (int i = 0; i < mems.length; ++i) {
            ParamTag[] params = mems[i].paramTags();
            System.out.println(mems[i].qualifiedName());
            for (int j = 0; j < params.length; ++j) {
                System.out.println("   " + params[j].parameterName()
                    + " - " + params[j].parameterComment());
            }
        }
    }        
}
Interfaces and methods from the Javadoc API are marked in red. {@link com.sun.javadoc.Doclet Doclet} is an abstract class that specifies the invocation interface for doclets, {@link com.sun.javadoc.Doclet Doclet} holds class or interface information, {@link com.sun.javadoc.ExecutableMemberDoc} is a superinterface of {@link com.sun.javadoc.MethodDoc} and {@link com.sun.javadoc.ConstructorDoc}, and {@link com.sun.javadoc.ParamTag} holds information from "@param" tags.

This doclet when invoked with a command line like:

    javadoc -doclet ListParams -sourcepath <source-location> java.util
producing output like:
    ...
    java.util.ArrayList.add
       index - index at which the specified element is to be inserted.
       element - element to be inserted.
    java.util.ArrayList.remove
       index - the index of the element to removed.
    ...

@see com.sun.javadoc.Doclet @see com.sun.javadoc.RootDoc libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/doctree/AttributeTree.java0000644000000000000000000000312212214026367030161 0ustar 00000000000000/* * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.doctree; import java.util.List; import javax.lang.model.element.Name; /** * A tree node for an attribute in an HTML element. * * @since 1.8 */ @jdk.Supported public interface AttributeTree extends DocTree { @jdk.Supported enum ValueKind { EMPTY, UNQUOTED, SINGLE, DOUBLE }; Name getName(); ValueKind getValueKind(); List getValue(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/doctree/AuthorTree.java0000644000000000000000000000271112214026367027463 0ustar 00000000000000/* * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.doctree; import java.util.List; /** * A tree node for an @author block tag. * *

* @author name-text. * * @since 1.8 */ @jdk.Supported public interface AuthorTree extends BlockTagTree { List getName(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/doctree/BlockTagTree.java0000644000000000000000000000264212214026367027712 0ustar 00000000000000/* * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.doctree; /** * A tree node used as the base class for the different types of * block tags. * * @since 1.8 */ @jdk.Supported public interface BlockTagTree extends DocTree { String getTagName(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/doctree/CommentTree.java0000644000000000000000000000262312214026367027625 0ustar 00000000000000/* * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.doctree; /** * An embedded HTML comment. * *

* {@literal } * * @since 1.8 */ @jdk.Supported public interface CommentTree extends DocTree { String getBody(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/doctree/DeprecatedTree.java0000644000000000000000000000273312214026367030265 0ustar 00000000000000/* * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.doctree; import java.util.List; /** * A tree node for an @deprecated block tag. * *

* @deprecated deprecated text. * * @since 1.8 */ @jdk.Supported public interface DeprecatedTree extends BlockTagTree { List getBody(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/doctree/DocCommentTree.java0000644000000000000000000000307612214026367030256 0ustar 00000000000000/* * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.doctree; import java.util.List; /** * The top level representation of a documentation comment. * *

* first-sentence body block-tags * * @since 1.8 */ @jdk.Supported public interface DocCommentTree extends DocTree { List getFirstSentence(); List getBody(); List getBlockTags(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/doctree/DocRootTree.java0000644000000000000000000000260612214026367027575 0ustar 00000000000000/* * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.doctree; /** * A tree node for an @docroot inline tag. * *

* {@docroot} * * @since 1.8 */ @jdk.Supported public interface DocRootTree extends InlineTagTree { } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/doctree/DocTree.java0000644000000000000000000001513112214026367026726 0ustar 00000000000000/* * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.doctree; /** * Common interface for all nodes in a documentation syntax tree. * * @since 1.8 */ @jdk.Supported public interface DocTree { @jdk.Supported enum Kind { /** * Used for instances of {@link AttributeTree} * representing an HTML attribute. */ ATTRIBUTE, /** * Used for instances of {@link AuthorTree} * representing an @author tag. */ AUTHOR("author"), /** * Used for instances of {@link LiteralTree} * representing an @code tag. */ CODE("code"), /** * Used for instances of {@link CommentTree} * representing an HTML comment. */ COMMENT, /** * Used for instances of {@link DeprecatedTree} * representing an @deprecated tag. */ DEPRECATED("deprecated"), /** * Used for instances of {@link DocCommentTree} * representing a complete doc comment. */ DOC_COMMENT, /** * Used for instances of {@link DocRootTree} * representing an @docRoot tag. */ DOC_ROOT("docRoot"), /** * Used for instances of {@link EndElementTree} * representing the end of an HTML element. */ END_ELEMENT, /** * Used for instances of {@link EntityTree} * representing an HTML entity. */ ENTITY, /** * Used for instances of {@link ErroneousTree} * representing some invalid text. */ ERRONEOUS, /** * Used for instances of {@link ThrowsTree} * representing an @exception tag. */ EXCEPTION("exception"), /** * Used for instances of {@link IdentifierTree} * representing an identifier. */ IDENTIFIER, /** * Used for instances of {@link InheritDocTree} * representing an @inheritDoc tag. */ INHERIT_DOC("inheritDoc"), /** * Used for instances of {@link LinkTree} * representing an @link tag. */ LINK("link"), /** * Used for instances of {@link LinkTree} * representing an @linkplain tag. */ LINK_PLAIN("linkplain"), /** * Used for instances of {@link LiteralTree} * representing an @literal tag. */ LITERAL("literal"), /** * Used for instances of {@link ParamTree} * representing an @param tag. */ PARAM("param"), /** * Used for instances of {@link ReferenceTree} * representing a reference to a element in the * Java programming language. */ REFERENCE, /** * Used for instances of {@link ReturnTree} * representing an @return tag. */ RETURN("return"), /** * Used for instances of {@link SeeTree} * representing an @see tag. */ SEE("see"), /** * Used for instances of {@link SerialTree} * representing an @serial tag. */ SERIAL("serial"), /** * Used for instances of {@link SerialDataTree} * representing an @serialData tag. */ SERIAL_DATA("serialData"), /** * Used for instances of {@link SerialFieldTree} * representing an @serialField tag. */ SERIAL_FIELD("serialField"), /** * Used for instances of {@link SinceTree} * representing an @since tag. */ SINCE("since"), /** * Used for instances of {@link EndElementTree} * representing the start of an HTML element. */ START_ELEMENT, /** * Used for instances of {@link TextTree} * representing some documentation text. */ TEXT, /** * Used for instances of {@link ThrowsTree} * representing an @throws tag. */ THROWS("throws"), /** * Used for instances of {@link UnknownBlockTagTree} * representing an unknown block tag. */ UNKNOWN_BLOCK_TAG, /** * Used for instances of {@link UnknownInlineTagTree} * representing an unknown inline tag. */ UNKNOWN_INLINE_TAG, /** * Used for instances of {@link ValueTree} * representing an @value tag. */ VALUE("value"), /** * Used for instances of {@link VersionTree} * representing an @version tag. */ VERSION("version"), /** * An implementation-reserved node. This is the not the node * you are looking for. */ OTHER; public final String tagName; Kind() { tagName = null; } Kind(String tagName) { this.tagName = tagName; } }; /** * Gets the kind of this tree. * * @return the kind of this tree. */ Kind getKind(); /** * Accept method used to implement the visitor pattern. The * visitor pattern is used to implement operations on trees. * * @param result type of this operation. * @param type of additional data. */ R accept(DocTreeVisitor visitor, D data); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/doctree/DocTreeVisitor.java0000644000000000000000000000744512214026367030317 0ustar 00000000000000/* * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.doctree; /** * A visitor of trees, in the style of the visitor design pattern. * Classes implementing this interface are used to operate * on a tree when the kind of tree is unknown at compile time. * When a visitor is passed to an tree's {@link DocTree#accept * accept} method, the visitXYZ method most applicable * to that tree is invoked. * *

Classes implementing this interface may or may not throw a * {@code NullPointerException} if the additional parameter {@code p} * is {@code null}; see documentation of the implementing class for * details. * *

WARNING: It is possible that methods will be added to * this interface to accommodate new, currently unknown, doc comment * structures added to future versions of the Java™ programming * language. Therefore, visitor classes directly implementing this * interface may be source incompatible with future versions of the * platform. * * @param the return type of this visitor's methods. Use {@link * Void} for visitors that do not need to return results. * @param

the type of the additional parameter to this visitor's * methods. Use {@code Void} for visitors that do not need an * additional parameter. * * @since 1.8 */ @jdk.Supported public interface DocTreeVisitor { R visitAttribute(AttributeTree node, P p); R visitAuthor(AuthorTree node, P p); R visitComment(CommentTree node, P p); R visitDeprecated(DeprecatedTree node, P p); R visitDocComment(DocCommentTree node, P p); R visitDocRoot(DocRootTree node, P p); R visitEndElement(EndElementTree node, P p); R visitEntity(EntityTree node, P p); R visitErroneous(ErroneousTree node, P p); R visitIdentifier(IdentifierTree node, P p); R visitInheritDoc(InheritDocTree node, P p); R visitLink(LinkTree node, P p); R visitLiteral(LiteralTree node, P p); R visitParam(ParamTree node, P p); R visitReference(ReferenceTree node, P p); R visitReturn(ReturnTree node, P p); R visitSee(SeeTree node, P p); R visitSerial(SerialTree node, P p); R visitSerialData(SerialDataTree node, P p); R visitSerialField(SerialFieldTree node, P p); R visitSince(SinceTree node, P p); R visitStartElement(StartElementTree node, P p); R visitText(TextTree node, P p); R visitThrows(ThrowsTree node, P p); R visitUnknownBlockTag(UnknownBlockTagTree node, P p); R visitUnknownInlineTag(UnknownInlineTagTree node, P p); R visitValue(ValueTree node, P p); R visitVersion(VersionTree node, P p); R visitOther(DocTree node, P p); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/doctree/EndElementTree.java0000644000000000000000000000270212214026367030241 0ustar 00000000000000/* * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.doctree; import javax.lang.model.element.Name; /** * A tree node for the end of an HTML element. * *

* </ name > * * @since 1.8 */ @jdk.Supported public interface EndElementTree extends DocTree { Name getName(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/doctree/EntityTree.java0000644000000000000000000000266012214026367027500 0ustar 00000000000000/* * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.doctree; import javax.lang.model.element.Name; /** * A tree node for an HTML entity. * *

* & name ; * * @since 1.8 */ @jdk.Supported public interface EntityTree extends DocTree { Name getName(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/doctree/ErroneousTree.java0000644000000000000000000000316212214026367030203 0ustar 00000000000000/* * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.doctree; import javax.tools.Diagnostic; import javax.tools.JavaFileObject; /** * A tree node to stand in for a malformed text * * @since 1.8 */ @jdk.Supported public interface ErroneousTree extends TextTree { /** * Gets a diagnostic object giving details about * the reason the body text is in error. * * @return a diagnostic */ Diagnostic getDiagnostic(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/doctree/IdentifierTree.java0000644000000000000000000000266512214026367030313 0ustar 00000000000000/* * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.doctree; import javax.lang.model.element.Name; /** * An identifier in a documentation comment. * *

* name * * @since 1.8 */ @jdk.Supported public interface IdentifierTree extends DocTree { Name getName(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/doctree/InheritDocTree.java0000644000000000000000000000262212214026367030252 0ustar 00000000000000/* * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.doctree; /** * * A tree node for an @inheritDoc inline tag. * *

* {@inheritDoc} * * @since 1.8 */ @jdk.Supported public interface InheritDocTree extends InlineTagTree { } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/doctree/InlineTagTree.java0000644000000000000000000000264412214026367030100 0ustar 00000000000000/* * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.doctree; /** * A tree node used as the base class for the different types of * inline tags. * * @since 1.8 */ @jdk.Supported public interface InlineTagTree extends DocTree { String getTagName(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/doctree/LinkTree.java0000644000000000000000000000305512214026367027120 0ustar 00000000000000/* * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.doctree; import java.util.List; /** * A tree node for an @link or @linkplain inline tag. * *

* {@link reference label}
* {@linkplain reference label } * * @since 1.8 */ @jdk.Supported public interface LinkTree extends InlineTagTree { ReferenceTree getReference(); List getLabel(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/doctree/LiteralTree.java0000644000000000000000000000265712214026367027626 0ustar 00000000000000/* * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.doctree; /** * * A tree node for an @literal or @code inline tag. * *

* {@literal text} * * @since 1.8 */ @jdk.Supported public interface LiteralTree extends InlineTagTree { TextTree getBody(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/doctree/ParamTree.java0000644000000000000000000000303212214026367027256 0ustar 00000000000000/* * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.doctree; import java.util.List; /** * A tree node for an @param block tag. * *

* @param parameter-name description * * @since 1.8 */ @jdk.Supported public interface ParamTree extends BlockTagTree { boolean isTypeParameter(); IdentifierTree getName(); List getDescription(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/doctree/ReferenceTree.java0000644000000000000000000000266012214026367030122 0ustar 00000000000000/* * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.doctree; /** * A tree node to a reference to a Java language element. * *

* package.class#field * * @since 1.8 */ @jdk.Supported public interface ReferenceTree extends DocTree { String getSignature(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/doctree/ReturnTree.java0000644000000000000000000000272112214026367027501 0ustar 00000000000000/* * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.doctree; import java.util.List; /** * A tree node for an @return block tag. * *

* @return description * * @since 1.8 */ @jdk.Supported public interface ReturnTree extends BlockTagTree { List getDescription(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/doctree/SeeTree.java0000644000000000000000000000304012214026367026731 0ustar 00000000000000/* * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.doctree; import java.util.List; /** * * A tree node for an @see block tag. * *

* @see "string"
* @see <a href="URL#value"> label </a>
* @see reference * * @since 1.8 */ @jdk.Supported public interface SeeTree extends BlockTagTree { List getReference(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/doctree/SerialDataTree.java0000644000000000000000000000274212214026367030236 0ustar 00000000000000/* * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.doctree; import java.util.List; /** * A tree node for an @serialData block tag. * *

* @serialData data-description * * @since 1.8 */ @jdk.Supported public interface SerialDataTree extends BlockTagTree { List getDescription(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/doctree/SerialFieldTree.java0000644000000000000000000000306612214026367030410 0ustar 00000000000000/* * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.doctree; import java.util.List; /** * A tree node for an @serialData block tag. * *

* @serialField field-name field-type field-description * * @since 1.8 */ @jdk.Supported public interface SerialFieldTree extends BlockTagTree { IdentifierTree getName(); ReferenceTree getType(); List getDescription(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/doctree/SerialTree.java0000644000000000000000000000275312214026367027446 0ustar 00000000000000/* * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.doctree; import java.util.List; /** * A tree node for an @serial block tag. * *

* @serial field-description | include | exclude * * @since 1.8 */ @jdk.Supported public interface SerialTree extends BlockTagTree { List getDescription(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/doctree/SinceTree.java0000644000000000000000000000270612214026367027266 0ustar 00000000000000/* * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.doctree; import java.util.List; /** * A tree node for an @since block tag. * *

* @since since-text * * @since 1.8 */ @jdk.Supported public interface SinceTree extends BlockTagTree { List getBody(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/doctree/StartElementTree.java0000644000000000000000000000306612214026367030634 0ustar 00000000000000/* * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.doctree; import java.util.List; import javax.lang.model.element.Name; /** * A tree node for the start of an HTML element. * *

* < name [attributes] [/]> * * @since 1.8 */ @jdk.Supported public interface StartElementTree extends DocTree { Name getName(); List getAttributes(); boolean isSelfClosing(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/doctree/TextTree.java0000644000000000000000000000255212214026367027150 0ustar 00000000000000/* * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.doctree; /** * A tree node for plain text. * * @since 1.8 */ @jdk.Supported public interface TextTree extends DocTree { String getBody(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/doctree/ThrowsTree.java0000644000000000000000000000317112214026367027510 0ustar 00000000000000/* * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.doctree; import java.util.List; /** * * A tree node for an @exception or @throws block tag. * @exception is a synonym for @throws. * *

* @exception class-name description
* @throws class-name description * * @since 1.8 */ @jdk.Supported public interface ThrowsTree extends BlockTagTree { ReferenceTree getExceptionName(); List getDescription(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/doctree/UnknownBlockTagTree.java0000644000000000000000000000273012214026367031270 0ustar 00000000000000/* * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.doctree; import java.util.List; /** * A tree node for an unrecognized inline tag. * *

* @name content * * @since 1.8 * */ @jdk.Supported public interface UnknownBlockTagTree extends BlockTagTree { List getContent(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/doctree/UnknownInlineTagTree.java0000644000000000000000000000273412214026367031460 0ustar 00000000000000/* * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.doctree; import java.util.List; /** * A tree node for an unrecognized inline tag. * *

* {@name content} * * @since 1.8 * */ @jdk.Supported public interface UnknownInlineTagTree extends InlineTagTree { List getContent(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/doctree/ValueTree.java0000644000000000000000000000265612214026367027305 0ustar 00000000000000/* * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.doctree; /** * A tree node for an @value inline tag. * *

* { @value reference } * * @since 1.8 */ @jdk.Supported public interface ValueTree extends InlineTagTree { ReferenceTree getReference(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/doctree/VersionTree.java0000644000000000000000000000272112214026367027647 0ustar 00000000000000/* * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.doctree; import java.util.List; /** * * A tree node for an @version block tag. * *

* @version version-text * * @since 1.8 */ @jdk.Supported public interface VersionTree extends BlockTagTree { List getBody(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/doctree/package-info.java0000644000000000000000000000311212214026367027721 0ustar 00000000000000/* * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ /** * Provides interfaces to represent documentation comments as abstract syntax * trees (AST). * * @author Jonathan Gibbons * @since 1.8 * @see http://download.oracle.com/javase/6/docs/technotes/tools/solaris/javadoc.html#javadoctags */ @jdk.Supported package com.sun.source.doctree; libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/AnnotatedTypeTree.java0000644000000000000000000000330312214026367030310 0ustar 00000000000000/* * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; import java.util.List; /** * A tree node for an annotated type * * For example: *

 *    {@code @}annotationType String
 *    {@code @}annotationType ( arguments ) Date
 * 
* * @see "JSR 308: Annotations on Java Types" * * @author Mahmood Ali * @since 1.8 */ @jdk.Supported public interface AnnotatedTypeTree extends ExpressionTree { List getAnnotations(); ExpressionTree getUnderlyingType(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/AnnotationTree.java0000644000000000000000000000325412214026367027650 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; import java.util.List; /** * A tree node for an annotation. * * For example: *
 *    {@code @}annotationType
 *    {@code @}annotationType ( arguments )
 * 
* * @jls section 9.7 * * @author Peter von der Ahé * @author Jonathan Gibbons * @since 1.6 */ @jdk.Supported public interface AnnotationTree extends ExpressionTree { Tree getAnnotationType(); List getArguments(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/ArrayAccessTree.java0000644000000000000000000000313512214026367027734 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; /** * A tree node for an array access expression. * * For example: *
 *   expression [ index ]
 * 
* * @jls section 15.13 * * @author Peter von der Ahé * @author Jonathan Gibbons * @since 1.6 */ @jdk.Supported public interface ArrayAccessTree extends ExpressionTree { ExpressionTree getExpression(); ExpressionTree getIndex(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/ArrayTypeTree.java0000644000000000000000000000277612214026367027466 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; /** * A tree node for an array type. * * For example: *
 *   type []
 * 
* * @jls section 10.1 * * @author Peter von der Ahé * @author Jonathan Gibbons * @since 1.6 */ @jdk.Supported public interface ArrayTypeTree extends Tree { Tree getType(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/AssertTree.java0000644000000000000000000000317512214026367027001 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; /** * A tree node for an 'assert' statement. * * For example: *
 *   assert condition ;
 *
 *   assert condition : detail ;
 * 
* * @jls section 14.10 * * @author Peter von der Ahé * @author Jonathan Gibbons * @since 1.6 */ @jdk.Supported public interface AssertTree extends StatementTree { ExpressionTree getCondition(); ExpressionTree getDetail(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/AssignmentTree.java0000644000000000000000000000314012214026367027640 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; /** * A tree node for an assignment expression. * * For example: *
 *   variable = expression
 * 
* * @jls section 15.26.1 * * @author Peter von der Ahé * @author Jonathan Gibbons * @since 1.6 */ @jdk.Supported public interface AssignmentTree extends ExpressionTree { ExpressionTree getVariable(); ExpressionTree getExpression(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/BinaryTree.java0000644000000000000000000000327412214026367026764 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; /** * A tree node for a binary expression. * Use {@link #getKind getKind} to determine the kind of operator. * * For example: *
 *   leftOperand operator rightOperand
 * 
* * @jls sections 15.17 to 15.24 * * @author Peter von der Ahé * @author Jonathan Gibbons * @since 1.6 */ @jdk.Supported public interface BinaryTree extends ExpressionTree { ExpressionTree getLeftOperand(); ExpressionTree getRightOperand(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/BlockTree.java0000644000000000000000000000322012214026367026561 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; import java.util.List; /** * A tree node for a statement block. * * For example: *
 *   { }
 *
 *   { statements }
 *
 *   static { statements }
 * 
* * @jls section 14.2 * * @author Peter von der Ahé * @author Jonathan Gibbons * @since 1.6 */ @jdk.Supported public interface BlockTree extends StatementTree { boolean isStatic(); List getStatements(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/BreakTree.java0000644000000000000000000000310712214026367026557 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; import javax.lang.model.element.Name; /** * A tree node for a 'break' statement. * * For example: *
 *   break;
 *
 *   break label ;
 * 
* * @jls section 14.15 * * @author Peter von der Ahé * @author Jonathan Gibbons * @since 1.6 */ @jdk.Supported public interface BreakTree extends StatementTree { Name getLabel(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/CaseTree.java0000644000000000000000000000341712214026367026412 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; import java.util.List; /** * A tree node for a 'case' in a 'switch' statement. * * For example: *
 *   case expression :
 *       statements
 *
 *   default :
 *       statements
 * 
* * @jls section 14.11 * * @author Peter von der Ahé * @author Jonathan Gibbons * @since 1.6 */ @jdk.Supported public interface CaseTree extends Tree { /** * @return null if and only if this Case is {@code default:} */ ExpressionTree getExpression(); List getStatements(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/CatchTree.java0000644000000000000000000000313512214026367026556 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; /** * A tree node for a 'catch' block in a 'try' statement. * * For example: *
 *   catch ( parameter )
 *       block
 * 
* * @jls section 14.20 * * @author Peter von der Ahé * @author Jonathan Gibbons * @since 1.6 */ @jdk.Supported public interface CatchTree extends Tree { VariableTree getParameter(); BlockTree getBlock(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/ClassTree.java0000644000000000000000000000401312214026367026575 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; import java.util.List; import javax.lang.model.element.Name; /** * A tree node for a class, interface, enum, or annotation * type declaration. * * For example: *
 *   modifiers class simpleName typeParameters
 *       extends extendsClause
 *       implements implementsClause
 *   {
 *       members
 *   }
 * 
* * @jls sections 8.1, 8.9, 9.1, and 9.6 * * @author Peter von der Ahé * @author Jonathan Gibbons * @since 1.6 */ @jdk.Supported public interface ClassTree extends StatementTree { ModifiersTree getModifiers(); Name getSimpleName(); List getTypeParameters(); Tree getExtendsClause(); List getImplementsClause(); List getMembers(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/CompilationUnitTree.java0000644000000000000000000000375312214026367030660 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; import java.util.List; import javax.tools.JavaFileObject; /** * Represents the abstract syntax tree for compilation units (source * files) and package declarations (package-info.java). * * @jls sections 7.3, and 7.4 * * @author Peter von der Ahé * @since 1.6 */ @jdk.Supported public interface CompilationUnitTree extends Tree { List getPackageAnnotations(); ExpressionTree getPackageName(); List getImports(); List getTypeDecls(); JavaFileObject getSourceFile(); /** * Gets the line map for this compilation unit, if available. * Returns null if the line map is not available. * @return the line map for this compilation unit */ LineMap getLineMap(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/CompoundAssignmentTree.java0000644000000000000000000000327712214026367031360 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; /** * A tree node for compound assignment operator. * Use {@link #getKind getKind} to determine the kind of operator. * * For example: *
 *   variable operator expression
 * 
* * @jls section 15.26.2 * * @author Peter von der Ahé * @author Jonathan Gibbons * @since 1.6 */ @jdk.Supported public interface CompoundAssignmentTree extends ExpressionTree { ExpressionTree getVariable(); ExpressionTree getExpression(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/ConditionalExpressionTree.java0000644000000000000000000000327312214026367032062 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; /** * A tree node for the conditional operator ? :. * * For example: *
 *   condition ? trueExpression : falseExpression
 * 
* * @jls section 15.25 * * @author Peter von der Ahé * @author Jonathan Gibbons * @since 1.6 */ @jdk.Supported public interface ConditionalExpressionTree extends ExpressionTree { ExpressionTree getCondition(); ExpressionTree getTrueExpression(); ExpressionTree getFalseExpression(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/ContinueTree.java0000644000000000000000000000312012214026367027312 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; import javax.lang.model.element.Name; /** * A tree node for a 'continue' statement. * * For example: *
 *   continue;
 *   continue label ;
 * 
* * @jls section 14.16 * * @author Peter von der Ahé * @author Jonathan Gibbons * @since 1.6 */ @jdk.Supported public interface ContinueTree extends StatementTree { Name getLabel(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/DoWhileLoopTree.java0000644000000000000000000000316012214026367027717 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; /** * A tree node for a 'do' statement. * * For example: *
 *   do
 *       statement
 *   while ( expression );
 * 
* * @jls section 14.13 * * @author Peter von der Ahé * @author Jonathan Gibbons * @since 1.6 */ @jdk.Supported public interface DoWhileLoopTree extends StatementTree { ExpressionTree getCondition(); StatementTree getStatement(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/EmptyStatementTree.java0000644000000000000000000000276512214026367030527 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; /** * A tree node for an empty (skip) statement. * * For example: *
 *    ;
 * 
* * @jls section 14.6 * * @author Peter von der Ahé * @author Jonathan Gibbons * @since 1.6 */ @jdk.Supported public interface EmptyStatementTree extends StatementTree {} libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/EnhancedForLoopTree.java0000644000000000000000000000326212214026367030543 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; /** * A tree node for an "enhanced" 'for' loop statement. * * For example: *
 *   for ( variable : expression )
 *       statement
 * 
* * @jls section 14.14.2 * * @author Peter von der Ahé * @author Jonathan Gibbons * @since 1.6 */ @jdk.Supported public interface EnhancedForLoopTree extends StatementTree { VariableTree getVariable(); ExpressionTree getExpression(); StatementTree getStatement(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/ErroneousTree.java0000644000000000000000000000276712214026367027527 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; import java.util.List; /** * A tree node to stand in for a malformed expression. * * @author Peter von der Ahé * @author Jonathan Gibbons * @since 1.6 */ @jdk.Supported public interface ErroneousTree extends ExpressionTree { List getErrorTrees(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/ExpressionStatementTree.java0000644000000000000000000000306012214026367031555 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; /** * A tree node for an expression statement. * * For example: *
 *   expression ;
 * 
* * @jls section 14.8 * * @author Peter von der Ahé * @author Jonathan Gibbons * @since 1.6 */ @jdk.Supported public interface ExpressionStatementTree extends StatementTree { ExpressionTree getExpression(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/ExpressionTree.java0000644000000000000000000000273312214026367027676 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; /** * A tree node used as the base class for the different types of * expressions. * * @jls chapter 15 * * @author Peter von der Ahé * @author Jonathan Gibbons * @since 1.6 */ @jdk.Supported public interface ExpressionTree extends Tree {} libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/ForLoopTree.java0000644000000000000000000000343412214026367027116 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; import java.util.List; /** * A tree node for a basic 'for' loop statement. * * For example: *
 *   for ( initializer ; condition ; update )
 *       statement
 * 
* * @jls section 14.14.1 * * @author Peter von der Ahé * @author Jonathan Gibbons * @since 1.6 */ @jdk.Supported public interface ForLoopTree extends StatementTree { List getInitializer(); ExpressionTree getCondition(); List getUpdate(); StatementTree getStatement(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/IdentifierTree.java0000644000000000000000000000307312214026367027617 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; import javax.lang.model.element.Name; /** * A tree node for an identifier expression. * * For example: *
 *   name
 * 
* * @jls section 6.5.6.1 * * @author Peter von der Ahé * @author Jonathan Gibbons * @since 1.6 */ @jdk.Supported public interface IdentifierTree extends ExpressionTree { Name getName(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/IfTree.java0000644000000000000000000000350012214026367026066 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; /** * A tree node for an 'if' statement. * * For example: *
 *   if ( condition )
 *      thenStatement
 *
 *   if ( condition )
 *       thenStatement
 *   else
 *       elseStatement
 * 
* * @jls section 14.9 * * @author Peter von der Ahé * @author Jonathan Gibbons * @since 1.6 */ @jdk.Supported public interface IfTree extends StatementTree { ExpressionTree getCondition(); StatementTree getThenStatement(); /** * @return null if this if statement has no else branch. */ StatementTree getElseStatement(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/ImportTree.java0000644000000000000000000000335012214026367027005 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; /** * A tree node for an import statement. * * For example: *
 *   import qualifiedIdentifier ;
 *
 *   static import qualifiedIdentifier ;
 * 
* * @jls section 7.5 * * @author Peter von der Ahé * @author Jonathan Gibbons * @since 1.6 */ @jdk.Supported public interface ImportTree extends Tree { boolean isStatic(); /** * @return a qualified identifier ending in "*" if and only if * this is an import-on-demand. */ Tree getQualifiedIdentifier(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/InstanceOfTree.java0000644000000000000000000000313112214026367027561 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; /** * A tree node for an 'instanceof' expression. * * For example: *
 *   expression instanceof type
 * 
* * @jls section 15.20.2 * * @author Peter von der Ahé * @author Jonathan Gibbons * @since 1.6 */ @jdk.Supported public interface InstanceOfTree extends ExpressionTree { ExpressionTree getExpression(); Tree getType(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/IntersectionTypeTree.java0000644000000000000000000000273112214026367031045 0ustar 00000000000000/* * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; import java.util.List; /** * A tree node for an intersection type in a cast expression. * * @author Maurizio Cimadamore * * @since 1.8 */ @jdk.Supported public interface IntersectionTypeTree extends Tree { List getBounds(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/LabeledStatementTree.java0000644000000000000000000000316112214026367030750 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; import javax.lang.model.element.Name; /** * A tree node for a labeled statement. * * For example: *
 *   label : statement
 * 
* * @jls section 14.7 * * @author Peter von der Ahé * @author Jonathan Gibbons * @since 1.6 */ @jdk.Supported public interface LabeledStatementTree extends StatementTree { Name getLabel(); StatementTree getStatement(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/LambdaExpressionTree.java0000644000000000000000000000367712214026367031007 0ustar 00000000000000/* * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; import java.util.List; /** * A tree node for a lambda expression. * * For example: *
{@code
 *   ()->{}
 *   (List ls)->ls.size()
 *   (x,y)-> { return x + y; }
 * }
*/ @jdk.Supported public interface LambdaExpressionTree extends ExpressionTree { /** * Lambda expressions come in two forms: (i) expression lambdas, whose body * is an expression, and (ii) statement lambdas, whose body is a block */ @jdk.Supported public enum BodyKind { /** enum constant for expression lambdas */ EXPRESSION, /** enum constant for statement lambdas */ STATEMENT; } List getParameters(); Tree getBody(); BodyKind getBodyKind(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/LineMap.java0000644000000000000000000000540712214026367026245 0ustar 00000000000000/* * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; /** * Provides methods to convert between character positions and line numbers * for a compilation unit. * * @since 1.6 */ @jdk.Supported public interface LineMap { /** * Find the start position of a line. * * @param line line number (beginning at 1) * @return position of first character in line * @throws IndexOutOfBoundsException * if {@code lineNumber < 1} * if {@code lineNumber > no. of lines} */ long getStartPosition(long line); /** * Find the position corresponding to a (line,column). * * @param line line number (beginning at 1) * @param column tab-expanded column number (beginning 1) * * @return position of character * @throws IndexOutOfBoundsException * if {@code line < 1} * if {@code line > no. of lines} */ long getPosition(long line, long column); /** * Find the line containing a position; a line termination * character is on the line it terminates. * * @param pos character offset of the position * @return the line number of pos (first line is 1) */ long getLineNumber(long pos); /** * Find the column for a character position. * Tab characters preceding the position on the same line * will be expanded when calculating the column number. * * @param pos character offset of the position * @return the tab-expanded column number of pos (first column is 1) */ long getColumnNumber(long pos); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/LiteralTree.java0000644000000000000000000000312112214026367027123 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; /** * A tree node for a literal expression. * Use {@link #getKind getKind} to determine the kind of literal. * * For example: *
 *   value
 * 
* * @jls section 15.28 * * @author Peter von der Ahé * @author Jonathan Gibbons * @since 1.6 */ @jdk.Supported public interface LiteralTree extends ExpressionTree { Object getValue(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/MemberReferenceTree.java0000644000000000000000000000375012214026367030565 0ustar 00000000000000/* * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; import java.util.List; import javax.lang.model.element.Name; /** * A tree node for a member reference expression. * * For example: *
 *   expression # [ identifier | new ]
 * 
* * @since 1.8 */ @jdk.Supported public interface MemberReferenceTree extends ExpressionTree { /** * There are two kinds of member references: (i) method references and * (ii) constructor references */ @jdk.Supported public enum ReferenceMode { /** enum constant for method references */ INVOKE, /** enum constant for constructor references */ NEW } ReferenceMode getMode(); ExpressionTree getQualifierExpression(); Name getName(); List getTypeArguments(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/MemberSelectTree.java0000644000000000000000000000322312214026367030101 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; import javax.lang.model.element.Name; /** * A tree node for a member access expression. * * For example: *
 *   expression . identifier
 * 
* * @jls sections 6.5, 15.11,and 15.12 * * @author Peter von der Ahé * @author Jonathan Gibbons * @since 1.6 */ @jdk.Supported public interface MemberSelectTree extends ExpressionTree { ExpressionTree getExpression(); Name getIdentifier(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/MethodInvocationTree.java0000644000000000000000000000342612214026367031011 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; import java.util.List; /** * A tree node for a method invocation expression. * * For example: *
 *   identifier ( arguments )
 *
 *   this . typeArguments identifier ( arguments )
 * 
* * @jls section 15.12 * * @author Peter von der Ahé * @author Jonathan Gibbons * @since 1.6 */ @jdk.Supported public interface MethodInvocationTree extends ExpressionTree { List getTypeArguments(); ExpressionTree getMethodSelect(); List getArguments(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/MethodTree.java0000644000000000000000000000420612214026367026754 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; import java.util.List; import javax.lang.model.element.Name; /** * A tree node for a method or annotation type element declaration. * * For example: *
 *   modifiers typeParameters type name
 *      ( parameters )
 *      body
 *
 *   modifiers type name () default defaultValue
 * 
* * @jls sections 8.4, 8.6, 8.7, 9.4, and 9.6 * * @author Peter von der Ahé * @author Jonathan Gibbons * @since 1.6 */ @jdk.Supported public interface MethodTree extends Tree { ModifiersTree getModifiers(); Name getName(); Tree getReturnType(); List getTypeParameters(); List getParameters(); VariableTree getReceiverParameter(); List getThrows(); BlockTree getBody(); Tree getDefaultValue(); // for annotation types } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/ModifiersTree.java0000644000000000000000000000342712214026367027461 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; import java.util.List; import java.util.Set; import javax.lang.model.element.Modifier; /** * A tree node for the modifiers, including annotations, for a declaration. * * For example: *
 *   flags
 *
 *   flags annotations
 * 
* * @jls sections 8.1.1, 8.3.1, 8.4.3, 8.5.1, 8.8.3, 9.1.1, and 9.7 * * @author Peter von der Ahé * @author Jonathan Gibbons * @since 1.6 */ @jdk.Supported public interface ModifiersTree extends Tree { Set getFlags(); List getAnnotations(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/NewArrayTree.java0000644000000000000000000000344212214026367027265 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; import java.util.List; /** * A tree node for an expression to create a new instance of an array. * * For example: *
 *   new type dimensions initializers
 *
 *   new type dimensions [ ] initializers
 * 
* * @jls section 15.10 * * @author Peter von der Ahé * @author Jonathan Gibbons * @since 1.6 */ @jdk.Supported public interface NewArrayTree extends ExpressionTree { Tree getType(); List getDimensions(); List getInitializers(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/NewClassTree.java0000644000000000000000000000375512214026367027263 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; import java.util.List; /** * A tree node to declare a new instance of a class. * * For example: *
 *   new identifier ( )
 *
 *   new identifier ( arguments )
 *
 *   new typeArguments identifier ( arguments )
 *       classBody
 *
 *   enclosingExpression.new identifier ( arguments )
 * 
* * @jls section 15.9 * * @author Peter von der Ahé * @author Jonathan Gibbons * @since 1.6 */ @jdk.Supported public interface NewClassTree extends ExpressionTree { ExpressionTree getEnclosingExpression(); List getTypeArguments(); ExpressionTree getIdentifier(); List getArguments(); ClassTree getClassBody(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/ParameterizedTypeTree.java0000644000000000000000000000321012214026367031164 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; import java.util.List; /** * A tree node for a type expression involving type parameters. * * For example: *
 *   type < typeArguments >
 * 
* * @jls section 4.5.1 * * @author Peter von der Ahé * @author Jonathan Gibbons * @since 1.6 */ @jdk.Supported public interface ParameterizedTypeTree extends Tree { Tree getType(); List getTypeArguments(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/ParenthesizedTree.java0000644000000000000000000000315012214026367030336 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; /** * A tree node for a parenthesized expression. Note: parentheses * not be preserved by the parser. * * For example: *
 *   ( expression )
 * 
* * @jls section 15.8.5 * * @author Peter von der Ahé * @author Jonathan Gibbons * @since 1.6 */ @jdk.Supported public interface ParenthesizedTree extends ExpressionTree { ExpressionTree getExpression(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/PrimitiveTypeTree.java0000644000000000000000000000310712214026367030345 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; import javax.lang.model.type.TypeKind; /** * A tree node for a primitive type. * * For example: *
 *   primitiveTypeKind
 * 
* * @jls section 4.2 * * @author Peter von der Ahé * @author Jonathan Gibbons * @since 1.6 */ @jdk.Supported public interface PrimitiveTypeTree extends Tree { TypeKind getPrimitiveTypeKind(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/ReturnTree.java0000644000000000000000000000306412214026367027014 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; /** * A tree node for a 'return' statement. * * For example: *
 *   return;
 *   return expression;
 * 
* * @jls section 14.17 * * @author Peter von der Ahé * @author Jonathan Gibbons * @since 1.6 */ @jdk.Supported public interface ReturnTree extends StatementTree { ExpressionTree getExpression(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/Scope.java0000644000000000000000000000533412214026367025770 0ustar 00000000000000/* * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; import javax.lang.model.element.Element; import javax.lang.model.element.ExecutableElement; import javax.lang.model.element.TypeElement; /** * Interface for determining locally available program elements, such as * local variables and imports. * Upon creation, a Scope is associated with a given program position; * for example, a {@linkplain Tree tree node}. This position may be used to * infer an enclosing method and/or class. * *

A Scope does not itself contain the details of the elements corresponding * to the parameters, methods and fields of the methods and classes containing * its position. However, these elements can be determined from the enclosing * elements. * *

Scopes may be contained in an enclosing scope. The outermost scope contains * those elements available via "star import" declarations; the scope within that * contains the top level elements of the compilation unit, including any named * imports. * * @since 1.6 */ @jdk.Supported public interface Scope { /** * Returns the enclosing scope. */ public Scope getEnclosingScope(); /** * Returns the innermost type element containing the position of this scope */ public TypeElement getEnclosingClass(); /** * Returns the innermost executable element containing the position of this scope. */ public ExecutableElement getEnclosingMethod(); /** * Returns the elements directly contained in this scope. */ public Iterable getLocalElements(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/StatementTree.java0000644000000000000000000000273112214026367027501 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; /** * A tree node used as the base class for the different kinds of * statements. * * @jls chapter 14 * * @author Peter von der Ahé * @author Jonathan Gibbons * @since 1.6 */ @jdk.Supported public interface StatementTree extends Tree {} libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/SwitchTree.java0000644000000000000000000000321212214026367026771 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; import java.util.List; /** * A tree node for a 'switch' statement. * * For example: *

 *   switch ( expression ) {
 *     cases
 *   }
 * 
* * @jls section 14.11 * * @author Peter von der Ahé * @author Jonathan Gibbons * @since 1.6 */ @jdk.Supported public interface SwitchTree extends StatementTree { ExpressionTree getExpression(); List getCases(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/SynchronizedTree.java0000644000000000000000000000315612214026367030216 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; /** * A tree node for a 'synchronized' statement. * * For example: *
 *   synchronized ( expression )
 *       block
 * 
* * @jls section 14.19 * * @author Peter von der Ahé * @author Jonathan Gibbons * @since 1.6 */ @jdk.Supported public interface SynchronizedTree extends StatementTree { ExpressionTree getExpression(); BlockTree getBlock(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/ThrowTree.java0000644000000000000000000000304412214026367026636 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; /** * A tree node for a 'throw' statement. * * For example: *
 *   throw expression;
 * 
* * @jls section 14.18 * * @author Peter von der Ahé * @author Jonathan Gibbons * @since 1.6 */ @jdk.Supported public interface ThrowTree extends StatementTree { ExpressionTree getExpression(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/Tree.java0000644000000000000000000004337012214026367025620 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; /** * Common interface for all nodes in an abstract syntax tree. * *

WARNING: This interface and its sub-interfaces are * subject to change as the Java™ programming language evolves. * These interfaces are implemented by the JDK Java compiler (javac) * and should not be implemented either directly or indirectly by * other applications. * * @author Peter von der Ahé * @author Jonathan Gibbons * * @since 1.6 */ @jdk.Supported public interface Tree { /** * Enumerates all kinds of trees. */ @jdk.Supported public enum Kind { ANNOTATED_TYPE(AnnotatedTypeTree.class), /** * Used for instances of {@link AnnotationTree} * representing declaration annotations. */ ANNOTATION(AnnotationTree.class), /** * Used for instances of {@link AnnotationTree} * representing type annotations. */ TYPE_ANNOTATION(AnnotationTree.class), /** * Used for instances of {@link ArrayAccessTree}. */ ARRAY_ACCESS(ArrayAccessTree.class), /** * Used for instances of {@link ArrayTypeTree}. */ ARRAY_TYPE(ArrayTypeTree.class), /** * Used for instances of {@link AssertTree}. */ ASSERT(AssertTree.class), /** * Used for instances of {@link AssignmentTree}. */ ASSIGNMENT(AssignmentTree.class), /** * Used for instances of {@link BlockTree}. */ BLOCK(BlockTree.class), /** * Used for instances of {@link BreakTree}. */ BREAK(BreakTree.class), /** * Used for instances of {@link CaseTree}. */ CASE(CaseTree.class), /** * Used for instances of {@link CatchTree}. */ CATCH(CatchTree.class), /** * Used for instances of {@link ClassTree} representing classes. */ CLASS(ClassTree.class), /** * Used for instances of {@link CompilationUnitTree}. */ COMPILATION_UNIT(CompilationUnitTree.class), /** * Used for instances of {@link ConditionalExpressionTree}. */ CONDITIONAL_EXPRESSION(ConditionalExpressionTree.class), /** * Used for instances of {@link ContinueTree}. */ CONTINUE(ContinueTree.class), /** * Used for instances of {@link DoWhileLoopTree}. */ DO_WHILE_LOOP(DoWhileLoopTree.class), /** * Used for instances of {@link EnhancedForLoopTree}. */ ENHANCED_FOR_LOOP(EnhancedForLoopTree.class), /** * Used for instances of {@link ExpressionStatementTree}. */ EXPRESSION_STATEMENT(ExpressionStatementTree.class), /** * Used for instances of {@link MemberSelectTree}. */ MEMBER_SELECT(MemberSelectTree.class), /** * Used for instances of {@link MemberReferenceTree}. */ MEMBER_REFERENCE(MemberReferenceTree.class), /** * Used for instances of {@link ForLoopTree}. */ FOR_LOOP(ForLoopTree.class), /** * Used for instances of {@link IdentifierTree}. */ IDENTIFIER(IdentifierTree.class), /** * Used for instances of {@link IfTree}. */ IF(IfTree.class), /** * Used for instances of {@link ImportTree}. */ IMPORT(ImportTree.class), /** * Used for instances of {@link InstanceOfTree}. */ INSTANCE_OF(InstanceOfTree.class), /** * Used for instances of {@link LabeledStatementTree}. */ LABELED_STATEMENT(LabeledStatementTree.class), /** * Used for instances of {@link MethodTree}. */ METHOD(MethodTree.class), /** * Used for instances of {@link MethodInvocationTree}. */ METHOD_INVOCATION(MethodInvocationTree.class), /** * Used for instances of {@link ModifiersTree}. */ MODIFIERS(ModifiersTree.class), /** * Used for instances of {@link NewArrayTree}. */ NEW_ARRAY(NewArrayTree.class), /** * Used for instances of {@link NewClassTree}. */ NEW_CLASS(NewClassTree.class), /** * Used for instances of {@link LambdaExpressionTree}. */ LAMBDA_EXPRESSION(LambdaExpressionTree.class), /** * Used for instances of {@link ParenthesizedTree}. */ PARENTHESIZED(ParenthesizedTree.class), /** * Used for instances of {@link PrimitiveTypeTree}. */ PRIMITIVE_TYPE(PrimitiveTypeTree.class), /** * Used for instances of {@link ReturnTree}. */ RETURN(ReturnTree.class), /** * Used for instances of {@link EmptyStatementTree}. */ EMPTY_STATEMENT(EmptyStatementTree.class), /** * Used for instances of {@link SwitchTree}. */ SWITCH(SwitchTree.class), /** * Used for instances of {@link SynchronizedTree}. */ SYNCHRONIZED(SynchronizedTree.class), /** * Used for instances of {@link ThrowTree}. */ THROW(ThrowTree.class), /** * Used for instances of {@link TryTree}. */ TRY(TryTree.class), /** * Used for instances of {@link ParameterizedTypeTree}. */ PARAMETERIZED_TYPE(ParameterizedTypeTree.class), /** * Used for instances of {@link UnionTypeTree}. */ UNION_TYPE(UnionTypeTree.class), /** * Used for instances of {@link IntersectionTypeTree}. */ INTERSECTION_TYPE(IntersectionTypeTree.class), /** * Used for instances of {@link TypeCastTree}. */ TYPE_CAST(TypeCastTree.class), /** * Used for instances of {@link TypeParameterTree}. */ TYPE_PARAMETER(TypeParameterTree.class), /** * Used for instances of {@link VariableTree}. */ VARIABLE(VariableTree.class), /** * Used for instances of {@link WhileLoopTree}. */ WHILE_LOOP(WhileLoopTree.class), /** * Used for instances of {@link UnaryTree} representing postfix * increment operator {@code ++}. */ POSTFIX_INCREMENT(UnaryTree.class), /** * Used for instances of {@link UnaryTree} representing postfix * decrement operator {@code --}. */ POSTFIX_DECREMENT(UnaryTree.class), /** * Used for instances of {@link UnaryTree} representing prefix * increment operator {@code ++}. */ PREFIX_INCREMENT(UnaryTree.class), /** * Used for instances of {@link UnaryTree} representing prefix * decrement operator {@code --}. */ PREFIX_DECREMENT(UnaryTree.class), /** * Used for instances of {@link UnaryTree} representing unary plus * operator {@code +}. */ UNARY_PLUS(UnaryTree.class), /** * Used for instances of {@link UnaryTree} representing unary minus * operator {@code -}. */ UNARY_MINUS(UnaryTree.class), /** * Used for instances of {@link UnaryTree} representing bitwise * complement operator {@code ~}. */ BITWISE_COMPLEMENT(UnaryTree.class), /** * Used for instances of {@link UnaryTree} representing logical * complement operator {@code !}. */ LOGICAL_COMPLEMENT(UnaryTree.class), /** * Used for instances of {@link BinaryTree} representing * multiplication {@code *}. */ MULTIPLY(BinaryTree.class), /** * Used for instances of {@link BinaryTree} representing * division {@code /}. */ DIVIDE(BinaryTree.class), /** * Used for instances of {@link BinaryTree} representing * remainder {@code %}. */ REMAINDER(BinaryTree.class), /** * Used for instances of {@link BinaryTree} representing * addition or string concatenation {@code +}. */ PLUS(BinaryTree.class), /** * Used for instances of {@link BinaryTree} representing * subtraction {@code -}. */ MINUS(BinaryTree.class), /** * Used for instances of {@link BinaryTree} representing * left shift {@code <<}. */ LEFT_SHIFT(BinaryTree.class), /** * Used for instances of {@link BinaryTree} representing * right shift {@code >>}. */ RIGHT_SHIFT(BinaryTree.class), /** * Used for instances of {@link BinaryTree} representing * unsigned right shift {@code >>>}. */ UNSIGNED_RIGHT_SHIFT(BinaryTree.class), /** * Used for instances of {@link BinaryTree} representing * less-than {@code <}. */ LESS_THAN(BinaryTree.class), /** * Used for instances of {@link BinaryTree} representing * greater-than {@code >}. */ GREATER_THAN(BinaryTree.class), /** * Used for instances of {@link BinaryTree} representing * less-than-equal {@code <=}. */ LESS_THAN_EQUAL(BinaryTree.class), /** * Used for instances of {@link BinaryTree} representing * greater-than-equal {@code >=}. */ GREATER_THAN_EQUAL(BinaryTree.class), /** * Used for instances of {@link BinaryTree} representing * equal-to {@code ==}. */ EQUAL_TO(BinaryTree.class), /** * Used for instances of {@link BinaryTree} representing * not-equal-to {@code !=}. */ NOT_EQUAL_TO(BinaryTree.class), /** * Used for instances of {@link BinaryTree} representing * bitwise and logical "and" {@code &}. */ AND(BinaryTree.class), /** * Used for instances of {@link BinaryTree} representing * bitwise and logical "xor" {@code ^}. */ XOR(BinaryTree.class), /** * Used for instances of {@link BinaryTree} representing * bitwise and logical "or" {@code |}. */ OR(BinaryTree.class), /** * Used for instances of {@link BinaryTree} representing * conditional-and {@code &&}. */ CONDITIONAL_AND(BinaryTree.class), /** * Used for instances of {@link BinaryTree} representing * conditional-or {@code ||}. */ CONDITIONAL_OR(BinaryTree.class), /** * Used for instances of {@link CompoundAssignmentTree} representing * multiplication assignment {@code *=}. */ MULTIPLY_ASSIGNMENT(CompoundAssignmentTree.class), /** * Used for instances of {@link CompoundAssignmentTree} representing * division assignment {@code /=}. */ DIVIDE_ASSIGNMENT(CompoundAssignmentTree.class), /** * Used for instances of {@link CompoundAssignmentTree} representing * remainder assignment {@code %=}. */ REMAINDER_ASSIGNMENT(CompoundAssignmentTree.class), /** * Used for instances of {@link CompoundAssignmentTree} representing * addition or string concatenation assignment {@code +=}. */ PLUS_ASSIGNMENT(CompoundAssignmentTree.class), /** * Used for instances of {@link CompoundAssignmentTree} representing * subtraction assignment {@code -=}. */ MINUS_ASSIGNMENT(CompoundAssignmentTree.class), /** * Used for instances of {@link CompoundAssignmentTree} representing * left shift assignment {@code <<=}. */ LEFT_SHIFT_ASSIGNMENT(CompoundAssignmentTree.class), /** * Used for instances of {@link CompoundAssignmentTree} representing * right shift assignment {@code >>=}. */ RIGHT_SHIFT_ASSIGNMENT(CompoundAssignmentTree.class), /** * Used for instances of {@link CompoundAssignmentTree} representing * unsigned right shift assignment {@code >>>=}. */ UNSIGNED_RIGHT_SHIFT_ASSIGNMENT(CompoundAssignmentTree.class), /** * Used for instances of {@link CompoundAssignmentTree} representing * bitwise and logical "and" assignment {@code &=}. */ AND_ASSIGNMENT(CompoundAssignmentTree.class), /** * Used for instances of {@link CompoundAssignmentTree} representing * bitwise and logical "xor" assignment {@code ^=}. */ XOR_ASSIGNMENT(CompoundAssignmentTree.class), /** * Used for instances of {@link CompoundAssignmentTree} representing * bitwise and logical "or" assignment {@code |=}. */ OR_ASSIGNMENT(CompoundAssignmentTree.class), /** * Used for instances of {@link LiteralTree} representing * an integral literal expression of type {@code int}. */ INT_LITERAL(LiteralTree.class), /** * Used for instances of {@link LiteralTree} representing * an integral literal expression of type {@code long}. */ LONG_LITERAL(LiteralTree.class), /** * Used for instances of {@link LiteralTree} representing * a floating-point literal expression of type {@code float}. */ FLOAT_LITERAL(LiteralTree.class), /** * Used for instances of {@link LiteralTree} representing * a floating-point literal expression of type {@code double}. */ DOUBLE_LITERAL(LiteralTree.class), /** * Used for instances of {@link LiteralTree} representing * a boolean literal expression of type {@code boolean}. */ BOOLEAN_LITERAL(LiteralTree.class), /** * Used for instances of {@link LiteralTree} representing * a character literal expression of type {@code char}. */ CHAR_LITERAL(LiteralTree.class), /** * Used for instances of {@link LiteralTree} representing * a string literal expression of type {@link String}. */ STRING_LITERAL(LiteralTree.class), /** * Used for instances of {@link LiteralTree} representing * the use of {@code null}. */ NULL_LITERAL(LiteralTree.class), /** * Used for instances of {@link WildcardTree} representing * an unbounded wildcard type argument. */ UNBOUNDED_WILDCARD(WildcardTree.class), /** * Used for instances of {@link WildcardTree} representing * an extends bounded wildcard type argument. */ EXTENDS_WILDCARD(WildcardTree.class), /** * Used for instances of {@link WildcardTree} representing * a super bounded wildcard type argument. */ SUPER_WILDCARD(WildcardTree.class), /** * Used for instances of {@link ErroneousTree}. */ ERRONEOUS(ErroneousTree.class), /** * Used for instances of {@link ClassTree} representing interfaces. */ INTERFACE(ClassTree.class), /** * Used for instances of {@link ClassTree} representing enums. */ ENUM(ClassTree.class), /** * Used for instances of {@link ClassTree} representing annotation types. */ ANNOTATION_TYPE(ClassTree.class), /** * An implementation-reserved node. This is the not the node * you are looking for. */ OTHER(null); Kind(Class intf) { associatedInterface = intf; } public Class asInterface() { return associatedInterface; } private final Class associatedInterface; } /** * Gets the kind of this tree. * * @return the kind of this tree. */ Kind getKind(); /** * Accept method used to implement the visitor pattern. The * visitor pattern is used to implement operations on trees. * * @param result type of this operation. * @param type of additional data. */ R accept(TreeVisitor visitor, D data); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/TreeVisitor.java0000644000000000000000000001213212214026367027170 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; /** * A visitor of trees, in the style of the visitor design pattern. * Classes implementing this interface are used to operate * on a tree when the kind of tree is unknown at compile time. * When a visitor is passed to an tree's {@link Tree#accept * accept} method, the visitXYZ method most applicable * to that tree is invoked. * *

Classes implementing this interface may or may not throw a * {@code NullPointerException} if the additional parameter {@code p} * is {@code null}; see documentation of the implementing class for * details. * *

WARNING: It is possible that methods will be added to * this interface to accommodate new, currently unknown, language * structures added to future versions of the Java™ programming * language. Therefore, visitor classes directly implementing this * interface may be source incompatible with future versions of the * platform. * * @param the return type of this visitor's methods. Use {@link * Void} for visitors that do not need to return results. * @param

the type of the additional parameter to this visitor's * methods. Use {@code Void} for visitors that do not need an * additional parameter. * * @author Peter von der Ahé * @author Jonathan Gibbons * * @since 1.6 */ @jdk.Supported public interface TreeVisitor { R visitAnnotatedType(AnnotatedTypeTree node, P p); R visitAnnotation(AnnotationTree node, P p); R visitMethodInvocation(MethodInvocationTree node, P p); R visitAssert(AssertTree node, P p); R visitAssignment(AssignmentTree node, P p); R visitCompoundAssignment(CompoundAssignmentTree node, P p); R visitBinary(BinaryTree node, P p); R visitBlock(BlockTree node, P p); R visitBreak(BreakTree node, P p); R visitCase(CaseTree node, P p); R visitCatch(CatchTree node, P p); R visitClass(ClassTree node, P p); R visitConditionalExpression(ConditionalExpressionTree node, P p); R visitContinue(ContinueTree node, P p); R visitDoWhileLoop(DoWhileLoopTree node, P p); R visitErroneous(ErroneousTree node, P p); R visitExpressionStatement(ExpressionStatementTree node, P p); R visitEnhancedForLoop(EnhancedForLoopTree node, P p); R visitForLoop(ForLoopTree node, P p); R visitIdentifier(IdentifierTree node, P p); R visitIf(IfTree node, P p); R visitImport(ImportTree node, P p); R visitArrayAccess(ArrayAccessTree node, P p); R visitLabeledStatement(LabeledStatementTree node, P p); R visitLiteral(LiteralTree node, P p); R visitMethod(MethodTree node, P p); R visitModifiers(ModifiersTree node, P p); R visitNewArray(NewArrayTree node, P p); R visitNewClass(NewClassTree node, P p); R visitLambdaExpression(LambdaExpressionTree node, P p); R visitParenthesized(ParenthesizedTree node, P p); R visitReturn(ReturnTree node, P p); R visitMemberSelect(MemberSelectTree node, P p); R visitMemberReference(MemberReferenceTree node, P p); R visitEmptyStatement(EmptyStatementTree node, P p); R visitSwitch(SwitchTree node, P p); R visitSynchronized(SynchronizedTree node, P p); R visitThrow(ThrowTree node, P p); R visitCompilationUnit(CompilationUnitTree node, P p); R visitTry(TryTree node, P p); R visitParameterizedType(ParameterizedTypeTree node, P p); R visitUnionType(UnionTypeTree node, P p); R visitIntersectionType(IntersectionTypeTree node, P p); R visitArrayType(ArrayTypeTree node, P p); R visitTypeCast(TypeCastTree node, P p); R visitPrimitiveType(PrimitiveTypeTree node, P p); R visitTypeParameter(TypeParameterTree node, P p); R visitInstanceOf(InstanceOfTree node, P p); R visitUnary(UnaryTree node, P p); R visitVariable(VariableTree node, P p); R visitWhileLoop(WhileLoopTree node, P p); R visitWildcard(WildcardTree node, P p); R visitOther(Tree node, P p); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/TryTree.java0000644000000000000000000000334712214026367026317 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; import java.util.List; /** * A tree node for a 'try' statement. * * For example: *

 *   try
 *       block
 *   catches
 *   finally
 *       finallyBlock
 * 
* * @jls section 14.20 * * @author Peter von der Ahé * @author Jonathan Gibbons * @since 1.6 */ @jdk.Supported public interface TryTree extends StatementTree { BlockTree getBlock(); List getCatches(); BlockTree getFinallyBlock(); List getResources(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/TypeCastTree.java0000644000000000000000000000311212214026367027263 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; /** * A tree node for a type cast expression. * * For example: *
 *   ( type ) expression
 * 
* * @jls section 15.16 * * @author Peter von der Ahé * @author Jonathan Gibbons * @since 1.6 */ @jdk.Supported public interface TypeCastTree extends ExpressionTree { Tree getType(); ExpressionTree getExpression(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/TypeParameterTree.java0000644000000000000000000000331012214026367030311 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; import java.util.List; import javax.lang.model.element.Name; /** * A tree node for a type parameter. * * For example: *
 *   name
 *
 *   name extends bounds
 * 
* * @jls section 4.4 * * @author Peter von der Ahé * @author Jonathan Gibbons * @since 1.6 */ @jdk.Supported public interface TypeParameterTree extends Tree { Name getName(); List getBounds(); List getAnnotations(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/UnaryTree.java0000644000000000000000000000326612214026367026637 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; /** * A tree node for postfix and unary expressions. * Use {@link #getKind getKind} to determine the kind of operator. * * For example: *
 *   operator expression
 *
 *   expression operator
 * 
* * @jls sections 15.14 and 15.15 * * @author Peter von der Ahé * @author Jonathan Gibbons * @since 1.6 */ @jdk.Supported public interface UnaryTree extends ExpressionTree { ExpressionTree getExpression(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/UnionTypeTree.java0000644000000000000000000000275212214026367027472 0ustar 00000000000000/* * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; import java.util.List; /** * A tree node for a union type expression in a multicatch var declaration. * * @author Maurizio Cimadamore * * @since 1.7 */ @jdk.Supported public interface UnionTypeTree extends Tree { List getTypeAlternatives(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/VariableTree.java0000644000000000000000000000347212214026367027265 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; import javax.lang.model.element.Name; /** * A tree node for a variable declaration. * * For example: *
 *   modifiers type name initializer ;
 *   modifiers type qualified-name.this
 * 
* * @jls sections 8.3 and 14.4 * * @author Peter von der Ahé * @author Jonathan Gibbons * @since 1.6 */ @jdk.Supported public interface VariableTree extends StatementTree { ModifiersTree getModifiers(); Name getName(); ExpressionTree getNameExpression(); Tree getType(); ExpressionTree getInitializer(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/WhileLoopTree.java0000644000000000000000000000315512214026367027440 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; /** * A tree node for a 'while' loop statement. * * For example: *
 *   while ( condition )
 *     statement
 * 
* * * @jls section 14.12 * * @author Peter von der Ahé * @author Jonathan Gibbons * @since 1.6 */ @jdk.Supported public interface WhileLoopTree extends StatementTree { ExpressionTree getCondition(); StatementTree getStatement(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/WildcardTree.java0000644000000000000000000000317312214026367027267 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.tree; /** * A tree node for a wildcard type argument. * Use {@link #getKind getKind} to determine the kind of bound. * * For example: *
 *   ?
 *
 *   ? extends bound
 *
 *   ? super bound
 * 
* * @jls section 4.5.1 * * @author Peter von der Ahé * @author Jonathan Gibbons * @since 1.6 */ @jdk.Supported public interface WildcardTree extends Tree { Tree getBound(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/tree/package-info.java0000644000000000000000000000262612214026367027244 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ /** * Provides interfaces to represent source code as abstract syntax * trees (AST). * * @author Peter von der Ahé * @author Jonathan Gibbons * @since 1.6 */ @jdk.Supported package com.sun.source.tree; libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/util/DocSourcePositions.java0000644000000000000000000001043112214026367030525 0ustar 00000000000000/* * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.util; import com.sun.source.doctree.DocCommentTree; import com.sun.source.doctree.DocTree; import com.sun.source.tree.CompilationUnitTree; /** * Provides methods to obtain the position of a DocTree within a javadoc comment. * A position is defined as a simple character offset from the start of a * CompilationUnit where the first character is at offset 0. * * @since 1.8 */ @jdk.Supported public interface DocSourcePositions extends SourcePositions { /** * Gets the starting position of the tree within the comment within the file. If tree is not found within * file, or if the starting position is not available, * return {@link javax.tools.Diagnostic#NOPOS}. * The given tree should be under the given comment tree, and the given documentation * comment tree should be returned from a {@link DocTrees#getDocCommentTree(com.sun.source.util.TreePath) } * for a tree under the given file. * The returned position must be at the start of the yield of this tree, that * is for any sub-tree of this tree, the following must hold: * *

* {@code tree.getStartPosition() <= subtree.getStartPosition()} or
* {@code tree.getStartPosition() == NOPOS} or
* {@code subtree.getStartPosition() == NOPOS} *

* * @param file CompilationUnit in which to find tree. * @param comment the comment tree that encloses the tree for which the * position is being sought * @param tree tree for which a position is sought. * @return the start position of tree. */ long getStartPosition(CompilationUnitTree file, DocCommentTree comment, DocTree tree); /** * Gets the ending position of the tree within the comment within the file. If tree is not found within * file, or if the ending position is not available, * return {@link javax.tools.Diagnostic#NOPOS}. * The given tree should be under the given comment tree, and the given documentation * comment tree should be returned from a {@link DocTrees#getDocCommentTree(com.sun.source.util.TreePath) } * for a tree under the given file. * The returned position must be at the end of the yield of this tree, * that is for any sub-tree of this tree, the following must hold: * *

* {@code tree.getEndPosition() >= subtree.getEndPosition()} or
* {@code tree.getEndPosition() == NOPOS} or
* {@code subtree.getEndPosition() == NOPOS} *

* * In addition, the following must hold: * *

* {@code tree.getStartPosition() <= tree.getEndPosition()} or
* {@code tree.getStartPosition() == NOPOS} or
* {@code tree.getEndPosition() == NOPOS} *

* * @param file CompilationUnit in which to find tree. * @param comment the comment tree that encloses the tree for which the * position is being sought * @param tree tree for which a position is sought. * @return the start position of tree. */ long getEndPosition(CompilationUnitTree file, DocCommentTree comment, DocTree tree); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/util/DocTreePath.java0000644000000000000000000001233512214026367027076 0ustar 00000000000000/* * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.util; import com.sun.source.doctree.DocCommentTree; import com.sun.source.doctree.DocTree; import java.util.Iterator; /** * A path of tree nodes, typically used to represent the sequence of ancestor * nodes of a tree node up to the top level DocCommentTree node. * * @since 1.8 */ @jdk.Supported public class DocTreePath implements Iterable { /** * Gets a documentation tree path for a tree node within a compilation unit. * @return null if the node is not found */ public static DocTreePath getPath(TreePath treePath, DocCommentTree doc, DocTree target) { return getPath(new DocTreePath(treePath, doc), target); } /** * Gets a documentation tree path for a tree node within a subtree identified by a DocTreePath object. * @return null if the node is not found */ public static DocTreePath getPath(DocTreePath path, DocTree target) { path.getClass(); target.getClass(); class Result extends Error { static final long serialVersionUID = -5942088234594905625L; DocTreePath path; Result(DocTreePath path) { this.path = path; } } class PathFinder extends DocTreePathScanner { public DocTreePath scan(DocTree tree, DocTree target) { if (tree == target) { throw new Result(new DocTreePath(getCurrentPath(), target)); } return super.scan(tree, target); } } if (path.getLeaf() == target) { return path; } try { new PathFinder().scan(path, target); } catch (Result result) { return result.path; } return null; } /** * Creates a DocTreePath for a root node. * * @param treePath the TreePath from which the root node was created. * @param t the DocCommentTree to create the path for. */ public DocTreePath(TreePath treePath, DocCommentTree t) { treePath.getClass(); t.getClass(); this.treePath = treePath; this.docComment = t; this.parent = null; this.leaf = t; } /** * Creates a DocTreePath for a child node. */ public DocTreePath(DocTreePath p, DocTree t) { if (t.getKind() == DocTree.Kind.DOC_COMMENT) { throw new IllegalArgumentException("Use DocTreePath(TreePath, DocCommentTree) to construct DocTreePath for a DocCommentTree."); } else { treePath = p.treePath; docComment = p.docComment; parent = p; } leaf = t; } /** * Get the TreePath associated with this path. * @return TreePath for this DocTreePath */ public TreePath getTreePath() { return treePath; } /** * Get the DocCommentTree associated with this path. * @return DocCommentTree for this DocTreePath */ public DocCommentTree getDocComment() { return docComment; } /** * Get the leaf node for this path. * @return DocTree for this DocTreePath */ public DocTree getLeaf() { return leaf; } /** * Get the path for the enclosing node, or null if there is no enclosing node. * @return DocTreePath of parent */ public DocTreePath getParentPath() { return parent; } public Iterator iterator() { return new Iterator() { public boolean hasNext() { return next != null; } public DocTree next() { DocTree t = next.leaf; next = next.parent; return t; } public void remove() { throw new UnsupportedOperationException(); } private DocTreePath next = DocTreePath.this; }; } private final TreePath treePath; private final DocCommentTree docComment; private final DocTree leaf; private final DocTreePath parent; } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/util/DocTreePathScanner.java0000644000000000000000000000504112214026367030404 0ustar 00000000000000/* * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.util; import com.sun.source.doctree.DocTree; /** * A DocTreeVisitor that visits all the child tree nodes, and provides * support for maintaining a path for the parent nodes. * To visit nodes of a particular type, just override the * corresponding visitorXYZ method. * Inside your method, call super.visitXYZ to visit descendant * nodes. * * @since 1.8 */ @jdk.Supported public class DocTreePathScanner extends DocTreeScanner { /** * Scan a tree from a position identified by a TreePath. */ public R scan(DocTreePath path, P p) { this.path = path; try { return path.getLeaf().accept(this, p); } finally { this.path = null; } } /** * Scan a single node. * The current path is updated for the duration of the scan. */ @Override public R scan(DocTree tree, P p) { if (tree == null) return null; DocTreePath prev = path; path = new DocTreePath(path, tree); try { return tree.accept(this, p); } finally { path = prev; } } /** * Get the current path for the node, as built up by the currently * active set of scan calls. */ public DocTreePath getCurrentPath() { return path; } private DocTreePath path; } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/util/DocTreeScanner.java0000644000000000000000000001712312214026367027573 0ustar 00000000000000/* * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.util; import com.sun.source.doctree.*; /** * A TreeVisitor that visits all the child tree nodes. * To visit nodes of a particular type, just override the * corresponding visitXYZ method. * Inside your method, call super.visitXYZ to visit descendant * nodes. * *

The default implementation of the visitXYZ methods will determine * a result as follows: *

    *
  • If the node being visited has no children, the result will be null. *
  • If the node being visited has one child, the result will be the * result of calling {@code scan} on that child. The child may be a simple node * or itself a list of nodes. *
  • If the node being visited has more than one child, the result will * be determined by calling {@code scan} each child in turn, and then combining the * result of each scan after the first with the cumulative result * so far, as determined by the {@link #reduce} method. Each child may be either * a simple node of a list of nodes. The default behavior of the {@code reduce} * method is such that the result of the visitXYZ method will be the result of * the last child scanned. *
* *

Here is an example to count the number of erroneous nodes in a tree: *

 *   class CountErrors extends DocTreeScanner<Integer,Void> {
 *      {@literal @}Override
 *      public Integer visitErroneous(ErroneousTree node, Void p) {
 *          return 1;
 *      }
 *      {@literal @}Override
 *      public Integer reduce(Integer r1, Integer r2) {
 *          return (r1 == null ? 0 : r1) + (r2 == null ? 0 : r2);
 *      }
 *   }
 * 
* * @since 1.8 */ @jdk.Supported public class DocTreeScanner implements DocTreeVisitor { /** * Scan a single node. */ public R scan(DocTree node, P p) { return (node == null) ? null : node.accept(this, p); } private R scanAndReduce(DocTree node, P p, R r) { return reduce(scan(node, p), r); } /** * Scan a list of nodes. */ public R scan(Iterable nodes, P p) { R r = null; if (nodes != null) { boolean first = true; for (DocTree node : nodes) { r = (first ? scan(node, p) : scanAndReduce(node, p, r)); first = false; } } return r; } private R scanAndReduce(Iterable nodes, P p, R r) { return reduce(scan(nodes, p), r); } /** * Reduces two results into a combined result. * The default implementation is to return the first parameter. * The general contract of the method is that it may take any action whatsoever. */ public R reduce(R r1, R r2) { return r1; } /* *************************************************************************** * Visitor methods ****************************************************************************/ @Override public R visitAttribute(AttributeTree node, P p) { return null; } @Override public R visitAuthor(AuthorTree node, P p) { return scan(node.getName(), p); } @Override public R visitComment(CommentTree node, P p) { return null; } @Override public R visitDeprecated(DeprecatedTree node, P p) { return scan(node.getBody(), p); } @Override public R visitDocComment(DocCommentTree node, P p) { R r = scan(node.getFirstSentence(), p); r = scanAndReduce(node.getBody(), p, r); r = scanAndReduce(node.getBlockTags(), p, r); return r; } @Override public R visitDocRoot(DocRootTree node, P p) { return null; } @Override public R visitEndElement(EndElementTree node, P p) { return null; } @Override public R visitEntity(EntityTree node, P p) { return null; } @Override public R visitErroneous(ErroneousTree node, P p) { return null; } @Override public R visitIdentifier(IdentifierTree node, P p) { return null; } @Override public R visitInheritDoc(InheritDocTree node, P p) { return null; } @Override public R visitLink(LinkTree node, P p) { R r = scan(node.getReference(), p); r = scanAndReduce(node.getLabel(), p, r); return r; } @Override public R visitLiteral(LiteralTree node, P p) { return scan(node.getBody(), p); } @Override public R visitParam(ParamTree node, P p) { R r = scan(node.getName(), p); r = scanAndReduce(node.getDescription(), p, r); return r; } @Override public R visitReference(ReferenceTree node, P p) { return null; } @Override public R visitReturn(ReturnTree node, P p) { return scan(node.getDescription(), p); } @Override public R visitSee(SeeTree node, P p) { return scan(node.getReference(), p); } @Override public R visitSerial(SerialTree node, P p) { return scan(node.getDescription(), p); } @Override public R visitSerialData(SerialDataTree node, P p) { return scan(node.getDescription(), p); } @Override public R visitSerialField(SerialFieldTree node, P p) { R r = scan(node.getName(), p); r = scanAndReduce(node.getType(), p, r); r = scanAndReduce(node.getDescription(), p, r); return r; } @Override public R visitSince(SinceTree node, P p) { return scan(node.getBody(), p); } @Override public R visitStartElement(StartElementTree node, P p) { return scan(node.getAttributes(), p); } @Override public R visitText(TextTree node, P p) { return null; } @Override public R visitThrows(ThrowsTree node, P p) { R r = scan(node.getExceptionName(), p); r = scanAndReduce(node.getDescription(), p, r); return r; } @Override public R visitUnknownBlockTag(UnknownBlockTagTree node, P p) { return scan(node.getContent(), p); } @Override public R visitUnknownInlineTag(UnknownInlineTagTree node, P p) { return scan(node.getContent(), p); } @Override public R visitValue(ValueTree node, P p) { return scan(node.getReference(), p); } @Override public R visitVersion(VersionTree node, P p) { return scan(node.getBody(), p); } @Override public R visitOther(DocTree node, P p) { return null; } } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/util/DocTrees.java0000644000000000000000000000706212214026367026445 0ustar 00000000000000/* * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.util; import javax.annotation.processing.ProcessingEnvironment; import javax.lang.model.element.Element; import javax.tools.JavaCompiler.CompilationTask; import com.sun.source.doctree.DocCommentTree; import com.sun.source.doctree.ReferenceTree; import javax.tools.Diagnostic; /** * Provides access to syntax trees for doc comments. * * @since 1.8 */ @jdk.Supported public abstract class DocTrees extends Trees { /** * Gets a DocTrees object for a given CompilationTask. * @param task the compilation task for which to get the Trees object * @throws IllegalArgumentException if the task does not support the Trees API. */ public static DocTrees instance(CompilationTask task) { return (DocTrees) Trees.instance(task); } /** * Gets a DocTrees object for a given ProcessingEnvironment. * @param env the processing environment for which to get the Trees object * @throws IllegalArgumentException if the env does not support the Trees API. */ public static DocTrees instance(ProcessingEnvironment env) { if (!env.getClass().getName().equals("com.sun.tools.javac.processing.JavacProcessingEnvironment")) throw new IllegalArgumentException(); return (DocTrees) getJavacTrees(ProcessingEnvironment.class, env); } /** * Gets the doc comment tree, if any, for the Tree node identified by a given TreePath. * Returns null if no doc comment was found. */ public abstract DocCommentTree getDocCommentTree(TreePath path); /** * Gets the language model element referred to by the leaf node of the given * {@link DocTreePath}, or null if unknown. */ public abstract Element getElement(DocTreePath path); public abstract DocSourcePositions getSourcePositions(); /** * Prints a message of the specified kind at the location of the * tree within the provided compilation unit * * @param kind the kind of message * @param msg the message, or an empty string if none * @param t the tree to use as a position hint * @param root the compilation unit that contains tree */ public abstract void printMessage(Diagnostic.Kind kind, CharSequence msg, com.sun.source.doctree.DocTree t, com.sun.source.doctree.DocCommentTree c, com.sun.source.tree.CompilationUnitTree root); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/util/JavacTask.java0000644000000000000000000001462112214026367026603 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.util; import java.io.IOException; import javax.annotation.processing.ProcessingEnvironment; import javax.lang.model.element.Element; import javax.lang.model.type.TypeMirror; import javax.lang.model.util.Elements; import javax.lang.model.util.Types; import javax.tools.JavaCompiler.CompilationTask; import javax.tools.JavaFileObject; import com.sun.source.tree.CompilationUnitTree; import com.sun.source.tree.Tree; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; /** * Provides access to functionality specific to the JDK Java Compiler, javac. * * @author Peter von der Ahé * @author Jonathan Gibbons * @since 1.6 */ @jdk.Supported public abstract class JavacTask implements CompilationTask { /** * Get the {@code JavacTask} for a {@code ProcessingEnvironment}. * If the compiler is being invoked using a * {@link javax.tools.JavaCompiler.CompilationTask CompilationTask}, * then that task will be returned. * @param processingEnvironment the processing environment * @return the {@code JavacTask} for a {@code ProcessingEnvironment} * @since 1.8 */ public static JavacTask instance(ProcessingEnvironment processingEnvironment) { if (!processingEnvironment.getClass().getName().equals( "com.sun.tools.javac.processing.JavacProcessingEnvironment")) throw new IllegalArgumentException(); try { //Cannot refer to the implementation directly, needs to use reflection: Method m = processingEnvironment.getClass().getMethod("getJavacTask"); return (JavacTask) m.invoke(processingEnvironment); } catch (NoSuchMethodException ex) { throw new UnsupportedOperationException(ex); } catch (SecurityException ex) { throw new UnsupportedOperationException(ex); } catch (IllegalAccessException ex) { throw new UnsupportedOperationException(ex); } catch (IllegalArgumentException ex) { throw new UnsupportedOperationException(ex); } catch (InvocationTargetException ex) { throw new UnsupportedOperationException(ex); } } /** * Parse the specified files returning a list of abstract syntax trees. * * @return a list of abstract syntax trees * @throws IOException if an unhandled I/O error occurred in the compiler. * @throws IllegalStateException if the operation cannot be performed at this time. */ public abstract Iterable parse() throws IOException; /** * Complete all analysis. * * @return a list of elements that were analyzed * @throws IOException if an unhandled I/O error occurred in the compiler. * @throws IllegalStateException if the operation cannot be performed at this time. */ public abstract Iterable analyze() throws IOException; /** * Generate code. * * @return a list of files that were generated * @throws IOException if an unhandled I/O error occurred in the compiler. * @throws IllegalStateException if the operation cannot be performed at this time. */ public abstract Iterable generate() throws IOException; /** * The specified listener will receive notification of events * describing the progress of this compilation task. * * If another listener is receiving notifications as a result of a prior * call of this method, then that listener will no longer receive notifications. * * Informally, this method is equivalent to calling {@code removeTaskListener} for * any listener that has been previously set, followed by {@code addTaskListener} * for the new listener. * * @throws IllegalStateException if the specified listener has already been added. */ public abstract void setTaskListener(TaskListener taskListener); /** * The specified listener will receive notification of events * describing the progress of this compilation task. * * This method may be called at any time before or during the compilation. * * @throws IllegalStateException if the specified listener has already been added. * @since 1.8 */ public abstract void addTaskListener(TaskListener taskListener); /** * The specified listener will no longer receive notification of events * describing the progress of this compilation task. * * This method may be called at any time before or during the compilation. * * @since 1.8 */ public abstract void removeTaskListener(TaskListener taskListener); /** * Get a type mirror of the tree node determined by the specified path. * This method has been superceded by methods on * {@link com.sun.source.util.Trees Trees}. * @see com.sun.source.util.Trees#getTypeMirror */ public abstract TypeMirror getTypeMirror(Iterable path); /** * Get a utility object for dealing with program elements. */ public abstract Elements getElements(); /** * Get a utility object for dealing with type mirrors. */ public abstract Types getTypes(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/util/Plugin.java0000644000000000000000000000513412214026367026171 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.util; import java.util.ServiceLoader; import javax.tools.StandardLocation; /** * The interface for a javac plug-in. * *

The javac plug-in mechanism allows a user to specify one or more plug-ins * on the javac command line, to be started soon after the compilation * has begun. Plug-ins are identified by a user-friendly name. Each plug-in that * is started will be passed an array of strings, which may be used to * provide the plug-in with values for any desired options or other arguments. * *

Plug-ins are located via a {@link ServiceLoader}, * using the same class path as annotation processors (i.e. * {@link StandardLocation#ANNOTATION_PROCESSOR_PATH ANNOTATION_PROCESSOR_PATH} or * {@code -processorpath}). * *

It is expected that a typical plug-in will simply register a * {@link TaskListener} to be informed of events during the execution * of the compilation, and that the rest of the work will be done * by the task listener. * * @since 1.8 */ @jdk.Supported public interface Plugin { /** * Get the user-friendly name of this plug-in. * @return the user-friendly name of the plug-in */ String getName(); /** * Initialize the plug-in for a given compilation task. * @param task The compilation task that has just been started * @param args Arguments, if any, for the plug-in */ void init(JavacTask task, String... args); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/util/SimpleDocTreeVisitor.java0000644000000000000000000001150612214026367031012 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.util; import com.sun.source.doctree.*; /** * A simple visitor for tree nodes. * * @since 1.8 */ @jdk.Supported public class SimpleDocTreeVisitor implements DocTreeVisitor { protected final R DEFAULT_VALUE; protected SimpleDocTreeVisitor() { DEFAULT_VALUE = null; } protected SimpleDocTreeVisitor(R defaultValue) { DEFAULT_VALUE = defaultValue; } protected R defaultAction(DocTree node, P p) { return DEFAULT_VALUE; } public final R visit(DocTree node, P p) { return (node == null) ? null : node.accept(this, p); } public final R visit(Iterable nodes, P p) { R r = null; if (nodes != null) { for (DocTree node : nodes) r = visit(node, p); } return r; } public R visitAttribute(AttributeTree node, P p) { return defaultAction(node, p); } public R visitAuthor(AuthorTree node, P p) { return defaultAction(node, p); } public R visitComment(CommentTree node, P p) { return defaultAction(node, p); } public R visitDeprecated(DeprecatedTree node, P p) { return defaultAction(node, p); } public R visitDocComment(DocCommentTree node, P p) { return defaultAction(node, p); } public R visitDocRoot(DocRootTree node, P p) { return defaultAction(node, p); } public R visitEndElement(EndElementTree node, P p) { return defaultAction(node, p); } public R visitEntity(EntityTree node, P p) { return defaultAction(node, p); } public R visitErroneous(ErroneousTree node, P p) { return defaultAction(node, p); } public R visitIdentifier(IdentifierTree node, P p) { return defaultAction(node, p); } public R visitInheritDoc(InheritDocTree node, P p) { return defaultAction(node, p); } public R visitLink(LinkTree node, P p) { return defaultAction(node, p); } public R visitLiteral(LiteralTree node, P p) { return defaultAction(node, p); } public R visitParam(ParamTree node, P p) { return defaultAction(node, p); } public R visitReference(ReferenceTree node, P p) { return defaultAction(node, p); } public R visitReturn(ReturnTree node, P p) { return defaultAction(node, p); } public R visitSee(SeeTree node, P p) { return defaultAction(node, p); } public R visitSerial(SerialTree node, P p) { return defaultAction(node, p); } public R visitSerialData(SerialDataTree node, P p) { return defaultAction(node, p); } public R visitSerialField(SerialFieldTree node, P p) { return defaultAction(node, p); } public R visitSince(SinceTree node, P p) { return defaultAction(node, p); } public R visitStartElement(StartElementTree node, P p) { return defaultAction(node, p); } public R visitText(TextTree node, P p) { return defaultAction(node, p); } public R visitThrows(ThrowsTree node, P p) { return defaultAction(node, p); } public R visitUnknownBlockTag(UnknownBlockTagTree node, P p) { return defaultAction(node, p); } public R visitUnknownInlineTag(UnknownInlineTagTree node, P p) { return defaultAction(node, p); } public R visitValue(ValueTree node, P p) { return defaultAction(node, p); } public R visitVersion(VersionTree node, P p) { return defaultAction(node, p); } public R visitOther(DocTree node, P p) { return defaultAction(node, p); } } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/util/SimpleTreeVisitor.java0000644000000000000000000001652112214026367030366 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.util; import com.sun.source.tree.*; /** * A simple visitor for tree nodes. * * @author Peter von der Ahé * @since 1.6 */ @jdk.Supported public class SimpleTreeVisitor implements TreeVisitor { protected final R DEFAULT_VALUE; protected SimpleTreeVisitor() { DEFAULT_VALUE = null; } protected SimpleTreeVisitor(R defaultValue) { DEFAULT_VALUE = defaultValue; } protected R defaultAction(Tree node, P p) { return DEFAULT_VALUE; } public final R visit(Tree node, P p) { return (node == null) ? null : node.accept(this, p); } public final R visit(Iterable nodes, P p) { R r = null; if (nodes != null) for (Tree node : nodes) r = visit(node, p); return r; } public R visitCompilationUnit(CompilationUnitTree node, P p) { return defaultAction(node, p); } public R visitImport(ImportTree node, P p) { return defaultAction(node, p); } public R visitClass(ClassTree node, P p) { return defaultAction(node, p); } public R visitMethod(MethodTree node, P p) { return defaultAction(node, p); } public R visitVariable(VariableTree node, P p) { return defaultAction(node, p); } public R visitEmptyStatement(EmptyStatementTree node, P p) { return defaultAction(node, p); } public R visitBlock(BlockTree node, P p) { return defaultAction(node, p); } public R visitDoWhileLoop(DoWhileLoopTree node, P p) { return defaultAction(node, p); } public R visitWhileLoop(WhileLoopTree node, P p) { return defaultAction(node, p); } public R visitForLoop(ForLoopTree node, P p) { return defaultAction(node, p); } public R visitEnhancedForLoop(EnhancedForLoopTree node, P p) { return defaultAction(node, p); } public R visitLabeledStatement(LabeledStatementTree node, P p) { return defaultAction(node, p); } public R visitSwitch(SwitchTree node, P p) { return defaultAction(node, p); } public R visitCase(CaseTree node, P p) { return defaultAction(node, p); } public R visitSynchronized(SynchronizedTree node, P p) { return defaultAction(node, p); } public R visitTry(TryTree node, P p) { return defaultAction(node, p); } public R visitCatch(CatchTree node, P p) { return defaultAction(node, p); } public R visitConditionalExpression(ConditionalExpressionTree node, P p) { return defaultAction(node, p); } public R visitIf(IfTree node, P p) { return defaultAction(node, p); } public R visitExpressionStatement(ExpressionStatementTree node, P p) { return defaultAction(node, p); } public R visitBreak(BreakTree node, P p) { return defaultAction(node, p); } public R visitContinue(ContinueTree node, P p) { return defaultAction(node, p); } public R visitReturn(ReturnTree node, P p) { return defaultAction(node, p); } public R visitThrow(ThrowTree node, P p) { return defaultAction(node, p); } public R visitAssert(AssertTree node, P p) { return defaultAction(node, p); } public R visitMethodInvocation(MethodInvocationTree node, P p) { return defaultAction(node, p); } public R visitNewClass(NewClassTree node, P p) { return defaultAction(node, p); } public R visitNewArray(NewArrayTree node, P p) { return defaultAction(node, p); } public R visitLambdaExpression(LambdaExpressionTree node, P p) { return defaultAction(node, p); } public R visitParenthesized(ParenthesizedTree node, P p) { return defaultAction(node, p); } public R visitAssignment(AssignmentTree node, P p) { return defaultAction(node, p); } public R visitCompoundAssignment(CompoundAssignmentTree node, P p) { return defaultAction(node, p); } public R visitUnary(UnaryTree node, P p) { return defaultAction(node, p); } public R visitBinary(BinaryTree node, P p) { return defaultAction(node, p); } public R visitTypeCast(TypeCastTree node, P p) { return defaultAction(node, p); } public R visitInstanceOf(InstanceOfTree node, P p) { return defaultAction(node, p); } public R visitArrayAccess(ArrayAccessTree node, P p) { return defaultAction(node, p); } public R visitMemberSelect(MemberSelectTree node, P p) { return defaultAction(node, p); } public R visitMemberReference(MemberReferenceTree node, P p) { return defaultAction(node, p); } public R visitIdentifier(IdentifierTree node, P p) { return defaultAction(node, p); } public R visitLiteral(LiteralTree node, P p) { return defaultAction(node, p); } public R visitPrimitiveType(PrimitiveTypeTree node, P p) { return defaultAction(node, p); } public R visitArrayType(ArrayTypeTree node, P p) { return defaultAction(node, p); } public R visitParameterizedType(ParameterizedTypeTree node, P p) { return defaultAction(node, p); } public R visitUnionType(UnionTypeTree node, P p) { return defaultAction(node, p); } public R visitIntersectionType(IntersectionTypeTree node, P p) { return defaultAction(node, p); } public R visitTypeParameter(TypeParameterTree node, P p) { return defaultAction(node, p); } public R visitWildcard(WildcardTree node, P p) { return defaultAction(node, p); } public R visitModifiers(ModifiersTree node, P p) { return defaultAction(node, p); } public R visitAnnotation(AnnotationTree node, P p) { return defaultAction(node, p); } public R visitAnnotatedType(AnnotatedTypeTree node, P p) { return defaultAction(node, p); } public R visitErroneous(ErroneousTree node, P p) { return defaultAction(node, p); } public R visitOther(Tree node, P p) { return defaultAction(node, p); } } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/util/SourcePositions.java0000644000000000000000000000657012214026367030110 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.util; import com.sun.source.tree.*; /** * Provides methods to obtain the position of a Tree within a CompilationUnit. * A position is defined as a simple character offset from the start of a * CompilationUnit where the first character is at offset 0. * * @author Peter von der Ahé * @since 1.6 */ @jdk.Supported public interface SourcePositions { /** * Gets the starting position of tree within file. If tree is not found within * file, or if the starting position is not available, * return {@link javax.tools.Diagnostic#NOPOS}. * The returned position must be at the start of the yield of this tree, that * is for any sub-tree of this tree, the following must hold: * *

* {@code tree.getStartPosition() <= subtree.getStartPosition()} or
* {@code tree.getStartPosition() == NOPOS} or
* {@code subtree.getStartPosition() == NOPOS} *

* * @param file CompilationUnit in which to find tree. * @param tree tree for which a position is sought. * @return the start position of tree. */ long getStartPosition(CompilationUnitTree file, Tree tree); /** * Gets the ending position of tree within file. If tree is not found within * file, or if the ending position is not available, * return {@link javax.tools.Diagnostic#NOPOS}. * The returned position must be at the end of the yield of this tree, * that is for any sub-tree of this tree, the following must hold: * *

* {@code tree.getEndPosition() >= subtree.getEndPosition()} or
* {@code tree.getEndPosition() == NOPOS} or
* {@code subtree.getEndPosition() == NOPOS} *

* * In addition, the following must hold: * *

* {@code tree.getStartPosition() <= tree.getEndPosition()} or
* {@code tree.getStartPosition() == NOPOS} or
* {@code tree.getEndPosition() == NOPOS} *

* * @param file CompilationUnit in which to find tree. * @param tree tree for which a position is sought. * @return the end position of tree. */ long getEndPosition(CompilationUnitTree file, Tree tree); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/util/TaskEvent.java0000644000000000000000000000704112214026367026636 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.util; import javax.lang.model.element.TypeElement; import javax.tools.JavaFileObject; import com.sun.source.tree.CompilationUnitTree; /** * Provides details about work that has been done by the JDK Java Compiler, javac. * * @author Jonathan Gibbons * @since 1.6 */ @jdk.Supported public final class TaskEvent { /** * Kind of task event. * @since 1.6 */ @jdk.Supported public enum Kind { /** * For events related to the parsing of a file. */ PARSE, /** * For events relating to elements being entered. **/ ENTER, /** * For events relating to elements being analyzed for errors. **/ ANALYZE, /** * For events relating to class files being generated. **/ GENERATE, /** * For events relating to overall annotation processing. **/ ANNOTATION_PROCESSING, /** * For events relating to an individual annotation processing round. **/ ANNOTATION_PROCESSING_ROUND }; public TaskEvent(Kind kind) { this(kind, null, null, null); } public TaskEvent(Kind kind, JavaFileObject sourceFile) { this(kind, sourceFile, null, null); } public TaskEvent(Kind kind, CompilationUnitTree unit) { this(kind, unit.getSourceFile(), unit, null); } public TaskEvent(Kind kind, CompilationUnitTree unit, TypeElement clazz) { this(kind, unit.getSourceFile(), unit, clazz); } private TaskEvent(Kind kind, JavaFileObject file, CompilationUnitTree unit, TypeElement clazz) { this.kind = kind; this.file = file; this.unit = unit; this.clazz = clazz; } public Kind getKind() { return kind; } public JavaFileObject getSourceFile() { return file; } public CompilationUnitTree getCompilationUnit() { return unit; } public TypeElement getTypeElement() { return clazz; } public String toString() { return "TaskEvent[" + kind + "," + file + "," // the compilation unit is identified by the file + clazz + "]"; } private Kind kind; private JavaFileObject file; private CompilationUnitTree unit; private TypeElement clazz; } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/util/TaskListener.java0000644000000000000000000000274112214026367027344 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.util; /** * Provides a listener to monitor the activity of the JDK Java Compiler, javac. * * @author Jonathan Gibbons * @since 1.6 */ @jdk.Supported public interface TaskListener { public void started(TaskEvent e); public void finished(TaskEvent e); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/util/TreePath.java0000644000000000000000000001075712214026367026456 0ustar 00000000000000/* * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.util; import java.util.Iterator; import com.sun.source.tree.*; /** * A path of tree nodes, typically used to represent the sequence of ancestor * nodes of a tree node up to the top level CompilationUnitTree node. * * @author Jonathan Gibbons * @since 1.6 */ @jdk.Supported public class TreePath implements Iterable { /** * Gets a tree path for a tree node within a compilation unit. * @return null if the node is not found */ public static TreePath getPath(CompilationUnitTree unit, Tree target) { return getPath(new TreePath(unit), target); } /** * Gets a tree path for a tree node within a subtree identified by a TreePath object. * @return null if the node is not found */ public static TreePath getPath(TreePath path, Tree target) { path.getClass(); target.getClass(); class Result extends Error { static final long serialVersionUID = -5942088234594905625L; TreePath path; Result(TreePath path) { this.path = path; } } class PathFinder extends TreePathScanner { public TreePath scan(Tree tree, Tree target) { if (tree == target) { throw new Result(new TreePath(getCurrentPath(), target)); } return super.scan(tree, target); } } if (path.getLeaf() == target) { return path; } try { new PathFinder().scan(path, target); } catch (Result result) { return result.path; } return null; } /** * Creates a TreePath for a root node. */ public TreePath(CompilationUnitTree t) { this(null, t); } /** * Creates a TreePath for a child node. */ public TreePath(TreePath p, Tree t) { if (t.getKind() == Tree.Kind.COMPILATION_UNIT) { compilationUnit = (CompilationUnitTree) t; parent = null; } else { compilationUnit = p.compilationUnit; parent = p; } leaf = t; } /** * Get the compilation unit associated with this path. */ public CompilationUnitTree getCompilationUnit() { return compilationUnit; } /** * Get the leaf node for this path. */ public Tree getLeaf() { return leaf; } /** * Get the path for the enclosing node, or null if there is no enclosing node. */ public TreePath getParentPath() { return parent; } /** * Iterates from leaves to root. */ @Override public Iterator iterator() { return new Iterator() { @Override public boolean hasNext() { return next != null; } @Override public Tree next() { Tree t = next.leaf; next = next.parent; return t; } @Override public void remove() { throw new UnsupportedOperationException(); } private TreePath next = TreePath.this; }; } private CompilationUnitTree compilationUnit; private Tree leaf; private TreePath parent; } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/util/TreePathScanner.java0000644000000000000000000000503312214026367027757 0ustar 00000000000000/* * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.util; import com.sun.source.tree.*; /** * A TreeVisitor that visits all the child tree nodes, and provides * support for maintaining a path for the parent nodes. * To visit nodes of a particular type, just override the * corresponding visitorXYZ method. * Inside your method, call super.visitXYZ to visit descendant * nodes. * * @author Jonathan Gibbons * @since 1.6 */ @jdk.Supported public class TreePathScanner extends TreeScanner { /** * Scan a tree from a position identified by a TreePath. */ public R scan(TreePath path, P p) { this.path = path; try { return path.getLeaf().accept(this, p); } finally { this.path = null; } } /** * Scan a single node. * The current path is updated for the duration of the scan. */ @Override public R scan(Tree tree, P p) { if (tree == null) return null; TreePath prev = path; path = new TreePath(path, tree); try { return tree.accept(this, p); } finally { path = prev; } } /** * Get the current path for the node, as built up by the currently * active set of scan calls. */ public TreePath getCurrentPath() { return path; } private TreePath path; } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/util/TreeScanner.java0000644000000000000000000003213512214026367027145 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.util; import com.sun.source.tree.*; /** * A TreeVisitor that visits all the child tree nodes. * To visit nodes of a particular type, just override the * corresponding visitXYZ method. * Inside your method, call super.visitXYZ to visit descendant * nodes. * *

The default implementation of the visitXYZ methods will determine * a result as follows: *

    *
  • If the node being visited has no children, the result will be null. *
  • If the node being visited has one child, the result will be the * result of calling {@code scan} on that child. The child may be a simple node * or itself a list of nodes. *
  • If the node being visited has more than one child, the result will * be determined by calling {@code scan} each child in turn, and then combining the * result of each scan after the first with the cumulative result * so far, as determined by the {@link #reduce} method. Each child may be either * a simple node of a list of nodes. The default behavior of the {@code reduce} * method is such that the result of the visitXYZ method will be the result of * the last child scanned. *
* *

Here is an example to count the number of identifier nodes in a tree: *

 *   class CountIdentifiers extends TreeScanner<Integer,Void> {
 *      {@literal @}Override
 *      public Integer visitIdentifier(IdentifierTree node, Void p) {
 *          return 1;
 *      }
 *      {@literal @}Override
 *      public Integer reduce(Integer r1, Integer r2) {
 *          return (r1 == null ? 0 : r1) + (r2 == null ? 0 : r2);
 *      }
 *   }
 * 
* * @author Peter von der Ahé * @author Jonathan Gibbons * @since 1.6 */ @jdk.Supported public class TreeScanner implements TreeVisitor { /** Scan a single node. */ public R scan(Tree node, P p) { return (node == null) ? null : node.accept(this, p); } private R scanAndReduce(Tree node, P p, R r) { return reduce(scan(node, p), r); } /** Scan a list of nodes. */ public R scan(Iterable nodes, P p) { R r = null; if (nodes != null) { boolean first = true; for (Tree node : nodes) { r = (first ? scan(node, p) : scanAndReduce(node, p, r)); first = false; } } return r; } private R scanAndReduce(Iterable nodes, P p, R r) { return reduce(scan(nodes, p), r); } /** * Reduces two results into a combined result. * The default implementation is to return the first parameter. * The general contract of the method is that it may take any action whatsoever. */ public R reduce(R r1, R r2) { return r1; } /* *************************************************************************** * Visitor methods ****************************************************************************/ public R visitCompilationUnit(CompilationUnitTree node, P p) { R r = scan(node.getPackageAnnotations(), p); r = scanAndReduce(node.getPackageName(), p, r); r = scanAndReduce(node.getImports(), p, r); r = scanAndReduce(node.getTypeDecls(), p, r); return r; } public R visitImport(ImportTree node, P p) { return scan(node.getQualifiedIdentifier(), p); } public R visitClass(ClassTree node, P p) { R r = scan(node.getModifiers(), p); r = scanAndReduce(node.getTypeParameters(), p, r); r = scanAndReduce(node.getExtendsClause(), p, r); r = scanAndReduce(node.getImplementsClause(), p, r); r = scanAndReduce(node.getMembers(), p, r); return r; } public R visitMethod(MethodTree node, P p) { R r = scan(node.getModifiers(), p); r = scanAndReduce(node.getReturnType(), p, r); r = scanAndReduce(node.getTypeParameters(), p, r); r = scanAndReduce(node.getParameters(), p, r); r = scanAndReduce(node.getReceiverParameter(), p, r); r = scanAndReduce(node.getThrows(), p, r); r = scanAndReduce(node.getBody(), p, r); r = scanAndReduce(node.getDefaultValue(), p, r); return r; } public R visitVariable(VariableTree node, P p) { R r = scan(node.getModifiers(), p); r = scanAndReduce(node.getType(), p, r); r = scanAndReduce(node.getNameExpression(), p, r); r = scanAndReduce(node.getInitializer(), p, r); return r; } public R visitEmptyStatement(EmptyStatementTree node, P p) { return null; } public R visitBlock(BlockTree node, P p) { return scan(node.getStatements(), p); } public R visitDoWhileLoop(DoWhileLoopTree node, P p) { R r = scan(node.getStatement(), p); r = scanAndReduce(node.getCondition(), p, r); return r; } public R visitWhileLoop(WhileLoopTree node, P p) { R r = scan(node.getCondition(), p); r = scanAndReduce(node.getStatement(), p, r); return r; } public R visitForLoop(ForLoopTree node, P p) { R r = scan(node.getInitializer(), p); r = scanAndReduce(node.getCondition(), p, r); r = scanAndReduce(node.getUpdate(), p, r); r = scanAndReduce(node.getStatement(), p, r); return r; } public R visitEnhancedForLoop(EnhancedForLoopTree node, P p) { R r = scan(node.getVariable(), p); r = scanAndReduce(node.getExpression(), p, r); r = scanAndReduce(node.getStatement(), p, r); return r; } public R visitLabeledStatement(LabeledStatementTree node, P p) { return scan(node.getStatement(), p); } public R visitSwitch(SwitchTree node, P p) { R r = scan(node.getExpression(), p); r = scanAndReduce(node.getCases(), p, r); return r; } public R visitCase(CaseTree node, P p) { R r = scan(node.getExpression(), p); r = scanAndReduce(node.getStatements(), p, r); return r; } public R visitSynchronized(SynchronizedTree node, P p) { R r = scan(node.getExpression(), p); r = scanAndReduce(node.getBlock(), p, r); return r; } public R visitTry(TryTree node, P p) { R r = scan(node.getResources(), p); r = scanAndReduce(node.getBlock(), p, r); r = scanAndReduce(node.getCatches(), p, r); r = scanAndReduce(node.getFinallyBlock(), p, r); return r; } public R visitCatch(CatchTree node, P p) { R r = scan(node.getParameter(), p); r = scanAndReduce(node.getBlock(), p, r); return r; } public R visitConditionalExpression(ConditionalExpressionTree node, P p) { R r = scan(node.getCondition(), p); r = scanAndReduce(node.getTrueExpression(), p, r); r = scanAndReduce(node.getFalseExpression(), p, r); return r; } public R visitIf(IfTree node, P p) { R r = scan(node.getCondition(), p); r = scanAndReduce(node.getThenStatement(), p, r); r = scanAndReduce(node.getElseStatement(), p, r); return r; } public R visitExpressionStatement(ExpressionStatementTree node, P p) { return scan(node.getExpression(), p); } public R visitBreak(BreakTree node, P p) { return null; } public R visitContinue(ContinueTree node, P p) { return null; } public R visitReturn(ReturnTree node, P p) { return scan(node.getExpression(), p); } public R visitThrow(ThrowTree node, P p) { return scan(node.getExpression(), p); } public R visitAssert(AssertTree node, P p) { R r = scan(node.getCondition(), p); r = scanAndReduce(node.getDetail(), p, r); return r; } public R visitMethodInvocation(MethodInvocationTree node, P p) { R r = scan(node.getTypeArguments(), p); r = scanAndReduce(node.getMethodSelect(), p, r); r = scanAndReduce(node.getArguments(), p, r); return r; } public R visitNewClass(NewClassTree node, P p) { R r = scan(node.getEnclosingExpression(), p); r = scanAndReduce(node.getIdentifier(), p, r); r = scanAndReduce(node.getTypeArguments(), p, r); r = scanAndReduce(node.getArguments(), p, r); r = scanAndReduce(node.getClassBody(), p, r); return r; } public R visitNewArray(NewArrayTree node, P p) { R r = scan(node.getType(), p); r = scanAndReduce(node.getDimensions(), p, r); r = scanAndReduce(node.getInitializers(), p, r); return r; } public R visitLambdaExpression(LambdaExpressionTree node, P p) { R r = scan(node.getParameters(), p); r = scanAndReduce(node.getBody(), p, r); return r; } public R visitParenthesized(ParenthesizedTree node, P p) { return scan(node.getExpression(), p); } public R visitAssignment(AssignmentTree node, P p) { R r = scan(node.getVariable(), p); r = scanAndReduce(node.getExpression(), p, r); return r; } public R visitCompoundAssignment(CompoundAssignmentTree node, P p) { R r = scan(node.getVariable(), p); r = scanAndReduce(node.getExpression(), p, r); return r; } public R visitUnary(UnaryTree node, P p) { return scan(node.getExpression(), p); } public R visitBinary(BinaryTree node, P p) { R r = scan(node.getLeftOperand(), p); r = scanAndReduce(node.getRightOperand(), p, r); return r; } public R visitTypeCast(TypeCastTree node, P p) { R r = scan(node.getType(), p); r = scanAndReduce(node.getExpression(), p, r); return r; } public R visitInstanceOf(InstanceOfTree node, P p) { R r = scan(node.getExpression(), p); r = scanAndReduce(node.getType(), p, r); return r; } public R visitArrayAccess(ArrayAccessTree node, P p) { R r = scan(node.getExpression(), p); r = scanAndReduce(node.getIndex(), p, r); return r; } public R visitMemberSelect(MemberSelectTree node, P p) { return scan(node.getExpression(), p); } public R visitMemberReference(MemberReferenceTree node, P p) { R r = scan(node.getQualifierExpression(), p); r = scanAndReduce(node.getTypeArguments(), p, r); return r; } public R visitIdentifier(IdentifierTree node, P p) { return null; } public R visitLiteral(LiteralTree node, P p) { return null; } public R visitPrimitiveType(PrimitiveTypeTree node, P p) { return null; } public R visitArrayType(ArrayTypeTree node, P p) { return scan(node.getType(), p); } public R visitParameterizedType(ParameterizedTypeTree node, P p) { R r = scan(node.getType(), p); r = scanAndReduce(node.getTypeArguments(), p, r); return r; } public R visitUnionType(UnionTypeTree node, P p) { return scan(node.getTypeAlternatives(), p); } public R visitIntersectionType(IntersectionTypeTree node, P p) { return scan(node.getBounds(), p); } public R visitTypeParameter(TypeParameterTree node, P p) { R r = scan(node.getAnnotations(), p); r = scanAndReduce(node.getBounds(), p, r); return r; } public R visitWildcard(WildcardTree node, P p) { return scan(node.getBound(), p); } public R visitModifiers(ModifiersTree node, P p) { return scan(node.getAnnotations(), p); } public R visitAnnotation(AnnotationTree node, P p) { R r = scan(node.getAnnotationType(), p); r = scanAndReduce(node.getArguments(), p, r); return r; } public R visitAnnotatedType(AnnotatedTypeTree node, P p) { R r = scan(node.getAnnotations(), p); r = scanAndReduce(node.getUnderlyingType(), p, r); return r; } public R visitOther(Tree node, P p) { return null; } public R visitErroneous(ErroneousTree node, P p) { return scan(node.getErrorTrees(), p); } } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/util/Trees.java0000644000000000000000000002103012214026367026006 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.source.util; import java.lang.reflect.Method; import javax.annotation.processing.ProcessingEnvironment; import javax.lang.model.element.AnnotationMirror; import javax.lang.model.element.AnnotationValue; import javax.lang.model.element.Element; import javax.lang.model.element.ExecutableElement; import javax.lang.model.element.TypeElement; import javax.lang.model.type.DeclaredType; import javax.lang.model.type.ErrorType; import javax.lang.model.type.TypeMirror; import javax.tools.Diagnostic; import javax.tools.JavaCompiler.CompilationTask; import com.sun.source.tree.CatchTree; import com.sun.source.tree.ClassTree; import com.sun.source.tree.CompilationUnitTree; import com.sun.source.tree.MethodTree; import com.sun.source.tree.Scope; import com.sun.source.tree.Tree; /** * Bridges JSR 199, JSR 269, and the Tree API. * * @author Peter von der Ahé */ @jdk.Supported public abstract class Trees { /** * Gets a Trees object for a given CompilationTask. * @param task the compilation task for which to get the Trees object * @throws IllegalArgumentException if the task does not support the Trees API. */ public static Trees instance(CompilationTask task) { String taskClassName = task.getClass().getName(); if (!taskClassName.equals("com.sun.tools.javac.api.JavacTaskImpl") && !taskClassName.equals("com.sun.tools.javac.api.BasicJavacTask")) throw new IllegalArgumentException(); return getJavacTrees(CompilationTask.class, task); } /** * Gets a Trees object for a given ProcessingEnvironment. * @param env the processing environment for which to get the Trees object * @throws IllegalArgumentException if the env does not support the Trees API. */ public static Trees instance(ProcessingEnvironment env) { if (!env.getClass().getName().equals("com.sun.tools.javac.processing.JavacProcessingEnvironment")) throw new IllegalArgumentException(); return getJavacTrees(ProcessingEnvironment.class, env); } static Trees getJavacTrees(Class argType, Object arg) { try { ClassLoader cl = arg.getClass().getClassLoader(); Class c = Class.forName("com.sun.tools.javac.api.JavacTrees", false, cl); argType = Class.forName(argType.getName(), false, cl); Method m = c.getMethod("instance", new Class[] { argType }); return (Trees) m.invoke(null, new Object[] { arg }); } catch (Throwable e) { throw new AssertionError(e); } } /** * Gets a utility object for obtaining source positions. */ public abstract SourcePositions getSourcePositions(); /** * Gets the Tree node for a given Element. * Returns null if the node can not be found. */ public abstract Tree getTree(Element element); /** * Gets the ClassTree node for a given TypeElement. * Returns null if the node can not be found. */ public abstract ClassTree getTree(TypeElement element); /** * Gets the MethodTree node for a given ExecutableElement. * Returns null if the node can not be found. */ public abstract MethodTree getTree(ExecutableElement method); /** * Gets the Tree node for an AnnotationMirror on a given Element. * Returns null if the node can not be found. */ public abstract Tree getTree(Element e, AnnotationMirror a); /** * Gets the Tree node for an AnnotationValue for an AnnotationMirror on a given Element. * Returns null if the node can not be found. */ public abstract Tree getTree(Element e, AnnotationMirror a, AnnotationValue v); /** * Gets the path to tree node within the specified compilation unit. */ public abstract TreePath getPath(CompilationUnitTree unit, Tree node); /** * Gets the TreePath node for a given Element. * Returns null if the node can not be found. */ public abstract TreePath getPath(Element e); /** * Gets the TreePath node for an AnnotationMirror on a given Element. * Returns null if the node can not be found. */ public abstract TreePath getPath(Element e, AnnotationMirror a); /** * Gets the TreePath node for an AnnotationValue for an AnnotationMirror on a given Element. * Returns null if the node can not be found. */ public abstract TreePath getPath(Element e, AnnotationMirror a, AnnotationValue v); /** * Gets the Element for the Tree node identified by a given TreePath. * Returns null if the element is not available. * @throws IllegalArgumentException is the TreePath does not identify * a Tree node that might have an associated Element. */ public abstract Element getElement(TreePath path); /** * Gets the TypeMirror for the Tree node identified by a given TreePath. * Returns null if the TypeMirror is not available. * @throws IllegalArgumentException is the TreePath does not identify * a Tree node that might have an associated TypeMirror. */ public abstract TypeMirror getTypeMirror(TreePath path); /** * Gets the Scope for the Tree node identified by a given TreePath. * Returns null if the Scope is not available. */ public abstract Scope getScope(TreePath path); /** * Gets the doc comment, if any, for the Tree node identified by a given TreePath. * Returns null if no doc comment was found. * @see DocTrees#getDocCommentTree(TreePath) */ public abstract String getDocComment(TreePath path); /** * Checks whether a given type is accessible in a given scope. * @param scope the scope to be checked * @param type the type to be checked * @return true if {@code type} is accessible */ public abstract boolean isAccessible(Scope scope, TypeElement type); /** * Checks whether the given element is accessible as a member of the given * type in a given scope. * @param scope the scope to be checked * @param member the member to be checked * @param type the type for which to check if the member is accessible * @return true if {@code member} is accessible in {@code type} */ public abstract boolean isAccessible(Scope scope, Element member, DeclaredType type); /** * Gets the original type from the ErrorType object. * @param errorType The errorType for which we want to get the original type. * @return javax.lang.model.type.TypeMirror corresponding to the original type, replaced by the ErrorType. */ public abstract TypeMirror getOriginalType(ErrorType errorType); /** * Prints a message of the specified kind at the location of the * tree within the provided compilation unit * * @param kind the kind of message * @param msg the message, or an empty string if none * @param t the tree to use as a position hint * @param root the compilation unit that contains tree */ public abstract void printMessage(Diagnostic.Kind kind, CharSequence msg, com.sun.source.tree.Tree t, com.sun.source.tree.CompilationUnitTree root); /** * Gets the lub of an exception parameter declared in a catch clause. * @param tree the tree for the catch clause * @return The lub of the exception parameter */ public abstract TypeMirror getLub(CatchTree tree); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/source/util/package-info.java0000644000000000000000000000261012214026367027253 0ustar 00000000000000/* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ /** * Provides utilities for operations on abstract syntax trees (AST). * * @author Peter von der Ahé * @author Jonathan Gibbons * @since 1.6 */ @jdk.Supported package com.sun.source.util; libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/AccessFlags.java0000644000000000000000000002177012214026367027745 0ustar 00000000000000/* * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.classfile; import java.io.IOException; import java.util.LinkedHashSet; import java.util.Set; /** * See JVMS, sections 4.2, 4.6, 4.7. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. */ public class AccessFlags { public static final int ACC_PUBLIC = 0x0001; // class, inner, field, method public static final int ACC_PRIVATE = 0x0002; // inner, field, method public static final int ACC_PROTECTED = 0x0004; // inner, field, method public static final int ACC_STATIC = 0x0008; // inner, field, method public static final int ACC_FINAL = 0x0010; // class, inner, field, method public static final int ACC_SUPER = 0x0020; // class public static final int ACC_SYNCHRONIZED = 0x0020; // method public static final int ACC_VOLATILE = 0x0040; // field public static final int ACC_BRIDGE = 0x0040; // method public static final int ACC_TRANSIENT = 0x0080; // field public static final int ACC_VARARGS = 0x0080; // method public static final int ACC_NATIVE = 0x0100; // method public static final int ACC_INTERFACE = 0x0200; // class, inner public static final int ACC_ABSTRACT = 0x0400; // class, inner, method public static final int ACC_STRICT = 0x0800; // method public static final int ACC_SYNTHETIC = 0x1000; // class, inner, field, method public static final int ACC_ANNOTATION = 0x2000; // class, inner public static final int ACC_ENUM = 0x4000; // class, inner, field public static final int ACC_MANDATED = 0x8000; // class, inner, field, method public static enum Kind { Class, InnerClass, Field, Method}; AccessFlags(ClassReader cr) throws IOException { this(cr.readUnsignedShort()); } public AccessFlags(int flags) { this.flags = flags; } public AccessFlags ignore(int mask) { return new AccessFlags(flags & ~mask); } public boolean is(int mask) { return (flags & mask) != 0; } public int byteLength() { return 2; } private static final int[] classModifiers = { ACC_PUBLIC, ACC_FINAL, ACC_ABSTRACT }; private static final int[] classFlags = { ACC_PUBLIC, ACC_FINAL, ACC_SUPER, ACC_INTERFACE, ACC_ABSTRACT, ACC_SYNTHETIC, ACC_ANNOTATION, ACC_ENUM }; public Set getClassModifiers() { int f = ((flags & ACC_INTERFACE) != 0 ? flags & ~ACC_ABSTRACT : flags); return getModifiers(f, classModifiers, Kind.Class); } public Set getClassFlags() { return getFlags(classFlags, Kind.Class); } private static final int[] innerClassModifiers = { ACC_PUBLIC, ACC_PRIVATE, ACC_PROTECTED, ACC_STATIC, ACC_FINAL, ACC_ABSTRACT }; private static final int[] innerClassFlags = { ACC_PUBLIC, ACC_PRIVATE, ACC_PROTECTED, ACC_STATIC, ACC_FINAL, ACC_SUPER, ACC_INTERFACE, ACC_ABSTRACT, ACC_SYNTHETIC, ACC_ANNOTATION, ACC_ENUM }; public Set getInnerClassModifiers() { int f = ((flags & ACC_INTERFACE) != 0 ? flags & ~ACC_ABSTRACT : flags); return getModifiers(f, innerClassModifiers, Kind.InnerClass); } public Set getInnerClassFlags() { return getFlags(innerClassFlags, Kind.InnerClass); } private static final int[] fieldModifiers = { ACC_PUBLIC, ACC_PRIVATE, ACC_PROTECTED, ACC_STATIC, ACC_FINAL, ACC_VOLATILE, ACC_TRANSIENT }; private static final int[] fieldFlags = { ACC_PUBLIC, ACC_PRIVATE, ACC_PROTECTED, ACC_STATIC, ACC_FINAL, ACC_VOLATILE, ACC_TRANSIENT, ACC_SYNTHETIC, ACC_ENUM }; public Set getFieldModifiers() { return getModifiers(fieldModifiers, Kind.Field); } public Set getFieldFlags() { return getFlags(fieldFlags, Kind.Field); } private static final int[] methodModifiers = { ACC_PUBLIC, ACC_PRIVATE, ACC_PROTECTED, ACC_STATIC, ACC_FINAL, ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT, ACC_STRICT }; private static final int[] methodFlags = { ACC_PUBLIC, ACC_PRIVATE, ACC_PROTECTED, ACC_STATIC, ACC_FINAL, ACC_SYNCHRONIZED, ACC_BRIDGE, ACC_VARARGS, ACC_NATIVE, ACC_ABSTRACT, ACC_STRICT, ACC_SYNTHETIC }; public Set getMethodModifiers() { return getModifiers(methodModifiers, Kind.Method); } public Set getMethodFlags() { return getFlags(methodFlags, Kind.Method); } private Set getModifiers(int[] modifierFlags, Kind t) { return getModifiers(flags, modifierFlags, t); } private static Set getModifiers(int flags, int[] modifierFlags, Kind t) { Set s = new LinkedHashSet(); for (int m: modifierFlags) { if ((flags & m) != 0) s.add(flagToModifier(m, t)); } return s; } private Set getFlags(int[] expectedFlags, Kind t) { Set s = new LinkedHashSet(); int f = flags; for (int e: expectedFlags) { if ((f & e) != 0) { s.add(flagToName(e, t)); f = f & ~e; } } while (f != 0) { int bit = Integer.highestOneBit(f); s.add("0x" + Integer.toHexString(bit)); f = f & ~bit; } return s; } private static String flagToModifier(int flag, Kind t) { switch (flag) { case ACC_PUBLIC: return "public"; case ACC_PRIVATE: return "private"; case ACC_PROTECTED: return "protected"; case ACC_STATIC: return "static"; case ACC_FINAL: return "final"; case ACC_SYNCHRONIZED: return "synchronized"; case 0x80: return (t == Kind.Field ? "transient" : null); case ACC_VOLATILE: return "volatile"; case ACC_NATIVE: return "native"; case ACC_ABSTRACT: return "abstract"; case ACC_STRICT: return "strictfp"; case ACC_MANDATED: return "mandated"; default: return null; } } private static String flagToName(int flag, Kind t) { switch (flag) { case ACC_PUBLIC: return "ACC_PUBLIC"; case ACC_PRIVATE: return "ACC_PRIVATE"; case ACC_PROTECTED: return "ACC_PROTECTED"; case ACC_STATIC: return "ACC_STATIC"; case ACC_FINAL: return "ACC_FINAL"; case 0x20: return (t == Kind.Class ? "ACC_SUPER" : "ACC_SYNCHRONIZED"); case 0x40: return (t == Kind.Field ? "ACC_VOLATILE" : "ACC_BRIDGE"); case 0x80: return (t == Kind.Field ? "ACC_TRANSIENT" : "ACC_VARARGS"); case ACC_NATIVE: return "ACC_NATIVE"; case ACC_INTERFACE: return "ACC_INTERFACE"; case ACC_ABSTRACT: return "ACC_ABSTRACT"; case ACC_STRICT: return "ACC_STRICT"; case ACC_SYNTHETIC: return "ACC_SYNTHETIC"; case ACC_ANNOTATION: return "ACC_ANNOTATION"; case ACC_ENUM: return "ACC_ENUM"; case ACC_MANDATED: return "ACC_MANDATED"; default: return null; } } public final int flags; } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/Annotation.java0000644000000000000000000001706412214026367027702 0ustar 00000000000000/* * Copyright (c) 2007, 2009, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.classfile; import java.io.IOException; /** * See JVMS, section 4.8.16. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. */ public class Annotation { static class InvalidAnnotation extends AttributeException { private static final long serialVersionUID = -4620480740735772708L; InvalidAnnotation(String msg) { super(msg); } } Annotation(ClassReader cr) throws IOException, InvalidAnnotation { type_index = cr.readUnsignedShort(); num_element_value_pairs = cr.readUnsignedShort(); element_value_pairs = new element_value_pair[num_element_value_pairs]; for (int i = 0; i < element_value_pairs.length; i++) element_value_pairs[i] = new element_value_pair(cr); } public Annotation(ConstantPool constant_pool, int type_index, element_value_pair[] element_value_pairs) { this.type_index = type_index; num_element_value_pairs = element_value_pairs.length; this.element_value_pairs = element_value_pairs; } public int length() { int n = 2 /*type_index*/ + 2 /*num_element_value_pairs*/; for (element_value_pair pair: element_value_pairs) n += pair.length(); return n; } public final int type_index; public final int num_element_value_pairs; public final element_value_pair element_value_pairs[]; /** * See JVMS, section 4.8.16.1. */ public static abstract class element_value { public static element_value read(ClassReader cr) throws IOException, InvalidAnnotation { int tag = cr.readUnsignedByte(); switch (tag) { case 'B': case 'C': case 'D': case 'F': case 'I': case 'J': case 'S': case 'Z': case 's': return new Primitive_element_value(cr, tag); case 'e': return new Enum_element_value(cr, tag); case 'c': return new Class_element_value(cr, tag); case '@': return new Annotation_element_value(cr, tag); case '[': return new Array_element_value(cr, tag); default: throw new InvalidAnnotation("unrecognized tag: " + tag); } } protected element_value(int tag) { this.tag = tag; } public abstract int length(); public abstract R accept(Visitor visitor, P p); public interface Visitor { R visitPrimitive(Primitive_element_value ev, P p); R visitEnum(Enum_element_value ev, P p); R visitClass(Class_element_value ev, P p); R visitAnnotation(Annotation_element_value ev, P p); R visitArray(Array_element_value ev, P p); } public final int tag; } public static class Primitive_element_value extends element_value { Primitive_element_value(ClassReader cr, int tag) throws IOException { super(tag); const_value_index = cr.readUnsignedShort(); } @Override public int length() { return 2; } public R accept(Visitor visitor, P p) { return visitor.visitPrimitive(this, p); } public final int const_value_index; } public static class Enum_element_value extends element_value { Enum_element_value(ClassReader cr, int tag) throws IOException { super(tag); type_name_index = cr.readUnsignedShort(); const_name_index = cr.readUnsignedShort(); } @Override public int length() { return 4; } public R accept(Visitor visitor, P p) { return visitor.visitEnum(this, p); } public final int type_name_index; public final int const_name_index; } public static class Class_element_value extends element_value { Class_element_value(ClassReader cr, int tag) throws IOException { super(tag); class_info_index = cr.readUnsignedShort(); } @Override public int length() { return 2; } public R accept(Visitor visitor, P p) { return visitor.visitClass(this, p); } public final int class_info_index; } public static class Annotation_element_value extends element_value { Annotation_element_value(ClassReader cr, int tag) throws IOException, InvalidAnnotation { super(tag); annotation_value = new Annotation(cr); } @Override public int length() { return annotation_value.length(); } public R accept(Visitor visitor, P p) { return visitor.visitAnnotation(this, p); } public final Annotation annotation_value; } public static class Array_element_value extends element_value { Array_element_value(ClassReader cr, int tag) throws IOException, InvalidAnnotation { super(tag); num_values = cr.readUnsignedShort(); values = new element_value[num_values]; for (int i = 0; i < values.length; i++) values[i] = element_value.read(cr); } @Override public int length() { int n = 2; for (int i = 0; i < values.length; i++) n += values[i].length(); return n; } public R accept(Visitor visitor, P p) { return visitor.visitArray(this, p); } public final int num_values; public final element_value[] values; } public static class element_value_pair { element_value_pair(ClassReader cr) throws IOException, InvalidAnnotation { element_name_index = cr.readUnsignedShort(); value = element_value.read(cr); } public int length() { return 2 + value.length(); } public final int element_name_index; public final element_value value; } } ././@LongLink0000000000000000000000000000015200000000000011213 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/AnnotationDefault_attribute.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/AnnotationDefault_attribute0000644000000000000000000000464312214026367032351 0ustar 00000000000000/* * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.classfile; import java.io.IOException; /** * See JVMS, section 4.8.15. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. */ public class AnnotationDefault_attribute extends Attribute { AnnotationDefault_attribute(ClassReader cr, int name_index, int length) throws IOException, Annotation.InvalidAnnotation { super(name_index, length); default_value = Annotation.element_value.read(cr); } public AnnotationDefault_attribute(ConstantPool constant_pool, Annotation.element_value default_value) throws ConstantPoolException { this(constant_pool.getUTF8Index(Attribute.AnnotationDefault), default_value); } public AnnotationDefault_attribute(int name_index, Annotation.element_value default_value) { super(name_index, default_value.length()); this.default_value = default_value; } public R accept(Visitor visitor, D data) { return visitor.visitAnnotationDefault(this, data); } public final Annotation.element_value default_value; } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/Attribute.java0000644000000000000000000002557712214026367027543 0ustar 00000000000000/* * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.classfile; import java.io.IOException; import java.lang.reflect.Constructor; import java.util.HashMap; import java.util.Map; /** *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. */ public abstract class Attribute { public static final String AnnotationDefault = "AnnotationDefault"; public static final String BootstrapMethods = "BootstrapMethods"; public static final String CharacterRangeTable = "CharacterRangeTable"; public static final String Code = "Code"; public static final String ConstantValue = "ConstantValue"; public static final String CompilationID = "CompilationID"; public static final String Deprecated = "Deprecated"; public static final String EnclosingMethod = "EnclosingMethod"; public static final String Exceptions = "Exceptions"; public static final String InnerClasses = "InnerClasses"; public static final String LineNumberTable = "LineNumberTable"; public static final String LocalVariableTable = "LocalVariableTable"; public static final String LocalVariableTypeTable = "LocalVariableTypeTable"; public static final String MethodParameters = "MethodParameters"; public static final String RuntimeVisibleAnnotations = "RuntimeVisibleAnnotations"; public static final String RuntimeInvisibleAnnotations = "RuntimeInvisibleAnnotations"; public static final String RuntimeVisibleParameterAnnotations = "RuntimeVisibleParameterAnnotations"; public static final String RuntimeInvisibleParameterAnnotations = "RuntimeInvisibleParameterAnnotations"; public static final String RuntimeVisibleTypeAnnotations = "RuntimeVisibleTypeAnnotations"; public static final String RuntimeInvisibleTypeAnnotations = "RuntimeInvisibleTypeAnnotations"; public static final String Signature = "Signature"; public static final String SourceDebugExtension = "SourceDebugExtension"; public static final String SourceFile = "SourceFile"; public static final String SourceID = "SourceID"; public static final String StackMap = "StackMap"; public static final String StackMapTable = "StackMapTable"; public static final String Synthetic = "Synthetic"; public static class Factory { public Factory() { // defer init of standardAttributeClasses until after options set up } public void setCompat(boolean compat) { this.compat = compat; } public Attribute createAttribute(ClassReader cr, int name_index, byte[] data) throws IOException { if (standardAttributes == null) { init(); } ConstantPool cp = cr.getConstantPool(); String reasonForDefaultAttr; try { String name = cp.getUTF8Value(name_index); Class attrClass = standardAttributes.get(name); if (attrClass != null) { try { Class[] constrArgTypes = {ClassReader.class, int.class, int.class}; Constructor constr = attrClass.getDeclaredConstructor(constrArgTypes); return constr.newInstance(new Object[] { cr, name_index, data.length }); } catch (Throwable t) { reasonForDefaultAttr = t.toString(); // fall through and use DefaultAttribute // t.printStackTrace(); } } else { reasonForDefaultAttr = "unknown attribute"; } } catch (ConstantPoolException e) { reasonForDefaultAttr = e.toString(); // fall through and use DefaultAttribute } return new DefaultAttribute(cr, name_index, data, reasonForDefaultAttr); } protected void init() { standardAttributes = new HashMap>(); standardAttributes.put(AnnotationDefault, AnnotationDefault_attribute.class); standardAttributes.put(BootstrapMethods, BootstrapMethods_attribute.class); standardAttributes.put(CharacterRangeTable, CharacterRangeTable_attribute.class); standardAttributes.put(Code, Code_attribute.class); standardAttributes.put(ConstantValue, ConstantValue_attribute.class); standardAttributes.put(Deprecated, Deprecated_attribute.class); standardAttributes.put(EnclosingMethod, EnclosingMethod_attribute.class); standardAttributes.put(Exceptions, Exceptions_attribute.class); standardAttributes.put(InnerClasses, InnerClasses_attribute.class); standardAttributes.put(LineNumberTable, LineNumberTable_attribute.class); standardAttributes.put(LocalVariableTable, LocalVariableTable_attribute.class); standardAttributes.put(LocalVariableTypeTable, LocalVariableTypeTable_attribute.class); if (!compat) { // old javap does not recognize recent attributes standardAttributes.put(MethodParameters, MethodParameters_attribute.class); standardAttributes.put(CompilationID, CompilationID_attribute.class); standardAttributes.put(RuntimeInvisibleAnnotations, RuntimeInvisibleAnnotations_attribute.class); standardAttributes.put(RuntimeInvisibleParameterAnnotations, RuntimeInvisibleParameterAnnotations_attribute.class); standardAttributes.put(RuntimeVisibleAnnotations, RuntimeVisibleAnnotations_attribute.class); standardAttributes.put(RuntimeVisibleParameterAnnotations, RuntimeVisibleParameterAnnotations_attribute.class); standardAttributes.put(RuntimeVisibleTypeAnnotations, RuntimeVisibleTypeAnnotations_attribute.class); standardAttributes.put(RuntimeInvisibleTypeAnnotations, RuntimeInvisibleTypeAnnotations_attribute.class); standardAttributes.put(Signature, Signature_attribute.class); standardAttributes.put(SourceID, SourceID_attribute.class); } standardAttributes.put(SourceDebugExtension, SourceDebugExtension_attribute.class); standardAttributes.put(SourceFile, SourceFile_attribute.class); standardAttributes.put(StackMap, StackMap_attribute.class); standardAttributes.put(StackMapTable, StackMapTable_attribute.class); standardAttributes.put(Synthetic, Synthetic_attribute.class); } private Map> standardAttributes; private boolean compat; // don't support recent attrs in compatibility mode } public static Attribute read(ClassReader cr) throws IOException { return cr.readAttribute(); } protected Attribute(int name_index, int length) { attribute_name_index = name_index; attribute_length = length; } public String getName(ConstantPool constant_pool) throws ConstantPoolException { return constant_pool.getUTF8Value(attribute_name_index); } public abstract R accept(Attribute.Visitor visitor, D data); public int byteLength() { return 6 + attribute_length; } public final int attribute_name_index; public final int attribute_length; public interface Visitor { R visitBootstrapMethods(BootstrapMethods_attribute attr, P p); R visitDefault(DefaultAttribute attr, P p); R visitAnnotationDefault(AnnotationDefault_attribute attr, P p); R visitCharacterRangeTable(CharacterRangeTable_attribute attr, P p); R visitCode(Code_attribute attr, P p); R visitCompilationID(CompilationID_attribute attr, P p); R visitConstantValue(ConstantValue_attribute attr, P p); R visitDeprecated(Deprecated_attribute attr, P p); R visitEnclosingMethod(EnclosingMethod_attribute attr, P p); R visitExceptions(Exceptions_attribute attr, P p); R visitInnerClasses(InnerClasses_attribute attr, P p); R visitLineNumberTable(LineNumberTable_attribute attr, P p); R visitLocalVariableTable(LocalVariableTable_attribute attr, P p); R visitLocalVariableTypeTable(LocalVariableTypeTable_attribute attr, P p); R visitMethodParameters(MethodParameters_attribute attr, P p); R visitRuntimeVisibleAnnotations(RuntimeVisibleAnnotations_attribute attr, P p); R visitRuntimeInvisibleAnnotations(RuntimeInvisibleAnnotations_attribute attr, P p); R visitRuntimeVisibleParameterAnnotations(RuntimeVisibleParameterAnnotations_attribute attr, P p); R visitRuntimeInvisibleParameterAnnotations(RuntimeInvisibleParameterAnnotations_attribute attr, P p); R visitRuntimeVisibleTypeAnnotations(RuntimeVisibleTypeAnnotations_attribute attr, P p); R visitRuntimeInvisibleTypeAnnotations(RuntimeInvisibleTypeAnnotations_attribute attr, P p); R visitSignature(Signature_attribute attr, P p); R visitSourceDebugExtension(SourceDebugExtension_attribute attr, P p); R visitSourceFile(SourceFile_attribute attr, P p); R visitSourceID(SourceID_attribute attr, P p); R visitStackMap(StackMap_attribute attr, P p); R visitStackMapTable(StackMapTable_attribute attr, P p); R visitSynthetic(Synthetic_attribute attr, P p); } } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/AttributeException.java0000644000000000000000000000323712214026367031407 0ustar 00000000000000/* * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.classfile; /* *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. */ public class AttributeException extends Exception { private static final long serialVersionUID = -4231486387714867770L; AttributeException() { } AttributeException(String msg) { super(msg); } } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/Attributes.java0000644000000000000000000000703112214026367027707 0ustar 00000000000000/* * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.classfile; import java.io.IOException; import java.util.Arrays; import java.util.HashMap; import java.util.Iterator; import java.util.Map; /* *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. */ public class Attributes implements Iterable { Attributes(ClassReader cr) throws IOException { map = new HashMap(); int attrs_count = cr.readUnsignedShort(); attrs = new Attribute[attrs_count]; for (int i = 0; i < attrs_count; i++) { Attribute attr = Attribute.read(cr); attrs[i] = attr; try { map.put(attr.getName(cr.getConstantPool()), attr); } catch (ConstantPoolException e) { // don't enter invalid names in map } } } public Attributes(ConstantPool constant_pool, Attribute[] attrs) { this.attrs = attrs; map = new HashMap(); for (int i = 0; i < attrs.length; i++) { Attribute attr = attrs[i]; try { map.put(attr.getName(constant_pool), attr); } catch (ConstantPoolException e) { // don't enter invalid names in map } } } public Iterator iterator() { return Arrays.asList(attrs).iterator(); } public Attribute get(int index) { return attrs[index]; } public Attribute get(String name) { return map.get(name); } public int getIndex(ConstantPool constant_pool, String name) { for (int i = 0; i < attrs.length; i++) { Attribute attr = attrs[i]; try { if (attr != null && attr.getName(constant_pool).equals(name)) return i; } catch (ConstantPoolException e) { // ignore invalid entries } } return -1; } public int size() { return attrs.length; } public int byteLength() { int length = 2; for (Attribute a: attrs) length += a.byteLength(); return length; } public final Attribute[] attrs; public final Map map; } ././@LongLink0000000000000000000000000000015100000000000011212 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/BootstrapMethods_attribute.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/BootstrapMethods_attribute.0000644000000000000000000000724312214026367032310 0ustar 00000000000000/* * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.classfile; import java.io.IOException; /** * See JVMS 4.7.21 * http://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html#jvms-4.7.21 * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. */ public class BootstrapMethods_attribute extends Attribute { public final BootstrapMethodSpecifier[] bootstrap_method_specifiers; BootstrapMethods_attribute(ClassReader cr, int name_index, int length) throws IOException, AttributeException { super(name_index, length); int bootstrap_method_count = cr.readUnsignedShort(); bootstrap_method_specifiers = new BootstrapMethodSpecifier[bootstrap_method_count]; for (int i = 0; i < bootstrap_method_specifiers.length; i++) bootstrap_method_specifiers[i] = new BootstrapMethodSpecifier(cr); } public BootstrapMethods_attribute(int name_index, BootstrapMethodSpecifier[] bootstrap_method_specifiers) { super(name_index, length(bootstrap_method_specifiers)); this.bootstrap_method_specifiers = bootstrap_method_specifiers; } public static int length(BootstrapMethodSpecifier[] bootstrap_method_specifiers) { int n = 2; for (BootstrapMethodSpecifier b : bootstrap_method_specifiers) n += b.length(); return n; } @Override public R accept(Visitor visitor, P p) { return visitor.visitBootstrapMethods(this, p); } public static class BootstrapMethodSpecifier { public int bootstrap_method_ref; public int[] bootstrap_arguments; public BootstrapMethodSpecifier(int bootstrap_method_ref, int[] bootstrap_arguments) { this.bootstrap_method_ref = bootstrap_method_ref; this.bootstrap_arguments = bootstrap_arguments; } BootstrapMethodSpecifier(ClassReader cr) throws IOException { bootstrap_method_ref = cr.readUnsignedShort(); int method_count = cr.readUnsignedShort(); bootstrap_arguments = new int[method_count]; for (int i = 0; i < bootstrap_arguments.length; i++) { bootstrap_arguments[i] = cr.readUnsignedShort(); } } int length() { // u2 (method_ref) + u2 (argc) + u2 * argc return 2 + 2 + (bootstrap_arguments.length * 2); } } } ././@LongLink0000000000000000000000000000015400000000000011215 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/CharacterRangeTable_attribute.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/CharacterRangeTable_attribu0000644000000000000000000000724712214026367032225 0ustar 00000000000000/* * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.classfile; import java.io.IOException; /** *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. */ public class CharacterRangeTable_attribute extends Attribute { public static final int CRT_STATEMENT = 0x0001; public static final int CRT_BLOCK = 0x0002; public static final int CRT_ASSIGNMENT = 0x0004; public static final int CRT_FLOW_CONTROLLER = 0x0008; public static final int CRT_FLOW_TARGET = 0x0010; public static final int CRT_INVOKE = 0x0020; public static final int CRT_CREATE = 0x0040; public static final int CRT_BRANCH_TRUE = 0x0080; public static final int CRT_BRANCH_FALSE = 0x0100; CharacterRangeTable_attribute(ClassReader cr, int name_index, int length) throws IOException { super(name_index, length); int character_range_table_length = cr.readUnsignedShort(); character_range_table = new Entry[character_range_table_length]; for (int i = 0; i < character_range_table_length; i++) character_range_table[i] = new Entry(cr); } public CharacterRangeTable_attribute(ConstantPool constant_pool, Entry[] character_range_table) throws ConstantPoolException { this(constant_pool.getUTF8Index(Attribute.CharacterRangeTable), character_range_table); } public CharacterRangeTable_attribute(int name_index, Entry[] character_range_table) { super(name_index, 2 + character_range_table.length * Entry.length()); this.character_range_table = character_range_table; } public R accept(Visitor visitor, D data) { return visitor.visitCharacterRangeTable(this, data); } public final Entry[] character_range_table; public static class Entry { Entry(ClassReader cr) throws IOException { start_pc = cr.readUnsignedShort(); end_pc = cr.readUnsignedShort(); character_range_start = cr.readInt(); character_range_end = cr.readInt(); flags = cr.readUnsignedShort(); } public static int length() { return 14; } public final int start_pc; public final int end_pc; public final int character_range_start; public final int character_range_end; public final int flags; }; } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/ClassFile.java0000644000000000000000000001476612214026367027443 0ustar 00000000000000/* * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.classfile; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.nio.file.Files; import java.nio.file.Path; import static com.sun.tools.classfile.AccessFlags.*; /** * See JVMS, section 4.2. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. */ public class ClassFile { public static ClassFile read(File file) throws IOException, ConstantPoolException { return read(file.toPath(), new Attribute.Factory()); } public static ClassFile read(Path input) throws IOException, ConstantPoolException { return read(input, new Attribute.Factory()); } public static ClassFile read(Path input, Attribute.Factory attributeFactory) throws IOException, ConstantPoolException { try (InputStream in = Files.newInputStream(input)) { return new ClassFile(in, attributeFactory); } } public static ClassFile read(File file, Attribute.Factory attributeFactory) throws IOException, ConstantPoolException { return read(file.toPath(), attributeFactory); } public static ClassFile read(InputStream in) throws IOException, ConstantPoolException { return new ClassFile(in, new Attribute.Factory()); } public static ClassFile read(InputStream in, Attribute.Factory attributeFactory) throws IOException, ConstantPoolException { return new ClassFile(in, attributeFactory); } ClassFile(InputStream in, Attribute.Factory attributeFactory) throws IOException, ConstantPoolException { ClassReader cr = new ClassReader(this, in, attributeFactory); magic = cr.readInt(); minor_version = cr.readUnsignedShort(); major_version = cr.readUnsignedShort(); constant_pool = new ConstantPool(cr); access_flags = new AccessFlags(cr); this_class = cr.readUnsignedShort(); super_class = cr.readUnsignedShort(); int interfaces_count = cr.readUnsignedShort(); interfaces = new int[interfaces_count]; for (int i = 0; i < interfaces_count; i++) interfaces[i] = cr.readUnsignedShort(); int fields_count = cr.readUnsignedShort(); fields = new Field[fields_count]; for (int i = 0; i < fields_count; i++) fields[i] = new Field(cr); int methods_count = cr.readUnsignedShort(); methods = new Method[methods_count]; for (int i = 0; i < methods_count; i++) methods[i] = new Method(cr); attributes = new Attributes(cr); } public ClassFile(int magic, int minor_version, int major_version, ConstantPool constant_pool, AccessFlags access_flags, int this_class, int super_class, int[] interfaces, Field[] fields, Method[] methods, Attributes attributes) { this.magic = magic; this.minor_version = minor_version; this.major_version = major_version; this.constant_pool = constant_pool; this.access_flags = access_flags; this.this_class = this_class; this.super_class = super_class; this.interfaces = interfaces; this.fields = fields; this.methods = methods; this.attributes = attributes; } public String getName() throws ConstantPoolException { return constant_pool.getClassInfo(this_class).getName(); } public String getSuperclassName() throws ConstantPoolException { return constant_pool.getClassInfo(super_class).getName(); } public String getInterfaceName(int i) throws ConstantPoolException { return constant_pool.getClassInfo(interfaces[i]).getName(); } public Attribute getAttribute(String name) { return attributes.get(name); } public boolean isClass() { return !isInterface(); } public boolean isInterface() { return access_flags.is(ACC_INTERFACE); } public int byteLength() { return 4 + // magic 2 + // minor 2 + // major constant_pool.byteLength() + 2 + // access flags 2 + // this_class 2 + // super_class byteLength(interfaces) + byteLength(fields) + byteLength(methods) + attributes.byteLength(); } private int byteLength(int[] indices) { return 2 + 2 * indices.length; } private int byteLength(Field[] fields) { int length = 2; for (Field f: fields) length += f.byteLength(); return length; } private int byteLength(Method[] methods) { int length = 2; for (Method m: methods) length += m.byteLength(); return length; } public final int magic; public final int minor_version; public final int major_version; public final ConstantPool constant_pool; public final AccessFlags access_flags; public final int this_class; public final int super_class; public final int[] interfaces; public final Field[] fields; public final Method[] methods; public final Attributes attributes; } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/ClassReader.java0000644000000000000000000000661312214026367027756 0ustar 00000000000000/* * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.classfile; import java.io.BufferedInputStream; import java.io.ByteArrayInputStream; import java.io.DataInputStream; import java.io.IOException; import java.io.InputStream; /** *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. */ public class ClassReader { ClassReader(ClassFile classFile, InputStream in, Attribute.Factory attributeFactory) throws IOException { // null checks classFile.getClass(); attributeFactory.getClass(); this.classFile = classFile; this.in = new DataInputStream(new BufferedInputStream(in)); this.attributeFactory = attributeFactory; } ClassFile getClassFile() { return classFile; } ConstantPool getConstantPool() { return classFile.constant_pool; } public Attribute readAttribute() throws IOException { int name_index = readUnsignedShort(); int length = readInt(); byte[] data = new byte[length]; readFully(data); DataInputStream prev = in; in = new DataInputStream(new ByteArrayInputStream(data)); try { return attributeFactory.createAttribute(this, name_index, data); } finally { in = prev; } } public void readFully(byte[] b) throws IOException { in.readFully(b); } public int readUnsignedByte() throws IOException { return in.readUnsignedByte(); } public int readUnsignedShort() throws IOException { return in.readUnsignedShort(); } public int readInt() throws IOException { return in.readInt(); } public long readLong() throws IOException { return in.readLong(); } public float readFloat() throws IOException { return in.readFloat(); } public double readDouble() throws IOException { return in.readDouble(); } public String readUTF() throws IOException { return in.readUTF(); } private DataInputStream in; private ClassFile classFile; private Attribute.Factory attributeFactory; } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/ClassTranslator.java0000644000000000000000000004046012214026367030703 0ustar 00000000000000/* * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.classfile; import java.util.Map; import com.sun.tools.classfile.ConstantPool.CONSTANT_Class_info; import com.sun.tools.classfile.ConstantPool.CONSTANT_Double_info; import com.sun.tools.classfile.ConstantPool.CONSTANT_Fieldref_info; import com.sun.tools.classfile.ConstantPool.CONSTANT_Float_info; import com.sun.tools.classfile.ConstantPool.CONSTANT_Integer_info; import com.sun.tools.classfile.ConstantPool.CONSTANT_InterfaceMethodref_info; import com.sun.tools.classfile.ConstantPool.CONSTANT_InvokeDynamic_info; import com.sun.tools.classfile.ConstantPool.CONSTANT_Long_info; import com.sun.tools.classfile.ConstantPool.CONSTANT_MethodHandle_info; import com.sun.tools.classfile.ConstantPool.CONSTANT_MethodType_info; import com.sun.tools.classfile.ConstantPool.CONSTANT_Methodref_info; import com.sun.tools.classfile.ConstantPool.CONSTANT_NameAndType_info; import com.sun.tools.classfile.ConstantPool.CONSTANT_String_info; import com.sun.tools.classfile.ConstantPool.CONSTANT_Utf8_info; import com.sun.tools.classfile.ConstantPool.CPInfo; /** * Rewrites a class file using a map of translations. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. */ public class ClassTranslator implements ConstantPool.Visitor> { /** * Create a new ClassFile from {@code cf}, such that for all entries * {@code k -\> v} in {@code translations}, * each occurrence of {@code k} in {@code cf} will be replaced by {@code v}. * in * @param cf the class file to be processed * @param translations the set of translations to be applied * @return a copy of {@code} with the values in {@code translations} substituted */ public ClassFile translate(ClassFile cf, Map translations) { ClassFile cf2 = (ClassFile) translations.get(cf); if (cf2 == null) { ConstantPool constant_pool2 = translate(cf.constant_pool, translations); Field[] fields2 = translate(cf.fields, cf.constant_pool, translations); Method[] methods2 = translateMethods(cf.methods, cf.constant_pool, translations); Attributes attributes2 = translateAttributes(cf.attributes, cf.constant_pool, translations); if (constant_pool2 == cf.constant_pool && fields2 == cf.fields && methods2 == cf.methods && attributes2 == cf.attributes) cf2 = cf; else cf2 = new ClassFile( cf.magic, cf.minor_version, cf.major_version, constant_pool2, cf.access_flags, cf.this_class, cf.super_class, cf.interfaces, fields2, methods2, attributes2); translations.put(cf, cf2); } return cf2; } ConstantPool translate(ConstantPool cp, Map translations) { ConstantPool cp2 = (ConstantPool) translations.get(cp); if (cp2 == null) { ConstantPool.CPInfo[] pool2 = new ConstantPool.CPInfo[cp.size()]; boolean eq = true; for (int i = 0; i < cp.size(); ) { ConstantPool.CPInfo cpInfo; try { cpInfo = cp.get(i); } catch (ConstantPool.InvalidIndex e) { throw new IllegalStateException(e); } ConstantPool.CPInfo cpInfo2 = translate(cpInfo, translations); eq &= (cpInfo == cpInfo2); pool2[i] = cpInfo2; if (cpInfo.getTag() != cpInfo2.getTag()) throw new IllegalStateException(); i += cpInfo.size(); } if (eq) cp2 = cp; else cp2 = new ConstantPool(pool2); translations.put(cp, cp2); } return cp2; } ConstantPool.CPInfo translate(ConstantPool.CPInfo cpInfo, Map translations) { ConstantPool.CPInfo cpInfo2 = (ConstantPool.CPInfo) translations.get(cpInfo); if (cpInfo2 == null) { cpInfo2 = cpInfo.accept(this, translations); translations.put(cpInfo, cpInfo2); } return cpInfo2; } Field[] translate(Field[] fields, ConstantPool constant_pool, Map translations) { Field[] fields2 = (Field[]) translations.get(fields); if (fields2 == null) { fields2 = new Field[fields.length]; for (int i = 0; i < fields.length; i++) fields2[i] = translate(fields[i], constant_pool, translations); if (equal(fields, fields2)) fields2 = fields; translations.put(fields, fields2); } return fields2; } Field translate(Field field, ConstantPool constant_pool, Map translations) { Field field2 = (Field) translations.get(field); if (field2 == null) { Attributes attributes2 = translateAttributes(field.attributes, constant_pool, translations); if (attributes2 == field.attributes) field2 = field; else field2 = new Field( field.access_flags, field.name_index, field.descriptor, attributes2); translations.put(field, field2); } return field2; } Method[] translateMethods(Method[] methods, ConstantPool constant_pool, Map translations) { Method[] methods2 = (Method[]) translations.get(methods); if (methods2 == null) { methods2 = new Method[methods.length]; for (int i = 0; i < methods.length; i++) methods2[i] = translate(methods[i], constant_pool, translations); if (equal(methods, methods2)) methods2 = methods; translations.put(methods, methods2); } return methods2; } Method translate(Method method, ConstantPool constant_pool, Map translations) { Method method2 = (Method) translations.get(method); if (method2 == null) { Attributes attributes2 = translateAttributes(method.attributes, constant_pool, translations); if (attributes2 == method.attributes) method2 = method; else method2 = new Method( method.access_flags, method.name_index, method.descriptor, attributes2); translations.put(method, method2); } return method2; } Attributes translateAttributes(Attributes attributes, ConstantPool constant_pool, Map translations) { Attributes attributes2 = (Attributes) translations.get(attributes); if (attributes2 == null) { Attribute[] attrArray2 = new Attribute[attributes.size()]; ConstantPool constant_pool2 = translate(constant_pool, translations); boolean attrsEqual = true; for (int i = 0; i < attributes.size(); i++) { Attribute attr = attributes.get(i); Attribute attr2 = translate(attr, translations); if (attr2 != attr) attrsEqual = false; attrArray2[i] = attr2; } if ((constant_pool2 == constant_pool) && attrsEqual) attributes2 = attributes; else attributes2 = new Attributes(constant_pool2, attrArray2); translations.put(attributes, attributes2); } return attributes2; } Attribute translate(Attribute attribute, Map translations) { Attribute attribute2 = (Attribute) translations.get(attribute); if (attribute2 == null) { attribute2 = attribute; // don't support translation within attributes yet // (what about Code attribute) translations.put(attribute, attribute2); } return attribute2; } private static boolean equal(T[] a1, T[] a2) { if (a1 == null || a2 == null) return (a1 == a2); if (a1.length != a2.length) return false; for (int i = 0; i < a1.length; i++) { if (a1[i] != a2[i]) return false; } return true; } public CPInfo visitClass(CONSTANT_Class_info info, Map translations) { CONSTANT_Class_info info2 = (CONSTANT_Class_info) translations.get(info); if (info2 == null) { ConstantPool cp2 = translate(info.cp, translations); if (cp2 == info.cp) info2 = info; else info2 = new CONSTANT_Class_info(cp2, info.name_index); translations.put(info, info2); } return info; } public CPInfo visitDouble(CONSTANT_Double_info info, Map translations) { CONSTANT_Double_info info2 = (CONSTANT_Double_info) translations.get(info); if (info2 == null) { info2 = info; translations.put(info, info2); } return info; } public CPInfo visitFieldref(CONSTANT_Fieldref_info info, Map translations) { CONSTANT_Fieldref_info info2 = (CONSTANT_Fieldref_info) translations.get(info); if (info2 == null) { ConstantPool cp2 = translate(info.cp, translations); if (cp2 == info.cp) info2 = info; else info2 = new CONSTANT_Fieldref_info(cp2, info.class_index, info.name_and_type_index); translations.put(info, info2); } return info; } public CPInfo visitFloat(CONSTANT_Float_info info, Map translations) { CONSTANT_Float_info info2 = (CONSTANT_Float_info) translations.get(info); if (info2 == null) { info2 = info; translations.put(info, info2); } return info; } public CPInfo visitInteger(CONSTANT_Integer_info info, Map translations) { CONSTANT_Integer_info info2 = (CONSTANT_Integer_info) translations.get(info); if (info2 == null) { info2 = info; translations.put(info, info2); } return info; } public CPInfo visitInterfaceMethodref(CONSTANT_InterfaceMethodref_info info, Map translations) { CONSTANT_InterfaceMethodref_info info2 = (CONSTANT_InterfaceMethodref_info) translations.get(info); if (info2 == null) { ConstantPool cp2 = translate(info.cp, translations); if (cp2 == info.cp) info2 = info; else info2 = new CONSTANT_InterfaceMethodref_info(cp2, info.class_index, info.name_and_type_index); translations.put(info, info2); } return info; } public CPInfo visitInvokeDynamic(CONSTANT_InvokeDynamic_info info, Map translations) { CONSTANT_InvokeDynamic_info info2 = (CONSTANT_InvokeDynamic_info) translations.get(info); if (info2 == null) { ConstantPool cp2 = translate(info.cp, translations); if (cp2 == info.cp) { info2 = info; } else { info2 = new CONSTANT_InvokeDynamic_info(cp2, info.bootstrap_method_attr_index, info.name_and_type_index); } translations.put(info, info2); } return info; } public CPInfo visitLong(CONSTANT_Long_info info, Map translations) { CONSTANT_Long_info info2 = (CONSTANT_Long_info) translations.get(info); if (info2 == null) { info2 = info; translations.put(info, info2); } return info; } public CPInfo visitNameAndType(CONSTANT_NameAndType_info info, Map translations) { CONSTANT_NameAndType_info info2 = (CONSTANT_NameAndType_info) translations.get(info); if (info2 == null) { ConstantPool cp2 = translate(info.cp, translations); if (cp2 == info.cp) info2 = info; else info2 = new CONSTANT_NameAndType_info(cp2, info.name_index, info.type_index); translations.put(info, info2); } return info; } public CPInfo visitMethodref(CONSTANT_Methodref_info info, Map translations) { CONSTANT_Methodref_info info2 = (CONSTANT_Methodref_info) translations.get(info); if (info2 == null) { ConstantPool cp2 = translate(info.cp, translations); if (cp2 == info.cp) info2 = info; else info2 = new CONSTANT_Methodref_info(cp2, info.class_index, info.name_and_type_index); translations.put(info, info2); } return info; } public CPInfo visitMethodHandle(CONSTANT_MethodHandle_info info, Map translations) { CONSTANT_MethodHandle_info info2 = (CONSTANT_MethodHandle_info) translations.get(info); if (info2 == null) { ConstantPool cp2 = translate(info.cp, translations); if (cp2 == info.cp) { info2 = info; } else { info2 = new CONSTANT_MethodHandle_info(cp2, info.reference_kind, info.reference_index); } translations.put(info, info2); } return info; } public CPInfo visitMethodType(CONSTANT_MethodType_info info, Map translations) { CONSTANT_MethodType_info info2 = (CONSTANT_MethodType_info) translations.get(info); if (info2 == null) { ConstantPool cp2 = translate(info.cp, translations); if (cp2 == info.cp) { info2 = info; } else { info2 = new CONSTANT_MethodType_info(cp2, info.descriptor_index); } translations.put(info, info2); } return info; } public CPInfo visitString(CONSTANT_String_info info, Map translations) { CONSTANT_String_info info2 = (CONSTANT_String_info) translations.get(info); if (info2 == null) { ConstantPool cp2 = translate(info.cp, translations); if (cp2 == info.cp) info2 = info; else info2 = new CONSTANT_String_info(cp2, info.string_index); translations.put(info, info2); } return info; } public CPInfo visitUtf8(CONSTANT_Utf8_info info, Map translations) { CONSTANT_Utf8_info info2 = (CONSTANT_Utf8_info) translations.get(info); if (info2 == null) { info2 = info; translations.put(info, info2); } return info; } } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/ClassWriter.java0000644000000000000000000007153412214026367030034 0ustar 00000000000000 /* * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.classfile; import java.io.ByteArrayOutputStream; import java.io.DataOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; import static com.sun.tools.classfile.Annotation.*; import static com.sun.tools.classfile.ConstantPool.*; import static com.sun.tools.classfile.StackMapTable_attribute.*; import static com.sun.tools.classfile.StackMapTable_attribute.verification_type_info.*; /** * Write a ClassFile data structure to a file or stream. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. */ public class ClassWriter { public ClassWriter() { attributeWriter = new AttributeWriter(); constantPoolWriter = new ConstantPoolWriter(); out = new ClassOutputStream(); } /** * Write a ClassFile data structure to a file. */ public void write(ClassFile classFile, File f) throws IOException { FileOutputStream f_out = new FileOutputStream(f); try { write(classFile, f_out); } finally { f_out.close(); } } /** * Write a ClassFile data structure to a stream. */ public void write(ClassFile classFile, OutputStream s) throws IOException { this.classFile = classFile; out.reset(); write(); out.writeTo(s); } protected void write() throws IOException { writeHeader(); writeConstantPool(); writeAccessFlags(classFile.access_flags); writeClassInfo(); writeFields(); writeMethods(); writeAttributes(classFile.attributes); } protected void writeHeader() { out.writeInt(classFile.magic); out.writeShort(classFile.minor_version); out.writeShort(classFile.major_version); } protected void writeAccessFlags(AccessFlags flags) { out.writeShort(flags.flags); } protected void writeAttributes(Attributes attributes) { int size = attributes.size(); out.writeShort(size); for (Attribute attr: attributes) attributeWriter.write(attr, out); } protected void writeClassInfo() { out.writeShort(classFile.this_class); out.writeShort(classFile.super_class); int[] interfaces = classFile.interfaces; out.writeShort(interfaces.length); for (int i: interfaces) out.writeShort(i); } protected void writeDescriptor(Descriptor d) { out.writeShort(d.index); } protected void writeConstantPool() { ConstantPool pool = classFile.constant_pool; int size = pool.size(); out.writeShort(size); for (CPInfo cpInfo: pool.entries()) constantPoolWriter.write(cpInfo, out); } protected void writeFields() throws IOException { Field[] fields = classFile.fields; out.writeShort(fields.length); for (Field f: fields) writeField(f); } protected void writeField(Field f) throws IOException { writeAccessFlags(f.access_flags); out.writeShort(f.name_index); writeDescriptor(f.descriptor); writeAttributes(f.attributes); } protected void writeMethods() throws IOException { Method[] methods = classFile.methods; out.writeShort(methods.length); for (Method m: methods) { writeMethod(m); } } protected void writeMethod(Method m) throws IOException { writeAccessFlags(m.access_flags); out.writeShort(m.name_index); writeDescriptor(m.descriptor); writeAttributes(m.attributes); } protected ClassFile classFile; protected ClassOutputStream out; protected AttributeWriter attributeWriter; protected ConstantPoolWriter constantPoolWriter; /** * Subtype of ByteArrayOutputStream with the convenience methods of * a DataOutputStream. Since ByteArrayOutputStream does not throw * IOException, there are no exceptions from the additional * convenience methods either, */ protected static class ClassOutputStream extends ByteArrayOutputStream { public ClassOutputStream() { d = new DataOutputStream(this); } public void writeByte(int value) { try { d.writeByte(value); } catch (IOException ignore) { } } public void writeShort(int value) { try { d.writeShort(value); } catch (IOException ignore) { } } public void writeInt(int value) { try { d.writeInt(value); } catch (IOException ignore) { } } public void writeLong(long value) { try { d.writeLong(value); } catch (IOException ignore) { } } public void writeFloat(float value) { try { d.writeFloat(value); } catch (IOException ignore) { } } public void writeDouble(double value) { try { d.writeDouble(value); } catch (IOException ignore) { } } public void writeUTF(String value) { try { d.writeUTF(value); } catch (IOException ignore) { } } public void writeTo(ClassOutputStream s) { try { super.writeTo(s); } catch (IOException ignore) { } } private DataOutputStream d; } /** * Writer for the entries in the constant pool. */ protected static class ConstantPoolWriter implements ConstantPool.Visitor { protected int write(CPInfo info, ClassOutputStream out) { out.writeByte(info.getTag()); return info.accept(this, out); } public Integer visitClass(CONSTANT_Class_info info, ClassOutputStream out) { out.writeShort(info.name_index); return 1; } public Integer visitDouble(CONSTANT_Double_info info, ClassOutputStream out) { out.writeDouble(info.value); return 2; } public Integer visitFieldref(CONSTANT_Fieldref_info info, ClassOutputStream out) { writeRef(info, out); return 1; } public Integer visitFloat(CONSTANT_Float_info info, ClassOutputStream out) { out.writeFloat(info.value); return 1; } public Integer visitInteger(CONSTANT_Integer_info info, ClassOutputStream out) { out.writeInt(info.value); return 1; } public Integer visitInterfaceMethodref(CONSTANT_InterfaceMethodref_info info, ClassOutputStream out) { writeRef(info, out); return 1; } public Integer visitInvokeDynamic(CONSTANT_InvokeDynamic_info info, ClassOutputStream out) { out.writeShort(info.bootstrap_method_attr_index); out.writeShort(info.name_and_type_index); return 1; } public Integer visitLong(CONSTANT_Long_info info, ClassOutputStream out) { out.writeLong(info.value); return 2; } public Integer visitNameAndType(CONSTANT_NameAndType_info info, ClassOutputStream out) { out.writeShort(info.name_index); out.writeShort(info.type_index); return 1; } public Integer visitMethodHandle(CONSTANT_MethodHandle_info info, ClassOutputStream out) { out.writeByte(info.reference_kind.tag); out.writeShort(info.reference_index); return 1; } public Integer visitMethodType(CONSTANT_MethodType_info info, ClassOutputStream out) { out.writeShort(info.descriptor_index); return 1; } public Integer visitMethodref(CONSTANT_Methodref_info info, ClassOutputStream out) { return writeRef(info, out); } public Integer visitString(CONSTANT_String_info info, ClassOutputStream out) { out.writeShort(info.string_index); return 1; } public Integer visitUtf8(CONSTANT_Utf8_info info, ClassOutputStream out) { out.writeUTF(info.value); return 1; } protected Integer writeRef(CPRefInfo info, ClassOutputStream out) { out.writeShort(info.class_index); out.writeShort(info.name_and_type_index); return 1; } } /** * Writer for the different types of attribute. */ protected static class AttributeWriter implements Attribute.Visitor { public void write(Attributes attributes, ClassOutputStream out) { int size = attributes.size(); out.writeShort(size); for (Attribute a: attributes) write(a, out); } // Note: due to the use of shared resources, this method is not reentrant. public void write(Attribute attr, ClassOutputStream out) { out.writeShort(attr.attribute_name_index); sharedOut.reset(); attr.accept(this, sharedOut); out.writeInt(sharedOut.size()); sharedOut.writeTo(out); } protected ClassOutputStream sharedOut = new ClassOutputStream(); protected AnnotationWriter annotationWriter = new AnnotationWriter(); public Void visitDefault(DefaultAttribute attr, ClassOutputStream out) { out.write(attr.info, 0, attr.info.length); return null; } public Void visitAnnotationDefault(AnnotationDefault_attribute attr, ClassOutputStream out) { annotationWriter.write(attr.default_value, out); return null; } public Void visitBootstrapMethods(BootstrapMethods_attribute attr, ClassOutputStream out) { out.writeShort(attr.bootstrap_method_specifiers.length); for (BootstrapMethods_attribute.BootstrapMethodSpecifier bsm : attr.bootstrap_method_specifiers) { out.writeShort(bsm.bootstrap_method_ref); int bsm_args_count = bsm.bootstrap_arguments.length; out.writeShort(bsm_args_count); for (int i : bsm.bootstrap_arguments) { out.writeShort(i); } } return null; } public Void visitCharacterRangeTable(CharacterRangeTable_attribute attr, ClassOutputStream out) { out.writeShort(attr.character_range_table.length); for (CharacterRangeTable_attribute.Entry e: attr.character_range_table) writeCharacterRangeTableEntry(e, out); return null; } protected void writeCharacterRangeTableEntry(CharacterRangeTable_attribute.Entry entry, ClassOutputStream out) { out.writeShort(entry.start_pc); out.writeShort(entry.end_pc); out.writeInt(entry.character_range_start); out.writeInt(entry.character_range_end); out.writeShort(entry.flags); } public Void visitCode(Code_attribute attr, ClassOutputStream out) { out.writeShort(attr.max_stack); out.writeShort(attr.max_locals); out.writeInt(attr.code.length); out.write(attr.code, 0, attr.code.length); out.writeShort(attr.exception_table.length); for (Code_attribute.Exception_data e: attr.exception_table) writeExceptionTableEntry(e, out); new AttributeWriter().write(attr.attributes, out); return null; } protected void writeExceptionTableEntry(Code_attribute.Exception_data exception_data, ClassOutputStream out) { out.writeShort(exception_data.start_pc); out.writeShort(exception_data.end_pc); out.writeShort(exception_data.handler_pc); out.writeShort(exception_data.catch_type); } public Void visitCompilationID(CompilationID_attribute attr, ClassOutputStream out) { out.writeShort(attr.compilationID_index); return null; } public Void visitConstantValue(ConstantValue_attribute attr, ClassOutputStream out) { out.writeShort(attr.constantvalue_index); return null; } public Void visitDeprecated(Deprecated_attribute attr, ClassOutputStream out) { return null; } public Void visitEnclosingMethod(EnclosingMethod_attribute attr, ClassOutputStream out) { out.writeShort(attr.class_index); out.writeShort(attr.method_index); return null; } public Void visitExceptions(Exceptions_attribute attr, ClassOutputStream out) { out.writeShort(attr.exception_index_table.length); for (int i: attr.exception_index_table) out.writeShort(i); return null; } public Void visitInnerClasses(InnerClasses_attribute attr, ClassOutputStream out) { out.writeShort(attr.classes.length); for (InnerClasses_attribute.Info info: attr.classes) writeInnerClassesInfo(info, out); return null; } protected void writeInnerClassesInfo(InnerClasses_attribute.Info info, ClassOutputStream out) { out.writeShort(info.inner_class_info_index); out.writeShort(info.outer_class_info_index); out.writeShort(info.inner_name_index); writeAccessFlags(info.inner_class_access_flags, out); } public Void visitLineNumberTable(LineNumberTable_attribute attr, ClassOutputStream out) { out.writeShort(attr.line_number_table.length); for (LineNumberTable_attribute.Entry e: attr.line_number_table) writeLineNumberTableEntry(e, out); return null; } protected void writeLineNumberTableEntry(LineNumberTable_attribute.Entry entry, ClassOutputStream out) { out.writeShort(entry.start_pc); out.writeShort(entry.line_number); } public Void visitLocalVariableTable(LocalVariableTable_attribute attr, ClassOutputStream out) { out.writeShort(attr.local_variable_table.length); for (LocalVariableTable_attribute.Entry e: attr.local_variable_table) writeLocalVariableTableEntry(e, out); return null; } protected void writeLocalVariableTableEntry(LocalVariableTable_attribute.Entry entry, ClassOutputStream out) { out.writeShort(entry.start_pc); out.writeShort(entry.length); out.writeShort(entry.name_index); out.writeShort(entry.descriptor_index); out.writeShort(entry.index); } public Void visitLocalVariableTypeTable(LocalVariableTypeTable_attribute attr, ClassOutputStream out) { out.writeShort(attr.local_variable_table.length); for (LocalVariableTypeTable_attribute.Entry e: attr.local_variable_table) writeLocalVariableTypeTableEntry(e, out); return null; } protected void writeLocalVariableTypeTableEntry(LocalVariableTypeTable_attribute.Entry entry, ClassOutputStream out) { out.writeShort(entry.start_pc); out.writeShort(entry.length); out.writeShort(entry.name_index); out.writeShort(entry.signature_index); out.writeShort(entry.index); } public Void visitMethodParameters(MethodParameters_attribute attr, ClassOutputStream out) { out.writeByte(attr.method_parameter_table.length); for (MethodParameters_attribute.Entry e : attr.method_parameter_table) { out.writeShort(e.name_index); out.writeShort(e.flags); } return null; } public Void visitRuntimeVisibleAnnotations(RuntimeVisibleAnnotations_attribute attr, ClassOutputStream out) { annotationWriter.write(attr.annotations, out); return null; } public Void visitRuntimeInvisibleAnnotations(RuntimeInvisibleAnnotations_attribute attr, ClassOutputStream out) { annotationWriter.write(attr.annotations, out); return null; } public Void visitRuntimeVisibleTypeAnnotations(RuntimeVisibleTypeAnnotations_attribute attr, ClassOutputStream out) { annotationWriter.write(attr.annotations, out); return null; } public Void visitRuntimeInvisibleTypeAnnotations(RuntimeInvisibleTypeAnnotations_attribute attr, ClassOutputStream out) { annotationWriter.write(attr.annotations, out); return null; } public Void visitRuntimeVisibleParameterAnnotations(RuntimeVisibleParameterAnnotations_attribute attr, ClassOutputStream out) { out.writeByte(attr.parameter_annotations.length); for (Annotation[] annos: attr.parameter_annotations) annotationWriter.write(annos, out); return null; } public Void visitRuntimeInvisibleParameterAnnotations(RuntimeInvisibleParameterAnnotations_attribute attr, ClassOutputStream out) { out.writeByte(attr.parameter_annotations.length); for (Annotation[] annos: attr.parameter_annotations) annotationWriter.write(annos, out); return null; } public Void visitSignature(Signature_attribute attr, ClassOutputStream out) { out.writeShort(attr.signature_index); return null; } public Void visitSourceDebugExtension(SourceDebugExtension_attribute attr, ClassOutputStream out) { out.write(attr.debug_extension, 0, attr.debug_extension.length); return null; } public Void visitSourceFile(SourceFile_attribute attr, ClassOutputStream out) { out.writeShort(attr.sourcefile_index); return null; } public Void visitSourceID(SourceID_attribute attr, ClassOutputStream out) { out.writeShort(attr.sourceID_index); return null; } public Void visitStackMap(StackMap_attribute attr, ClassOutputStream out) { if (stackMapWriter == null) stackMapWriter = new StackMapTableWriter(); out.writeShort(attr.entries.length); for (stack_map_frame f: attr.entries) stackMapWriter.write(f, out); return null; } public Void visitStackMapTable(StackMapTable_attribute attr, ClassOutputStream out) { if (stackMapWriter == null) stackMapWriter = new StackMapTableWriter(); out.writeShort(attr.entries.length); for (stack_map_frame f: attr.entries) stackMapWriter.write(f, out); return null; } public Void visitSynthetic(Synthetic_attribute attr, ClassOutputStream out) { return null; } protected void writeAccessFlags(AccessFlags flags, ClassOutputStream p) { sharedOut.writeShort(flags.flags); } protected StackMapTableWriter stackMapWriter; } /** * Writer for the frames of StackMap and StackMapTable attributes. */ protected static class StackMapTableWriter implements stack_map_frame.Visitor { public void write(stack_map_frame frame, ClassOutputStream out) { out.write(frame.frame_type); frame.accept(this, out); } public Void visit_same_frame(same_frame frame, ClassOutputStream p) { return null; } public Void visit_same_locals_1_stack_item_frame(same_locals_1_stack_item_frame frame, ClassOutputStream out) { writeVerificationTypeInfo(frame.stack[0], out); return null; } public Void visit_same_locals_1_stack_item_frame_extended(same_locals_1_stack_item_frame_extended frame, ClassOutputStream out) { out.writeShort(frame.offset_delta); writeVerificationTypeInfo(frame.stack[0], out); return null; } public Void visit_chop_frame(chop_frame frame, ClassOutputStream out) { out.writeShort(frame.offset_delta); return null; } public Void visit_same_frame_extended(same_frame_extended frame, ClassOutputStream out) { out.writeShort(frame.offset_delta); return null; } public Void visit_append_frame(append_frame frame, ClassOutputStream out) { out.writeShort(frame.offset_delta); for (verification_type_info l: frame.locals) writeVerificationTypeInfo(l, out); return null; } public Void visit_full_frame(full_frame frame, ClassOutputStream out) { out.writeShort(frame.offset_delta); out.writeShort(frame.locals.length); for (verification_type_info l: frame.locals) writeVerificationTypeInfo(l, out); out.writeShort(frame.stack.length); for (verification_type_info s: frame.stack) writeVerificationTypeInfo(s, out); return null; } protected void writeVerificationTypeInfo(verification_type_info info, ClassOutputStream out) { out.write(info.tag); switch (info.tag) { case ITEM_Top: case ITEM_Integer: case ITEM_Float: case ITEM_Long: case ITEM_Double: case ITEM_Null: case ITEM_UninitializedThis: break; case ITEM_Object: Object_variable_info o = (Object_variable_info) info; out.writeShort(o.cpool_index); break; case ITEM_Uninitialized: Uninitialized_variable_info u = (Uninitialized_variable_info) info; out.writeShort(u.offset); break; default: throw new Error(); } } } /** * Writer for annotations and the values they contain. */ protected static class AnnotationWriter implements Annotation.element_value.Visitor { public void write(Annotation[] annos, ClassOutputStream out) { out.writeShort(annos.length); for (Annotation anno: annos) write(anno, out); } public void write(TypeAnnotation[] annos, ClassOutputStream out) { out.writeShort(annos.length); for (TypeAnnotation anno: annos) write(anno, out); } public void write(Annotation anno, ClassOutputStream out) { out.writeShort(anno.type_index); out.writeShort(anno.element_value_pairs.length); for (element_value_pair p: anno.element_value_pairs) write(p, out); } public void write(TypeAnnotation anno, ClassOutputStream out) { write(anno.position, out); write(anno.annotation, out); } public void write(element_value_pair pair, ClassOutputStream out) { out.writeShort(pair.element_name_index); write(pair.value, out); } public void write(element_value ev, ClassOutputStream out) { out.writeByte(ev.tag); ev.accept(this, out); } public Void visitPrimitive(Primitive_element_value ev, ClassOutputStream out) { out.writeShort(ev.const_value_index); return null; } public Void visitEnum(Enum_element_value ev, ClassOutputStream out) { out.writeShort(ev.type_name_index); out.writeShort(ev.const_name_index); return null; } public Void visitClass(Class_element_value ev, ClassOutputStream out) { out.writeShort(ev.class_info_index); return null; } public Void visitAnnotation(Annotation_element_value ev, ClassOutputStream out) { write(ev.annotation_value, out); return null; } public Void visitArray(Array_element_value ev, ClassOutputStream out) { out.writeShort(ev.num_values); for (element_value v: ev.values) write(v, out); return null; } // TODO: Move this to TypeAnnotation to be closer with similar logic? private void write(TypeAnnotation.Position p, ClassOutputStream out) { out.writeByte(p.type.targetTypeValue()); switch (p.type) { // instanceof case INSTANCEOF: // new expression case NEW: // constructor/method reference receiver case CONSTRUCTOR_REFERENCE: case METHOD_REFERENCE: out.writeShort(p.offset); break; // local variable case LOCAL_VARIABLE: // resource variable case RESOURCE_VARIABLE: int table_length = p.lvarOffset.length; out.writeShort(table_length); for (int i = 0; i < table_length; ++i) { out.writeShort(1); // for table length out.writeShort(p.lvarOffset[i]); out.writeShort(p.lvarLength[i]); out.writeShort(p.lvarIndex[i]); } break; // exception parameter case EXCEPTION_PARAMETER: out.writeShort(p.exception_index); break; // method receiver case METHOD_RECEIVER: // Do nothing break; // type parameters case CLASS_TYPE_PARAMETER: case METHOD_TYPE_PARAMETER: out.writeByte(p.parameter_index); break; // type parameters bounds case CLASS_TYPE_PARAMETER_BOUND: case METHOD_TYPE_PARAMETER_BOUND: out.writeByte(p.parameter_index); out.writeByte(p.bound_index); break; // class extends or implements clause case CLASS_EXTENDS: out.writeShort(p.type_index); break; // throws case THROWS: out.writeShort(p.type_index); break; // method parameter case METHOD_FORMAL_PARAMETER: out.writeByte(p.parameter_index); break; // type cast case CAST: // method/constructor/reference type argument case CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT: case METHOD_INVOCATION_TYPE_ARGUMENT: case CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT: case METHOD_REFERENCE_TYPE_ARGUMENT: out.writeShort(p.offset); out.writeByte(p.type_index); break; // We don't need to worry about these case METHOD_RETURN: case FIELD: break; case UNKNOWN: throw new AssertionError("ClassWriter: UNKNOWN target type should never occur!"); default: throw new AssertionError("ClassWriter: Unknown target type for position: " + p); } { // Append location data for generics/arrays. // TODO: check for overrun? out.writeByte((byte)p.location.size()); for (int i : TypeAnnotation.Position.getBinaryFromTypePath(p.location)) out.writeByte((byte)i); } } } } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/Code_attribute.java0000644000000000000000000001306612214026367030523 0ustar 00000000000000/* * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.classfile; import java.io.IOException; import java.util.Iterator; import java.util.NoSuchElementException; /** * See JVMS, section 4.8.3. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. */ public class Code_attribute extends Attribute { public static class InvalidIndex extends AttributeException { private static final long serialVersionUID = -8904527774589382802L; InvalidIndex(int index) { this.index = index; } @Override public String getMessage() { // i18n return "invalid index " + index + " in Code attribute"; } public final int index; } Code_attribute(ClassReader cr, int name_index, int length) throws IOException, ConstantPoolException { super(name_index, length); max_stack = cr.readUnsignedShort(); max_locals = cr.readUnsignedShort(); code_length = cr.readInt(); code = new byte[code_length]; cr.readFully(code); exception_table_langth = cr.readUnsignedShort(); exception_table = new Exception_data[exception_table_langth]; for (int i = 0; i < exception_table_langth; i++) exception_table[i] = new Exception_data(cr); attributes = new Attributes(cr); } public int getByte(int offset) throws InvalidIndex { if (offset < 0 || offset >= code.length) throw new InvalidIndex(offset); return code[offset]; } public int getUnsignedByte(int offset) throws InvalidIndex { if (offset < 0 || offset >= code.length) throw new InvalidIndex(offset); return code[offset] & 0xff; } public int getShort(int offset) throws InvalidIndex { if (offset < 0 || offset + 1 >= code.length) throw new InvalidIndex(offset); return (code[offset] << 8) | (code[offset + 1] & 0xFF); } public int getUnsignedShort(int offset) throws InvalidIndex { if (offset < 0 || offset + 1 >= code.length) throw new InvalidIndex(offset); return ((code[offset] << 8) | (code[offset + 1] & 0xFF)) & 0xFFFF; } public int getInt(int offset) throws InvalidIndex { if (offset < 0 || offset + 3 >= code.length) throw new InvalidIndex(offset); return (getShort(offset) << 16) | (getShort(offset + 2) & 0xFFFF); } public R accept(Visitor visitor, D data) { return visitor.visitCode(this, data); } public Iterable getInstructions() { return new Iterable() { public Iterator iterator() { return new Iterator() { public boolean hasNext() { return (next != null); } public Instruction next() { if (next == null) throw new NoSuchElementException(); current = next; pc += current.length(); next = (pc < code.length ? new Instruction(code, pc) : null); return current; } public void remove() { throw new UnsupportedOperationException("Not supported."); } Instruction current = null; int pc = 0; Instruction next = new Instruction(code, pc); }; } }; } public final int max_stack; public final int max_locals; public final int code_length; public final byte[] code; public final int exception_table_langth; public final Exception_data[] exception_table; public final Attributes attributes; public static class Exception_data { Exception_data(ClassReader cr) throws IOException { start_pc = cr.readUnsignedShort(); end_pc = cr.readUnsignedShort(); handler_pc = cr.readUnsignedShort(); catch_type = cr.readUnsignedShort(); } public final int start_pc; public final int end_pc; public final int handler_pc; public final int catch_type; } } ././@LongLink0000000000000000000000000000014600000000000011216 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/CompilationID_attribute.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/CompilationID_attribute.jav0000644000000000000000000000465712214026367032211 0ustar 00000000000000/* * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.classfile; import java.io.IOException; /** *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. */ public class CompilationID_attribute extends Attribute { CompilationID_attribute(ClassReader cr, int name_index, int length) throws IOException { super(name_index, length); compilationID_index = cr.readUnsignedShort(); } public CompilationID_attribute(ConstantPool constant_pool, int compilationID_index) throws ConstantPoolException { this(constant_pool.getUTF8Index(Attribute.CompilationID), compilationID_index); } public CompilationID_attribute(int name_index, int compilationID_index) { super(name_index, 2); this.compilationID_index = compilationID_index; } String getCompilationID(ConstantPool constant_pool) throws ConstantPoolException { return constant_pool.getUTF8Value(compilationID_index); } public R accept(Visitor visitor, D data) { return visitor.visitCompilationID(this, data); } public final int compilationID_index; } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/ConstantPool.java0000644000000000000000000007043312214026367030212 0ustar 00000000000000/* * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.classfile; import java.io.DataOutputStream; import java.io.IOException; import java.io.OutputStream; import java.util.Iterator; /** * See JVMS, section 4.5. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. */ public class ConstantPool { public static class InvalidIndex extends ConstantPoolException { private static final long serialVersionUID = -4350294289300939730L; InvalidIndex(int index) { super(index); } @Override public String getMessage() { // i18n return "invalid index #" + index; } } public static class UnexpectedEntry extends ConstantPoolException { private static final long serialVersionUID = 6986335935377933211L; UnexpectedEntry(int index, int expected_tag, int found_tag) { super(index); this.expected_tag = expected_tag; this.found_tag = found_tag; } @Override public String getMessage() { // i18n? return "unexpected entry at #" + index + " -- expected tag " + expected_tag + ", found " + found_tag; } public final int expected_tag; public final int found_tag; } public static class InvalidEntry extends ConstantPoolException { private static final long serialVersionUID = 1000087545585204447L; InvalidEntry(int index, int tag) { super(index); this.tag = tag; } @Override public String getMessage() { // i18n? return "unexpected tag at #" + index + ": " + tag; } public final int tag; } public static class EntryNotFound extends ConstantPoolException { private static final long serialVersionUID = 2885537606468581850L; EntryNotFound(Object value) { super(-1); this.value = value; } @Override public String getMessage() { // i18n? return "value not found: " + value; } public final Object value; } public static final int CONSTANT_Utf8 = 1; public static final int CONSTANT_Integer = 3; public static final int CONSTANT_Float = 4; public static final int CONSTANT_Long = 5; public static final int CONSTANT_Double = 6; public static final int CONSTANT_Class = 7; public static final int CONSTANT_String = 8; public static final int CONSTANT_Fieldref = 9; public static final int CONSTANT_Methodref = 10; public static final int CONSTANT_InterfaceMethodref = 11; public static final int CONSTANT_NameAndType = 12; public static final int CONSTANT_MethodHandle = 15; public static final int CONSTANT_MethodType = 16; public static final int CONSTANT_InvokeDynamic = 18; public static enum RefKind { REF_getField(1, "getfield"), REF_getStatic(2, "getstatic"), REF_putField(3, "putfield"), REF_putStatic(4, "putstatic"), REF_invokeVirtual(5, "invokevirtual"), REF_invokeStatic(6, "invokestatic"), REF_invokeSpecial(7, "invokespecial"), REF_newInvokeSpecial(8, "newinvokespecial"), REF_invokeInterface(9, "invokeinterface"); public final int tag; public final String name; RefKind(int tag, String name) { this.tag = tag; this.name = name; } static RefKind getRefkind(int tag) { switch(tag) { case 1: return REF_getField; case 2: return REF_getStatic; case 3: return REF_putField; case 4: return REF_putStatic; case 5: return REF_invokeVirtual; case 6: return REF_invokeStatic; case 7: return REF_invokeSpecial; case 8: return REF_newInvokeSpecial; case 9: return REF_invokeInterface; default: return null; } } } ConstantPool(ClassReader cr) throws IOException, InvalidEntry { int count = cr.readUnsignedShort(); pool = new CPInfo[count]; for (int i = 1; i < count; i++) { int tag = cr.readUnsignedByte(); switch (tag) { case CONSTANT_Class: pool[i] = new CONSTANT_Class_info(this, cr); break; case CONSTANT_Double: pool[i] = new CONSTANT_Double_info(cr); i++; break; case CONSTANT_Fieldref: pool[i] = new CONSTANT_Fieldref_info(this, cr); break; case CONSTANT_Float: pool[i] = new CONSTANT_Float_info(cr); break; case CONSTANT_Integer: pool[i] = new CONSTANT_Integer_info(cr); break; case CONSTANT_InterfaceMethodref: pool[i] = new CONSTANT_InterfaceMethodref_info(this, cr); break; case CONSTANT_InvokeDynamic: pool[i] = new CONSTANT_InvokeDynamic_info(this, cr); break; case CONSTANT_Long: pool[i] = new CONSTANT_Long_info(cr); i++; break; case CONSTANT_MethodHandle: pool[i] = new CONSTANT_MethodHandle_info(this, cr); break; case CONSTANT_MethodType: pool[i] = new CONSTANT_MethodType_info(this, cr); break; case CONSTANT_Methodref: pool[i] = new CONSTANT_Methodref_info(this, cr); break; case CONSTANT_NameAndType: pool[i] = new CONSTANT_NameAndType_info(this, cr); break; case CONSTANT_String: pool[i] = new CONSTANT_String_info(this, cr); break; case CONSTANT_Utf8: pool[i] = new CONSTANT_Utf8_info(cr); break; default: throw new InvalidEntry(i, tag); } } } public ConstantPool(CPInfo[] pool) { this.pool = pool; } public int size() { return pool.length; } public int byteLength() { int length = 2; for (int i = 1; i < size(); ) { CPInfo cpInfo = pool[i]; length += cpInfo.byteLength(); i += cpInfo.size(); } return length; } public CPInfo get(int index) throws InvalidIndex { if (index <= 0 || index >= pool.length) throw new InvalidIndex(index); CPInfo info = pool[index]; if (info == null) { // this occurs for indices referencing the "second half" of an // 8 byte constant, such as CONSTANT_Double or CONSTANT_Long throw new InvalidIndex(index); } return pool[index]; } private CPInfo get(int index, int expected_type) throws InvalidIndex, UnexpectedEntry { CPInfo info = get(index); if (info.getTag() != expected_type) throw new UnexpectedEntry(index, expected_type, info.getTag()); return info; } public CONSTANT_Utf8_info getUTF8Info(int index) throws InvalidIndex, UnexpectedEntry { return ((CONSTANT_Utf8_info) get(index, CONSTANT_Utf8)); } public CONSTANT_Class_info getClassInfo(int index) throws InvalidIndex, UnexpectedEntry { return ((CONSTANT_Class_info) get(index, CONSTANT_Class)); } public CONSTANT_NameAndType_info getNameAndTypeInfo(int index) throws InvalidIndex, UnexpectedEntry { return ((CONSTANT_NameAndType_info) get(index, CONSTANT_NameAndType)); } public String getUTF8Value(int index) throws InvalidIndex, UnexpectedEntry { return getUTF8Info(index).value; } public int getUTF8Index(String value) throws EntryNotFound { for (int i = 1; i < pool.length; i++) { CPInfo info = pool[i]; if (info instanceof CONSTANT_Utf8_info && ((CONSTANT_Utf8_info) info).value.equals(value)) return i; } throw new EntryNotFound(value); } public Iterable entries() { return new Iterable() { public Iterator iterator() { return new Iterator() { public boolean hasNext() { return next < pool.length; } public CPInfo next() { current = pool[next]; switch (current.getTag()) { case CONSTANT_Double: case CONSTANT_Long: next += 2; break; default: next += 1; } return current; } public void remove() { throw new UnsupportedOperationException(); } private CPInfo current; private int next = 1; }; } }; } private CPInfo[] pool; public interface Visitor { R visitClass(CONSTANT_Class_info info, P p); R visitDouble(CONSTANT_Double_info info, P p); R visitFieldref(CONSTANT_Fieldref_info info, P p); R visitFloat(CONSTANT_Float_info info, P p); R visitInteger(CONSTANT_Integer_info info, P p); R visitInterfaceMethodref(CONSTANT_InterfaceMethodref_info info, P p); R visitInvokeDynamic(CONSTANT_InvokeDynamic_info info, P p); R visitLong(CONSTANT_Long_info info, P p); R visitNameAndType(CONSTANT_NameAndType_info info, P p); R visitMethodref(CONSTANT_Methodref_info info, P p); R visitMethodHandle(CONSTANT_MethodHandle_info info, P p); R visitMethodType(CONSTANT_MethodType_info info, P p); R visitString(CONSTANT_String_info info, P p); R visitUtf8(CONSTANT_Utf8_info info, P p); } public static abstract class CPInfo { CPInfo() { this.cp = null; } CPInfo(ConstantPool cp) { this.cp = cp; } public abstract int getTag(); /** The number of slots in the constant pool used by this entry. * 2 for CONSTANT_Double and CONSTANT_Long; 1 for everything else. */ public int size() { return 1; } public abstract int byteLength(); public abstract R accept(Visitor visitor, D data); protected final ConstantPool cp; } public static abstract class CPRefInfo extends CPInfo { protected CPRefInfo(ConstantPool cp, ClassReader cr, int tag) throws IOException { super(cp); this.tag = tag; class_index = cr.readUnsignedShort(); name_and_type_index = cr.readUnsignedShort(); } protected CPRefInfo(ConstantPool cp, int tag, int class_index, int name_and_type_index) { super(cp); this.tag = tag; this.class_index = class_index; this.name_and_type_index = name_and_type_index; } public int getTag() { return tag; } public int byteLength() { return 5; } public CONSTANT_Class_info getClassInfo() throws ConstantPoolException { return cp.getClassInfo(class_index); } public String getClassName() throws ConstantPoolException { return cp.getClassInfo(class_index).getName(); } public CONSTANT_NameAndType_info getNameAndTypeInfo() throws ConstantPoolException { return cp.getNameAndTypeInfo(name_and_type_index); } public final int tag; public final int class_index; public final int name_and_type_index; } public static class CONSTANT_Class_info extends CPInfo { CONSTANT_Class_info(ConstantPool cp, ClassReader cr) throws IOException { super(cp); name_index = cr.readUnsignedShort(); } public CONSTANT_Class_info(ConstantPool cp, int name_index) { super(cp); this.name_index = name_index; } public int getTag() { return CONSTANT_Class; } public int byteLength() { return 3; } /** * Get the raw value of the class referenced by this constant pool entry. * This will either be the name of the class, in internal form, or a * descriptor for an array class. * @return the raw value of the class */ public String getName() throws ConstantPoolException { return cp.getUTF8Value(name_index); } /** * If this constant pool entry identifies either a class or interface type, * or a possibly multi-dimensional array of a class of interface type, * return the name of the class or interface in internal form. Otherwise, * (i.e. if this is a possibly multi-dimensional array of a primitive type), * return null. * @return the base class or interface name */ public String getBaseName() throws ConstantPoolException { String name = getName(); if (name.startsWith("[")) { int index = name.indexOf("[L"); if (index == -1) return null; return name.substring(index + 2, name.length() - 1); } else return name; } public int getDimensionCount() throws ConstantPoolException { String name = getName(); int count = 0; while (name.charAt(count) == '[') count++; return count; } @Override public String toString() { return "CONSTANT_Class_info[name_index: " + name_index + "]"; } public R accept(Visitor visitor, D data) { return visitor.visitClass(this, data); } public final int name_index; } public static class CONSTANT_Double_info extends CPInfo { CONSTANT_Double_info(ClassReader cr) throws IOException { value = cr.readDouble(); } public CONSTANT_Double_info(double value) { this.value = value; } public int getTag() { return CONSTANT_Double; } public int byteLength() { return 9; } @Override public int size() { return 2; } @Override public String toString() { return "CONSTANT_Double_info[value: " + value + "]"; } public R accept(Visitor visitor, D data) { return visitor.visitDouble(this, data); } public final double value; } public static class CONSTANT_Fieldref_info extends CPRefInfo { CONSTANT_Fieldref_info(ConstantPool cp, ClassReader cr) throws IOException { super(cp, cr, CONSTANT_Fieldref); } public CONSTANT_Fieldref_info(ConstantPool cp, int class_index, int name_and_type_index) { super(cp, CONSTANT_Fieldref, class_index, name_and_type_index); } @Override public String toString() { return "CONSTANT_Fieldref_info[class_index: " + class_index + ", name_and_type_index: " + name_and_type_index + "]"; } public R accept(Visitor visitor, D data) { return visitor.visitFieldref(this, data); } } public static class CONSTANT_Float_info extends CPInfo { CONSTANT_Float_info(ClassReader cr) throws IOException { value = cr.readFloat(); } public CONSTANT_Float_info(float value) { this.value = value; } public int getTag() { return CONSTANT_Float; } public int byteLength() { return 5; } @Override public String toString() { return "CONSTANT_Float_info[value: " + value + "]"; } public R accept(Visitor visitor, D data) { return visitor.visitFloat(this, data); } public final float value; } public static class CONSTANT_Integer_info extends CPInfo { CONSTANT_Integer_info(ClassReader cr) throws IOException { value = cr.readInt(); } public CONSTANT_Integer_info(int value) { this.value = value; } public int getTag() { return CONSTANT_Integer; } public int byteLength() { return 5; } @Override public String toString() { return "CONSTANT_Integer_info[value: " + value + "]"; } public R accept(Visitor visitor, D data) { return visitor.visitInteger(this, data); } public final int value; } public static class CONSTANT_InterfaceMethodref_info extends CPRefInfo { CONSTANT_InterfaceMethodref_info(ConstantPool cp, ClassReader cr) throws IOException { super(cp, cr, CONSTANT_InterfaceMethodref); } public CONSTANT_InterfaceMethodref_info(ConstantPool cp, int class_index, int name_and_type_index) { super(cp, CONSTANT_InterfaceMethodref, class_index, name_and_type_index); } @Override public String toString() { return "CONSTANT_InterfaceMethodref_info[class_index: " + class_index + ", name_and_type_index: " + name_and_type_index + "]"; } public R accept(Visitor visitor, D data) { return visitor.visitInterfaceMethodref(this, data); } } public static class CONSTANT_InvokeDynamic_info extends CPInfo { CONSTANT_InvokeDynamic_info(ConstantPool cp, ClassReader cr) throws IOException { super(cp); bootstrap_method_attr_index = cr.readUnsignedShort(); name_and_type_index = cr.readUnsignedShort(); } public CONSTANT_InvokeDynamic_info(ConstantPool cp, int bootstrap_method_index, int name_and_type_index) { super(cp); this.bootstrap_method_attr_index = bootstrap_method_index; this.name_and_type_index = name_and_type_index; } public int getTag() { return CONSTANT_InvokeDynamic; } public int byteLength() { return 5; } @Override public String toString() { return "CONSTANT_InvokeDynamic_info[bootstrap_method_index: " + bootstrap_method_attr_index + ", name_and_type_index: " + name_and_type_index + "]"; } public R accept(Visitor visitor, D data) { return visitor.visitInvokeDynamic(this, data); } public CONSTANT_NameAndType_info getNameAndTypeInfo() throws ConstantPoolException { return cp.getNameAndTypeInfo(name_and_type_index); } public final int bootstrap_method_attr_index; public final int name_and_type_index; } public static class CONSTANT_Long_info extends CPInfo { CONSTANT_Long_info(ClassReader cr) throws IOException { value = cr.readLong(); } public CONSTANT_Long_info(long value) { this.value = value; } public int getTag() { return CONSTANT_Long; } @Override public int size() { return 2; } public int byteLength() { return 9; } @Override public String toString() { return "CONSTANT_Long_info[value: " + value + "]"; } public R accept(Visitor visitor, D data) { return visitor.visitLong(this, data); } public final long value; } public static class CONSTANT_MethodHandle_info extends CPInfo { CONSTANT_MethodHandle_info(ConstantPool cp, ClassReader cr) throws IOException { super(cp); reference_kind = RefKind.getRefkind(cr.readUnsignedByte()); reference_index = cr.readUnsignedShort(); } public CONSTANT_MethodHandle_info(ConstantPool cp, RefKind ref_kind, int member_index) { super(cp); this.reference_kind = ref_kind; this.reference_index = member_index; } public int getTag() { return CONSTANT_MethodHandle; } public int byteLength() { return 4; } @Override public String toString() { return "CONSTANT_MethodHandle_info[ref_kind: " + reference_kind + ", member_index: " + reference_index + "]"; } public R accept(Visitor visitor, D data) { return visitor.visitMethodHandle(this, data); } public CPRefInfo getCPRefInfo() throws ConstantPoolException { int expected = CONSTANT_Methodref; int actual = cp.get(reference_index).getTag(); // allow these tag types also: switch (actual) { case CONSTANT_Fieldref: case CONSTANT_InterfaceMethodref: expected = actual; } return (CPRefInfo) cp.get(reference_index, expected); } public final RefKind reference_kind; public final int reference_index; } public static class CONSTANT_MethodType_info extends CPInfo { CONSTANT_MethodType_info(ConstantPool cp, ClassReader cr) throws IOException { super(cp); descriptor_index = cr.readUnsignedShort(); } public CONSTANT_MethodType_info(ConstantPool cp, int signature_index) { super(cp); this.descriptor_index = signature_index; } public int getTag() { return CONSTANT_MethodType; } public int byteLength() { return 3; } @Override public String toString() { return "CONSTANT_MethodType_info[signature_index: " + descriptor_index + "]"; } public R accept(Visitor visitor, D data) { return visitor.visitMethodType(this, data); } public String getType() throws ConstantPoolException { return cp.getUTF8Value(descriptor_index); } public final int descriptor_index; } public static class CONSTANT_Methodref_info extends CPRefInfo { CONSTANT_Methodref_info(ConstantPool cp, ClassReader cr) throws IOException { super(cp, cr, CONSTANT_Methodref); } public CONSTANT_Methodref_info(ConstantPool cp, int class_index, int name_and_type_index) { super(cp, CONSTANT_Methodref, class_index, name_and_type_index); } @Override public String toString() { return "CONSTANT_Methodref_info[class_index: " + class_index + ", name_and_type_index: " + name_and_type_index + "]"; } public R accept(Visitor visitor, D data) { return visitor.visitMethodref(this, data); } } public static class CONSTANT_NameAndType_info extends CPInfo { CONSTANT_NameAndType_info(ConstantPool cp, ClassReader cr) throws IOException { super(cp); name_index = cr.readUnsignedShort(); type_index = cr.readUnsignedShort(); } public CONSTANT_NameAndType_info(ConstantPool cp, int name_index, int type_index) { super(cp); this.name_index = name_index; this.type_index = type_index; } public int getTag() { return CONSTANT_NameAndType; } public int byteLength() { return 5; } public String getName() throws ConstantPoolException { return cp.getUTF8Value(name_index); } public String getType() throws ConstantPoolException { return cp.getUTF8Value(type_index); } public R accept(Visitor visitor, D data) { return visitor.visitNameAndType(this, data); } @Override public String toString() { return "CONSTANT_NameAndType_info[name_index: " + name_index + ", type_index: " + type_index + "]"; } public final int name_index; public final int type_index; } public static class CONSTANT_String_info extends CPInfo { CONSTANT_String_info(ConstantPool cp, ClassReader cr) throws IOException { super(cp); string_index = cr.readUnsignedShort(); } public CONSTANT_String_info(ConstantPool cp, int string_index) { super(cp); this.string_index = string_index; } public int getTag() { return CONSTANT_String; } public int byteLength() { return 3; } public String getString() throws ConstantPoolException { return cp.getUTF8Value(string_index); } public R accept(Visitor visitor, D data) { return visitor.visitString(this, data); } @Override public String toString() { return "CONSTANT_String_info[class_index: " + string_index + "]"; } public final int string_index; } public static class CONSTANT_Utf8_info extends CPInfo { CONSTANT_Utf8_info(ClassReader cr) throws IOException { value = cr.readUTF(); } public CONSTANT_Utf8_info(String value) { this.value = value; } public int getTag() { return CONSTANT_Utf8; } public int byteLength() { class SizeOutputStream extends OutputStream { @Override public void write(int b) { size++; } int size; } SizeOutputStream sizeOut = new SizeOutputStream(); DataOutputStream out = new DataOutputStream(sizeOut); try { out.writeUTF(value); } catch (IOException ignore) { } return 1 + sizeOut.size; } @Override public String toString() { if (value.length() < 32 && isPrintableAscii(value)) return "CONSTANT_Utf8_info[value: \"" + value + "\"]"; else return "CONSTANT_Utf8_info[value: (" + value.length() + " chars)]"; } static boolean isPrintableAscii(String s) { for (int i = 0; i < s.length(); i++) { char c = s.charAt(i); if (c < 32 || c >= 127) return false; } return true; } public R accept(Visitor visitor, D data) { return visitor.visitUtf8(this, data); } public final String value; } } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/ConstantPoolException.java0000644000000000000000000000325412214026367032066 0ustar 00000000000000/* * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.classfile; /* *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. */ public class ConstantPoolException extends Exception { private static final long serialVersionUID = -2324397349644754565L; ConstantPoolException(int index) { this.index = index; } public final int index; } ././@LongLink0000000000000000000000000000014600000000000011216 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/ConstantValue_attribute.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/ConstantValue_attribute.jav0000644000000000000000000000445212214026367032275 0ustar 00000000000000/* * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.classfile; import java.io.IOException; /** * See JVMS, section 4.8.2. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. */ public class ConstantValue_attribute extends Attribute { ConstantValue_attribute(ClassReader cr, int name_index, int length) throws IOException { super(name_index, length); constantvalue_index = cr.readUnsignedShort(); } public ConstantValue_attribute(ConstantPool constant_pool, int constantvalue_index) throws ConstantPoolException { this(constant_pool.getUTF8Index(Attribute.ConstantValue), constantvalue_index); } public ConstantValue_attribute(int name_index, int constantvalue_index) { super(name_index, 2); this.constantvalue_index = constantvalue_index; } public R accept(Visitor visitor, D data) { return visitor.visitConstantValue(this, data); } public final int constantvalue_index; } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/DefaultAttribute.java0000644000000000000000000000457112214026367031037 0ustar 00000000000000/* * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.classfile; /* *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. */ public class DefaultAttribute extends Attribute { DefaultAttribute(ClassReader cr, int name_index, byte[] data) { this(cr, name_index, data, null); } DefaultAttribute(ClassReader cr, int name_index, byte[] data, String reason) { super(name_index, data.length); info = data; this.reason = reason; } public DefaultAttribute(ConstantPool constant_pool, int name_index, byte[] info) { this(constant_pool, name_index, info, null); } public DefaultAttribute(ConstantPool constant_pool, int name_index, byte[] info, String reason) { super(name_index, info.length); this.info = info; this.reason = reason; } public R accept(Visitor visitor, P p) { return visitor.visitDefault(this, p); } public final byte[] info; /** Why did we need to generate a DefaultAttribute */ public final String reason; } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/Dependencies.java0000644000000000000000000006733612214026367030165 0ustar 00000000000000/* * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.classfile; import java.util.Deque; import java.util.HashMap; import java.util.HashSet; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Set; import java.util.regex.Pattern; import com.sun.tools.classfile.Dependency.Filter; import com.sun.tools.classfile.Dependency.Finder; import com.sun.tools.classfile.Dependency.Location; import com.sun.tools.classfile.Type.ArrayType; import com.sun.tools.classfile.Type.ClassSigType; import com.sun.tools.classfile.Type.ClassType; import com.sun.tools.classfile.Type.MethodType; import com.sun.tools.classfile.Type.SimpleType; import com.sun.tools.classfile.Type.TypeParamType; import com.sun.tools.classfile.Type.WildcardType; import static com.sun.tools.classfile.ConstantPool.*; /** * A framework for determining {@link Dependency dependencies} between class files. * * A {@link Dependency.Finder finder} is used to identify the dependencies of * individual classes. Some finders may return subtypes of {@code Dependency} to * further characterize the type of dependency, such as a dependency on a * method within a class. * * A {@link Dependency.Filter filter} may be used to restrict the set of * dependencies found by a finder. * * Dependencies that are found may be passed to a {@link Dependencies.Recorder * recorder} so that the dependencies can be stored in a custom data structure. */ public class Dependencies { /** * Thrown when a class file cannot be found. */ public static class ClassFileNotFoundException extends Exception { private static final long serialVersionUID = 3632265927794475048L; public ClassFileNotFoundException(String className) { super(className); this.className = className; } public ClassFileNotFoundException(String className, Throwable cause) { this(className); initCause(cause); } public final String className; } /** * Thrown when an exception is found processing a class file. */ public static class ClassFileError extends Error { private static final long serialVersionUID = 4111110813961313203L; public ClassFileError(Throwable cause) { initCause(cause); } } /** * Service provider interface to locate and read class files. */ public interface ClassFileReader { /** * Get the ClassFile object for a specified class. * @param className the name of the class to be returned. * @return the ClassFile for the given class * @throws Dependencies.ClassFileNotFoundException if the classfile cannot be * found */ public ClassFile getClassFile(String className) throws ClassFileNotFoundException; } /** * Service provide interface to handle results. */ public interface Recorder { /** * Record a dependency that has been found. * @param d */ public void addDependency(Dependency d); } /** * Get the default finder used to locate the dependencies for a class. * @return the default finder */ public static Finder getDefaultFinder() { return new APIDependencyFinder(AccessFlags.ACC_PRIVATE); } /** * Get a finder used to locate the API dependencies for a class. * These include the superclass, superinterfaces, and classes referenced in * the declarations of fields and methods. The fields and methods that * are checked can be limited according to a specified access. * The access parameter must be one of {@link AccessFlags#ACC_PUBLIC ACC_PUBLIC}, * {@link AccessFlags#ACC_PRIVATE ACC_PRIVATE}, * {@link AccessFlags#ACC_PROTECTED ACC_PROTECTED}, or 0 for * package private access. Members with greater than or equal accessibility * to that specified will be searched for dependencies. * @param access the access of members to be checked * @return an API finder */ public static Finder getAPIFinder(int access) { return new APIDependencyFinder(access); } /** * Get a finder to do class dependency analysis. * * @return a Class dependency finder */ public static Finder getClassDependencyFinder() { return new ClassDependencyFinder(); } /** * Get the finder used to locate the dependencies for a class. * @return the finder */ public Finder getFinder() { if (finder == null) finder = getDefaultFinder(); return finder; } /** * Set the finder used to locate the dependencies for a class. * @param f the finder */ public void setFinder(Finder f) { f.getClass(); // null check finder = f; } /** * Get the default filter used to determine included when searching * the transitive closure of all the dependencies. * Unless overridden, the default filter accepts all dependencies. * @return the default filter. */ public static Filter getDefaultFilter() { return DefaultFilter.instance(); } /** * Get a filter which uses a regular expression on the target's class name * to determine if a dependency is of interest. * @param pattern the pattern used to match the target's class name * @return a filter for matching the target class name with a regular expression */ public static Filter getRegexFilter(Pattern pattern) { return new TargetRegexFilter(pattern); } /** * Get a filter which checks the package of a target's class name * to determine if a dependency is of interest. The filter checks if the * package of the target's class matches any of a set of given package * names. The match may optionally match subpackages of the given names as well. * @param packageNames the package names used to match the target's class name * @param matchSubpackages whether or not to match subpackages as well * @return a filter for checking the target package name against a list of package names */ public static Filter getPackageFilter(Set packageNames, boolean matchSubpackages) { return new TargetPackageFilter(packageNames, matchSubpackages); } /** * Get the filter used to determine the dependencies included when searching * the transitive closure of all the dependencies. * Unless overridden, the default filter accepts all dependencies. * @return the filter */ public Filter getFilter() { if (filter == null) filter = getDefaultFilter(); return filter; } /** * Set the filter used to determine the dependencies included when searching * the transitive closure of all the dependencies. * @param f the filter */ public void setFilter(Filter f) { f.getClass(); // null check filter = f; } /** * Find the dependencies of a class, using the current * {@link Dependencies#getFinder finder} and * {@link Dependencies#getFilter filter}. * The search may optionally include the transitive closure of all the * filtered dependencies, by also searching in the classes named in those * dependencies. * @param classFinder a finder to locate class files * @param rootClassNames the names of the root classes from which to begin * searching * @param transitiveClosure whether or not to also search those classes * named in any filtered dependencies that are found. * @return the set of dependencies that were found * @throws ClassFileNotFoundException if a required class file cannot be found * @throws ClassFileError if an error occurs while processing a class file, * such as an error in the internal class file structure. */ public Set findAllDependencies( ClassFileReader classFinder, Set rootClassNames, boolean transitiveClosure) throws ClassFileNotFoundException { final Set results = new HashSet(); Recorder r = new Recorder() { public void addDependency(Dependency d) { results.add(d); } }; findAllDependencies(classFinder, rootClassNames, transitiveClosure, r); return results; } /** * Find the dependencies of a class, using the current * {@link Dependencies#getFinder finder} and * {@link Dependencies#getFilter filter}. * The search may optionally include the transitive closure of all the * filtered dependencies, by also searching in the classes named in those * dependencies. * @param classFinder a finder to locate class files * @param rootClassNames the names of the root classes from which to begin * searching * @param transitiveClosure whether or not to also search those classes * named in any filtered dependencies that are found. * @param recorder a recorder for handling the results * @throws ClassFileNotFoundException if a required class file cannot be found * @throws ClassFileError if an error occurs while processing a class file, * such as an error in the internal class file structure. */ public void findAllDependencies( ClassFileReader classFinder, Set rootClassNames, boolean transitiveClosure, Recorder recorder) throws ClassFileNotFoundException { Set doneClasses = new HashSet(); getFinder(); // ensure initialized getFilter(); // ensure initialized // Work queue of names of classfiles to be searched. // Entries will be unique, and for classes that do not yet have // dependencies in the results map. Deque deque = new LinkedList(rootClassNames); String className; while ((className = deque.poll()) != null) { assert (!doneClasses.contains(className)); doneClasses.add(className); ClassFile cf = classFinder.getClassFile(className); // The following code just applies the filter to the dependencies // followed for the transitive closure. for (Dependency d: finder.findDependencies(cf)) { recorder.addDependency(d); if (transitiveClosure && filter.accepts(d)) { String cn = d.getTarget().getClassName(); if (!doneClasses.contains(cn)) deque.add(cn); } } } } private Filter filter; private Finder finder; /** * A location identifying a class. */ static class SimpleLocation implements Location { public SimpleLocation(String name) { this.name = name; this.className = name.replace('/', '.'); } public String getName() { return name; } public String getClassName() { return className; } public String getPackageName() { int i = name.lastIndexOf('/'); return (i > 0) ? name.substring(0, i).replace('/', '.') : ""; } @Override public boolean equals(Object other) { if (this == other) return true; if (!(other instanceof SimpleLocation)) return false; return (name.equals(((SimpleLocation) other).name)); } @Override public int hashCode() { return name.hashCode(); } @Override public String toString() { return name; } private String name; private String className; } /** * A dependency of one class on another. */ static class SimpleDependency implements Dependency { public SimpleDependency(Location origin, Location target) { this.origin = origin; this.target = target; } public Location getOrigin() { return origin; } public Location getTarget() { return target; } @Override public boolean equals(Object other) { if (this == other) return true; if (!(other instanceof SimpleDependency)) return false; SimpleDependency o = (SimpleDependency) other; return (origin.equals(o.origin) && target.equals(o.target)); } @Override public int hashCode() { return origin.hashCode() * 31 + target.hashCode(); } @Override public String toString() { return origin + ":" + target; } private Location origin; private Location target; } /** * This class accepts all dependencies. */ static class DefaultFilter implements Filter { private static DefaultFilter instance; static DefaultFilter instance() { if (instance == null) instance = new DefaultFilter(); return instance; } public boolean accepts(Dependency dependency) { return true; } } /** * This class accepts those dependencies whose target's class name matches a * regular expression. */ static class TargetRegexFilter implements Filter { TargetRegexFilter(Pattern pattern) { this.pattern = pattern; } public boolean accepts(Dependency dependency) { return pattern.matcher(dependency.getTarget().getClassName()).matches(); } private final Pattern pattern; } /** * This class accepts those dependencies whose class name is in a given * package. */ static class TargetPackageFilter implements Filter { TargetPackageFilter(Set packageNames, boolean matchSubpackages) { for (String pn: packageNames) { if (pn.length() == 0) // implies null check as well throw new IllegalArgumentException(); } this.packageNames = packageNames; this.matchSubpackages = matchSubpackages; } public boolean accepts(Dependency dependency) { String pn = dependency.getTarget().getPackageName(); if (packageNames.contains(pn)) return true; if (matchSubpackages) { for (String n: packageNames) { if (pn.startsWith(n + ".")) return true; } } return false; } private final Set packageNames; private final boolean matchSubpackages; } /** * This class identifies class names directly or indirectly in the constant pool. */ static class ClassDependencyFinder extends BasicDependencyFinder { public Iterable findDependencies(ClassFile classfile) { Visitor v = new Visitor(classfile); for (CPInfo cpInfo: classfile.constant_pool.entries()) { v.scan(cpInfo); } try { v.addClass(classfile.super_class); v.addClasses(classfile.interfaces); v.scan(classfile.attributes); for (Field f : classfile.fields) { v.scan(f.descriptor, f.attributes); } for (Method m : classfile.methods) { v.scan(m.descriptor, m.attributes); Exceptions_attribute e = (Exceptions_attribute)m.attributes.get(Attribute.Exceptions); if (e != null) { v.addClasses(e.exception_index_table); } } } catch (ConstantPoolException e) { throw new ClassFileError(e); } return v.deps; } } /** * This class identifies class names in the signatures of classes, fields, * and methods in a class. */ static class APIDependencyFinder extends BasicDependencyFinder { APIDependencyFinder(int access) { switch (access) { case AccessFlags.ACC_PUBLIC: case AccessFlags.ACC_PROTECTED: case AccessFlags.ACC_PRIVATE: case 0: showAccess = access; break; default: throw new IllegalArgumentException("invalid access 0x" + Integer.toHexString(access)); } } public Iterable findDependencies(ClassFile classfile) { try { Visitor v = new Visitor(classfile); v.addClass(classfile.super_class); v.addClasses(classfile.interfaces); // inner classes? for (Field f : classfile.fields) { if (checkAccess(f.access_flags)) v.scan(f.descriptor, f.attributes); } for (Method m : classfile.methods) { if (checkAccess(m.access_flags)) { v.scan(m.descriptor, m.attributes); Exceptions_attribute e = (Exceptions_attribute) m.attributes.get(Attribute.Exceptions); if (e != null) v.addClasses(e.exception_index_table); } } return v.deps; } catch (ConstantPoolException e) { throw new ClassFileError(e); } } boolean checkAccess(AccessFlags flags) { // code copied from javap.Options.checkAccess boolean isPublic = flags.is(AccessFlags.ACC_PUBLIC); boolean isProtected = flags.is(AccessFlags.ACC_PROTECTED); boolean isPrivate = flags.is(AccessFlags.ACC_PRIVATE); boolean isPackage = !(isPublic || isProtected || isPrivate); if ((showAccess == AccessFlags.ACC_PUBLIC) && (isProtected || isPrivate || isPackage)) return false; else if ((showAccess == AccessFlags.ACC_PROTECTED) && (isPrivate || isPackage)) return false; else if ((showAccess == 0) && (isPrivate)) return false; else return true; } private int showAccess; } static abstract class BasicDependencyFinder implements Finder { private Map locations = new HashMap(); Location getLocation(String className) { Location l = locations.get(className); if (l == null) locations.put(className, l = new SimpleLocation(className)); return l; } class Visitor implements ConstantPool.Visitor, Type.Visitor { private ConstantPool constant_pool; private Location origin; Set deps; Visitor(ClassFile classFile) { try { constant_pool = classFile.constant_pool; origin = getLocation(classFile.getName()); deps = new HashSet(); } catch (ConstantPoolException e) { throw new ClassFileError(e); } } void scan(Descriptor d, Attributes attrs) { try { scan(new Signature(d.index).getType(constant_pool)); scan(attrs); } catch (ConstantPoolException e) { throw new ClassFileError(e); } } void scan(CPInfo cpInfo) { cpInfo.accept(this, null); } void scan(Type t) { t.accept(this, null); } void scan(Attributes attrs) { try { Signature_attribute sa = (Signature_attribute)attrs.get(Attribute.Signature); if (sa != null) scan(sa.getParsedSignature().getType(constant_pool)); scan((RuntimeVisibleAnnotations_attribute) attrs.get(Attribute.RuntimeVisibleAnnotations)); scan((RuntimeVisibleParameterAnnotations_attribute) attrs.get(Attribute.RuntimeVisibleParameterAnnotations)); } catch (ConstantPoolException e) { throw new ClassFileError(e); } } private void scan(RuntimeAnnotations_attribute attr) throws ConstantPoolException { if (attr == null) { return; } for (int i = 0; i < attr.annotations.length; i++) { int index = attr.annotations[i].type_index; scan(new Signature(index).getType(constant_pool)); } } private void scan(RuntimeParameterAnnotations_attribute attr) throws ConstantPoolException { if (attr == null) { return; } for (int param = 0; param < attr.parameter_annotations.length; param++) { for (int i = 0; i < attr.parameter_annotations[param].length; i++) { int index = attr.parameter_annotations[param][i].type_index; scan(new Signature(index).getType(constant_pool)); } } } void addClass(int index) throws ConstantPoolException { if (index != 0) { String name = constant_pool.getClassInfo(index).getBaseName(); if (name != null) addDependency(name); } } void addClasses(int[] indices) throws ConstantPoolException { for (int i: indices) addClass(i); } private void addDependency(String name) { deps.add(new SimpleDependency(origin, getLocation(name))); } // ConstantPool.Visitor methods public Void visitClass(CONSTANT_Class_info info, Void p) { try { if (info.getName().startsWith("[")) new Signature(info.name_index).getType(constant_pool).accept(this, null); else addDependency(info.getBaseName()); return null; } catch (ConstantPoolException e) { throw new ClassFileError(e); } } public Void visitDouble(CONSTANT_Double_info info, Void p) { return null; } public Void visitFieldref(CONSTANT_Fieldref_info info, Void p) { return visitRef(info, p); } public Void visitFloat(CONSTANT_Float_info info, Void p) { return null; } public Void visitInteger(CONSTANT_Integer_info info, Void p) { return null; } public Void visitInterfaceMethodref(CONSTANT_InterfaceMethodref_info info, Void p) { return visitRef(info, p); } public Void visitInvokeDynamic(CONSTANT_InvokeDynamic_info info, Void p) { return null; } public Void visitLong(CONSTANT_Long_info info, Void p) { return null; } public Void visitMethodHandle(CONSTANT_MethodHandle_info info, Void p) { return null; } public Void visitMethodType(CONSTANT_MethodType_info info, Void p) { return null; } public Void visitMethodref(CONSTANT_Methodref_info info, Void p) { return visitRef(info, p); } public Void visitNameAndType(CONSTANT_NameAndType_info info, Void p) { try { new Signature(info.type_index).getType(constant_pool).accept(this, null); return null; } catch (ConstantPoolException e) { throw new ClassFileError(e); } } public Void visitString(CONSTANT_String_info info, Void p) { return null; } public Void visitUtf8(CONSTANT_Utf8_info info, Void p) { return null; } private Void visitRef(CPRefInfo info, Void p) { try { visitClass(info.getClassInfo(), p); return null; } catch (ConstantPoolException e) { throw new ClassFileError(e); } } // Type.Visitor methods private void findDependencies(Type t) { if (t != null) t.accept(this, null); } private void findDependencies(List ts) { if (ts != null) { for (Type t: ts) t.accept(this, null); } } public Void visitSimpleType(SimpleType type, Void p) { return null; } public Void visitArrayType(ArrayType type, Void p) { findDependencies(type.elemType); return null; } public Void visitMethodType(MethodType type, Void p) { findDependencies(type.paramTypes); findDependencies(type.returnType); findDependencies(type.throwsTypes); findDependencies(type.typeParamTypes); return null; } public Void visitClassSigType(ClassSigType type, Void p) { findDependencies(type.superclassType); findDependencies(type.superinterfaceTypes); return null; } public Void visitClassType(ClassType type, Void p) { findDependencies(type.outerType); addDependency(type.getBinaryName()); findDependencies(type.typeArgs); return null; } public Void visitTypeParamType(TypeParamType type, Void p) { findDependencies(type.classBound); findDependencies(type.interfaceBounds); return null; } public Void visitWildcardType(WildcardType type, Void p) { findDependencies(type.boundType); return null; } } } } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/Dependency.java0000644000000000000000000000673712214026367027653 0ustar 00000000000000/* * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.classfile; /** * A directed relationship between two {@link Dependency.Location Location}s. * Subtypes of {@code Dependency} may provide additional detail about the dependency. * * @see Dependency.Finder * @see Dependency.Filter * @see Dependencies */ public interface Dependency { /** * A filter used to select dependencies of interest, and to discard others. */ public interface Filter { /** * Return true if the dependency is of interest. * @param dependency the dependency to be considered * @return true if and only if the dependency is of interest. */ boolean accepts(Dependency dependency); } /** * An interface for finding the immediate dependencies of a given class file. */ public interface Finder { /** * Find the immediate dependencies of a given class file. * @param classfile the class file to be examined * @return the dependencies located in the given class file. */ public Iterable findDependencies(ClassFile classfile); } /** * A location somewhere within a class. Subtypes of {@code Location} * may be used to provide additional detail about the location. */ public interface Location { /** * Get the name of the class containing the location. * This name will be used to locate the class file for transitive * dependency analysis. * @return the name of the class containing the location. */ String getName(); /** * Get the fully-qualified name of the class containing the location. * @return the fully-qualified name of the class containing the location. */ String getClassName(); /** * Get the package name of the class containing the location. * @return the package name of the class containing the location. */ String getPackageName(); } /** * Get the location that has the dependency. * @return the location that has the dependency. */ Location getOrigin(); /** * Get the location that is being depended upon. * @return the location that is being depended upon. */ Location getTarget(); } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/Deprecated_attribute.java0000644000000000000000000000407112214026367031705 0ustar 00000000000000/* * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.classfile; import java.io.IOException; /** * See JVMS, section 4.8.15. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. */ public class Deprecated_attribute extends Attribute { Deprecated_attribute(ClassReader cr, int name_index, int length) throws IOException { super(name_index, length); } public Deprecated_attribute(ConstantPool constant_pool) throws ConstantPoolException { this(constant_pool.getUTF8Index(Attribute.Deprecated)); } public Deprecated_attribute(int name_index) { super(name_index, 0); } public R accept(Visitor visitor, D data) { return visitor.visitDeprecated(this, data); } } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/Descriptor.java0000644000000000000000000001350512214026367027702 0ustar 00000000000000/* * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.classfile; import java.io.IOException; /** * See JVMS, section 4.4. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. */ public class Descriptor { public static class InvalidDescriptor extends DescriptorException { private static final long serialVersionUID = 1L; InvalidDescriptor(String desc) { this.desc = desc; this.index = -1; } InvalidDescriptor(String desc, int index) { this.desc = desc; this.index = index; } @Override public String getMessage() { // i18n if (index == -1) return "invalid descriptor \"" + desc + "\""; else return "descriptor is invalid at offset " + index + " in \"" + desc + "\""; } public final String desc; public final int index; } public Descriptor(ClassReader cr) throws IOException { this(cr.readUnsignedShort()); } public Descriptor(int index) { this.index = index; } public String getValue(ConstantPool constant_pool) throws ConstantPoolException { return constant_pool.getUTF8Value(index); } public int getParameterCount(ConstantPool constant_pool) throws ConstantPoolException, InvalidDescriptor { String desc = getValue(constant_pool); int end = desc.indexOf(")"); if (end == -1) throw new InvalidDescriptor(desc); parse(desc, 0, end + 1); return count; } public String getParameterTypes(ConstantPool constant_pool) throws ConstantPoolException, InvalidDescriptor { String desc = getValue(constant_pool); int end = desc.indexOf(")"); if (end == -1) throw new InvalidDescriptor(desc); return parse(desc, 0, end + 1); } public String getReturnType(ConstantPool constant_pool) throws ConstantPoolException, InvalidDescriptor { String desc = getValue(constant_pool); int end = desc.indexOf(")"); if (end == -1) throw new InvalidDescriptor(desc); return parse(desc, end + 1, desc.length()); } public String getFieldType(ConstantPool constant_pool) throws ConstantPoolException, InvalidDescriptor { String desc = getValue(constant_pool); return parse(desc, 0, desc.length()); } private String parse(String desc, int start, int end) throws InvalidDescriptor { int p = start; StringBuilder sb = new StringBuilder(); int dims = 0; count = 0; while (p < end) { String type; char ch; switch (ch = desc.charAt(p++)) { case '(': sb.append('('); continue; case ')': sb.append(')'); continue; case '[': dims++; continue; case 'B': type = "byte"; break; case 'C': type = "char"; break; case 'D': type = "double"; break; case 'F': type = "float"; break; case 'I': type = "int"; break; case 'J': type = "long"; break; case 'L': int sep = desc.indexOf(';', p); if (sep == -1) throw new InvalidDescriptor(desc, p - 1); type = desc.substring(p, sep).replace('/', '.'); p = sep + 1; break; case 'S': type = "short"; break; case 'Z': type = "boolean"; break; case 'V': type = "void"; break; default: throw new InvalidDescriptor(desc, p - 1); } if (sb.length() > 1 && sb.charAt(0) == '(') sb.append(", "); sb.append(type); for ( ; dims > 0; dims-- ) sb.append("[]"); count++; } return sb.toString(); } public final int index; private int count; } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/DescriptorException.java0000644000000000000000000000310312214026367031552 0ustar 00000000000000/* * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.classfile; /* *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. */ public class DescriptorException extends Exception { private static final long serialVersionUID = 2411890273788901032L; } ././@LongLink0000000000000000000000000000015000000000000011211 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/EnclosingMethod_attribute.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/EnclosingMethod_attribute.j0000644000000000000000000000546112214026367032243 0ustar 00000000000000 /* * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.classfile; import java.io.IOException; /** * See JVMS, section 4.8.7. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. */ public class EnclosingMethod_attribute extends Attribute { EnclosingMethod_attribute(ClassReader cr, int name_index, int length) throws IOException { super(name_index, length); class_index = cr.readUnsignedShort(); method_index = cr.readUnsignedShort(); } public EnclosingMethod_attribute(ConstantPool constant_pool, int class_index, int method_index) throws ConstantPoolException { this(constant_pool.getUTF8Index(Attribute.EnclosingMethod), class_index, method_index); } public EnclosingMethod_attribute(int name_index, int class_index, int method_index) { super(name_index, 4); this.class_index = class_index; this.method_index = method_index; } public String getClassName(ConstantPool constant_pool) throws ConstantPoolException { return constant_pool.getClassInfo(class_index).getName(); } public String getMethodName(ConstantPool constant_pool) throws ConstantPoolException { if (method_index == 0) return ""; return constant_pool.getNameAndTypeInfo(method_index).getName(); } public R accept(Visitor visitor, D data) { return visitor.visitEnclosingMethod(this, data); } public final int class_index; public final int method_index; } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/Exceptions_attribute.java0000644000000000000000000000553612214026367031775 0ustar 00000000000000/* * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.classfile; import java.io.IOException; /** * See JVMS, section 4.8.5. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. */ public class Exceptions_attribute extends Attribute { Exceptions_attribute(ClassReader cr, int name_index, int length) throws IOException { super(name_index, length); number_of_exceptions = cr.readUnsignedShort(); exception_index_table = new int[number_of_exceptions]; for (int i = 0; i < number_of_exceptions; i++) exception_index_table[i] = cr.readUnsignedShort(); } public Exceptions_attribute(ConstantPool constant_pool, int[] exception_index_table) throws ConstantPoolException { this(constant_pool.getUTF8Index(Attribute.Exceptions), exception_index_table); } public Exceptions_attribute(int name_index, int[] exception_index_table) { super(name_index, 2 + 2 * exception_index_table.length); this.number_of_exceptions = exception_index_table.length; this.exception_index_table = exception_index_table; } public String getException(int index, ConstantPool constant_pool) throws ConstantPoolException { int exception_index = exception_index_table[index]; return constant_pool.getClassInfo(exception_index).getName(); } public R accept(Visitor visitor, D data) { return visitor.visitExceptions(this, data); } public final int number_of_exceptions; public final int[] exception_index_table; } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/Field.java0000644000000000000000000000457712214026367026620 0ustar 00000000000000/* * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.classfile; import java.io.IOException; /* *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. */ public class Field { Field(ClassReader cr) throws IOException { access_flags = new AccessFlags(cr); name_index = cr.readUnsignedShort(); descriptor = new Descriptor(cr); attributes = new Attributes(cr); } public Field(AccessFlags access_flags, int name_index, Descriptor descriptor, Attributes attributes) { this.access_flags = access_flags; this.name_index = name_index; this.descriptor = descriptor; this.attributes = attributes; } public int byteLength() { return 6 + attributes.byteLength(); } public String getName(ConstantPool constant_pool) throws ConstantPoolException { return constant_pool.getUTF8Value(name_index); } public final AccessFlags access_flags; public final int name_index; public final Descriptor descriptor; public final Attributes attributes; } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/InnerClasses_attribute.java0000644000000000000000000000761712214026367032247 0ustar 00000000000000/* * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.classfile; import java.io.IOException; import com.sun.tools.classfile.ConstantPool.*; /** * See JVMS, section 4.8.6. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. */ public class InnerClasses_attribute extends Attribute { InnerClasses_attribute(ClassReader cr, int name_index, int length) throws IOException { super(name_index, length); number_of_classes = cr.readUnsignedShort(); classes = new Info[number_of_classes]; for (int i = 0; i < number_of_classes; i++) classes[i] = new Info(cr); } public InnerClasses_attribute(ConstantPool constant_pool, Info[] classes) throws ConstantPoolException { this(constant_pool.getUTF8Index(Attribute.InnerClasses), classes); } public InnerClasses_attribute(int name_index, Info[] classes) { super(name_index, 2 + Info.length() * classes.length); this.number_of_classes = classes.length; this.classes = classes; } public R accept(Visitor visitor, D data) { return visitor.visitInnerClasses(this, data); } public final int number_of_classes; public final Info[] classes; public static class Info { Info(ClassReader cr) throws IOException { inner_class_info_index = cr.readUnsignedShort(); outer_class_info_index = cr.readUnsignedShort(); inner_name_index = cr.readUnsignedShort(); inner_class_access_flags = new AccessFlags(cr.readUnsignedShort()); } public CONSTANT_Class_info getInnerClassInfo(ConstantPool constant_pool) throws ConstantPoolException { if (inner_class_info_index == 0) return null; return constant_pool.getClassInfo(inner_class_info_index); } public CONSTANT_Class_info getOuterClassInfo(ConstantPool constant_pool) throws ConstantPoolException { if (outer_class_info_index == 0) return null; return constant_pool.getClassInfo(outer_class_info_index); } public String getInnerName(ConstantPool constant_pool) throws ConstantPoolException { if (inner_name_index == 0) return null; return constant_pool.getUTF8Value(inner_name_index); } public static int length() { return 8; } public final int inner_class_info_index; public final int outer_class_info_index; public final int inner_name_index; public final AccessFlags inner_class_access_flags; } } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/Instruction.java0000644000000000000000000003177412214026367030115 0ustar 00000000000000/* * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.classfile; /** * See JVMS, chapter 6. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @see Code_attribute#getInstructions */ public class Instruction { /** The kind of an instruction, as determined by the position, size and * types of its operands. */ public static enum Kind { /** Opcode is not followed by any operands. */ NO_OPERANDS(1), /** Opcode is followed by a byte indicating a type. */ ATYPE(2), /** Opcode is followed by a 2-byte branch offset. */ BRANCH(3), /** Opcode is followed by a 4-byte branch offset. */ BRANCH_W(5), /** Opcode is followed by a signed byte value. */ BYTE(2), /** Opcode is followed by a 1-byte index into the constant pool. */ CPREF(2), /** Opcode is followed by a 2-byte index into the constant pool. */ CPREF_W(3), /** Opcode is followed by a 2-byte index into the constant pool, * an unsigned byte value. */ CPREF_W_UBYTE(4), /** Opcode is followed by a 2-byte index into the constant pool., * an unsigned byte value, and a zero byte. */ CPREF_W_UBYTE_ZERO(5), /** Opcode is followed by variable number of operands, depending * on the instruction.*/ DYNAMIC(-1), /** Opcode is followed by a 1-byte reference to a local variable. */ LOCAL(2), /** Opcode is followed by a 1-byte reference to a local variable, * and a signed byte value. */ LOCAL_BYTE(3), /** Opcode is followed by a signed short value. */ SHORT(3), /** Wide opcode is not followed by any operands. */ WIDE_NO_OPERANDS(2), /** Wide opcode is followed by a 2-byte index into the local variables array. */ WIDE_LOCAL(4), /** Wide opcode is followed by a 2-byte index into the constant pool. */ WIDE_CPREF_W(4), /** Wide opcode is followed by a 2-byte index into the constant pool, * and a signed short value. */ WIDE_CPREF_W_SHORT(6), /** Wide opcode is followed by a 2-byte reference to a local variable, * and a signed short value. */ WIDE_LOCAL_SHORT(6), /** Opcode was not recognized. */ UNKNOWN(1); Kind(int length) { this.length = length; } /** The length, in bytes, of this kind of instruction, or -1 is the * length depends on the specific instruction. */ public final int length; }; /** A utility visitor to help decode the operands of an instruction. * @see Instruction#accept */ public interface KindVisitor { /** See {@link Kind#NO_OPERANDS}, {@link Kind#WIDE_NO_OPERANDS}. */ R visitNoOperands(Instruction instr, P p); /** See {@link Kind#ATYPE}. */ R visitArrayType(Instruction instr, TypeKind kind, P p); /** See {@link Kind#BRANCH}, {@link Kind#BRANCH_W}. */ R visitBranch(Instruction instr, int offset, P p); /** See {@link Kind#CPREF}, {@link Kind#CPREF_W}, {@link Kind#WIDE_CPREF_W}. */ R visitConstantPoolRef(Instruction instr, int index, P p); /** See {@link Kind#CPREF_W_UBYTE}, {@link Kind#CPREF_W_UBYTE_ZERO}, {@link Kind#WIDE_CPREF_W_SHORT}. */ R visitConstantPoolRefAndValue(Instruction instr, int index, int value, P p); /** See {@link Kind#LOCAL}, {@link Kind#WIDE_LOCAL}. */ R visitLocal(Instruction instr, int index, P p); /** See {@link Kind#LOCAL_BYTE}. */ R visitLocalAndValue(Instruction instr, int index, int value, P p); /** See {@link Kind#DYNAMIC}. */ R visitLookupSwitch(Instruction instr, int default_, int npairs, int[] matches, int[] offsets, P p); /** See {@link Kind#DYNAMIC}. */ R visitTableSwitch(Instruction instr, int default_, int low, int high, int[] offsets, P p); /** See {@link Kind#BYTE}, {@link Kind#SHORT}. */ R visitValue(Instruction instr, int value, P p); /** Instruction is unrecognized. */ R visitUnknown(Instruction instr, P p); } /** The kind of primitive array type to create. * See JVMS chapter 6, newarray. */ public static enum TypeKind { T_BOOLEAN(4, "boolean"), T_CHAR(5, "char"), T_FLOAT(6, "float"), T_DOUBLE(7, "double"), T_BYTE(8, "byte"), T_SHORT(9, "short"), T_INT (10, "int"), T_LONG (11, "long"); TypeKind(int value, String name) { this.value = value; this.name = name; } public static TypeKind get(int value) { switch (value) { case 4: return T_BOOLEAN; case 5: return T_CHAR; case 6: return T_FLOAT; case 7: return T_DOUBLE; case 8: return T_BYTE; case 9: return T_SHORT; case 10: return T_INT; case 11: return T_LONG; default: return null; } } public final int value; public final String name; } /** An instruction is defined by its position in a bytecode array. */ public Instruction(byte[] bytes, int pc) { this.bytes = bytes; this.pc = pc; } /** Get the position of the instruction within the bytecode array. */ public int getPC() { return pc; } /** Get a byte value, relative to the start of this instruction. */ public int getByte(int offset) { return bytes[pc + offset]; } /** Get an unsigned byte value, relative to the start of this instruction. */ public int getUnsignedByte(int offset) { return getByte(offset) & 0xff; } /** Get a 2-byte value, relative to the start of this instruction. */ public int getShort(int offset) { return (getByte(offset) << 8) | getUnsignedByte(offset + 1); } /** Get a unsigned 2-byte value, relative to the start of this instruction. */ public int getUnsignedShort(int offset) { return getShort(offset) & 0xFFFF; } /** Get a 4-byte value, relative to the start of this instruction. */ public int getInt(int offset) { return (getShort(offset) << 16) | (getUnsignedShort(offset + 2)); } /** Get the Opcode for this instruction, or null if the instruction is * unrecognized. */ public Opcode getOpcode() { int b = getUnsignedByte(0); switch (b) { case Opcode.NONPRIV: case Opcode.PRIV: case Opcode.WIDE: return Opcode.get(b, getUnsignedByte(1)); } return Opcode.get(b); } /** Get the mnemonic for this instruction, or a default string if the * instruction is unrecognized. */ public String getMnemonic() { Opcode opcode = getOpcode(); if (opcode == null) return "bytecode " + getUnsignedByte(0); else return opcode.toString().toLowerCase(); } /** Get the length, in bytes, of this instruction, including the opcode * and all its operands. */ public int length() { Opcode opcode = getOpcode(); if (opcode == null) return 1; switch (opcode) { case TABLESWITCH: { int pad = align(pc + 1) - pc; int low = getInt(pad + 4); int high = getInt(pad + 8); return pad + 12 + 4 * (high - low + 1); } case LOOKUPSWITCH: { int pad = align(pc + 1) - pc; int npairs = getInt(pad + 4); return pad + 8 + 8 * npairs; } default: return opcode.kind.length; } } /** Get the {@link Kind} of this instruction. */ public Kind getKind() { Opcode opcode = getOpcode(); return (opcode != null ? opcode.kind : Kind.UNKNOWN); } /** Invoke a method on the visitor according to the kind of this * instruction, passing in the decoded operands for the instruction. */ public R accept(KindVisitor visitor, P p) { switch (getKind()) { case NO_OPERANDS: return visitor.visitNoOperands(this, p); case ATYPE: return visitor.visitArrayType( this, TypeKind.get(getUnsignedByte(1)), p); case BRANCH: return visitor.visitBranch(this, getShort(1), p); case BRANCH_W: return visitor.visitBranch(this, getInt(1), p); case BYTE: return visitor.visitValue(this, getByte(1), p); case CPREF: return visitor.visitConstantPoolRef(this, getUnsignedByte(1), p); case CPREF_W: return visitor.visitConstantPoolRef(this, getUnsignedShort(1), p); case CPREF_W_UBYTE: case CPREF_W_UBYTE_ZERO: return visitor.visitConstantPoolRefAndValue( this, getUnsignedShort(1), getUnsignedByte(3), p); case DYNAMIC: { switch (getOpcode()) { case TABLESWITCH: { int pad = align(pc + 1) - pc; int default_ = getInt(pad); int low = getInt(pad + 4); int high = getInt(pad + 8); int[] values = new int[high - low + 1]; for (int i = 0; i < values.length; i++) values[i] = getInt(pad + 12 + 4 * i); return visitor.visitTableSwitch( this, default_, low, high, values, p); } case LOOKUPSWITCH: { int pad = align(pc + 1) - pc; int default_ = getInt(pad); int npairs = getInt(pad + 4); int[] matches = new int[npairs]; int[] offsets = new int[npairs]; for (int i = 0; i < npairs; i++) { matches[i] = getInt(pad + 8 + i * 8); offsets[i] = getInt(pad + 12 + i * 8); } return visitor.visitLookupSwitch( this, default_, npairs, matches, offsets, p); } default: throw new IllegalStateException(); } } case LOCAL: return visitor.visitLocal(this, getUnsignedByte(1), p); case LOCAL_BYTE: return visitor.visitLocalAndValue( this, getUnsignedByte(1), getByte(2), p); case SHORT: return visitor.visitValue(this, getShort(1), p); case WIDE_NO_OPERANDS: return visitor.visitNoOperands(this, p); case WIDE_LOCAL: return visitor.visitLocal(this, getUnsignedShort(2), p); case WIDE_CPREF_W: return visitor.visitConstantPoolRef(this, getUnsignedShort(2), p); case WIDE_CPREF_W_SHORT: return visitor.visitConstantPoolRefAndValue( this, getUnsignedShort(2), getUnsignedByte(4), p); case WIDE_LOCAL_SHORT: return visitor.visitLocalAndValue( this, getUnsignedShort(2), getShort(4), p); case UNKNOWN: return visitor.visitUnknown(this, p); default: throw new IllegalStateException(); } } private static int align(int n) { return (n + 3) & ~3; } private byte[] bytes; private int pc; } ././@LongLink0000000000000000000000000000015000000000000011211 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/LineNumberTable_attribute.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/LineNumberTable_attribute.j0000644000000000000000000000573412214026367032174 0ustar 00000000000000/* * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.classfile; import java.io.IOException; /** * See JVMS, section 4.8.12. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. */ public class LineNumberTable_attribute extends Attribute { LineNumberTable_attribute(ClassReader cr, int name_index, int length) throws IOException { super(name_index, length); line_number_table_length = cr.readUnsignedShort(); line_number_table = new Entry[line_number_table_length]; for (int i = 0; i < line_number_table_length; i++) line_number_table[i] = new Entry(cr); } public LineNumberTable_attribute(ConstantPool constant_pool, Entry[] line_number_table) throws ConstantPoolException { this(constant_pool.getUTF8Index(Attribute.LineNumberTable), line_number_table); } public LineNumberTable_attribute(int name_index, Entry[] line_number_table) { super(name_index, 2 + line_number_table.length * Entry.length()); this.line_number_table_length = line_number_table.length; this.line_number_table = line_number_table; } public R accept(Visitor visitor, D data) { return visitor.visitLineNumberTable(this, data); } public final int line_number_table_length; public final Entry[] line_number_table; public static class Entry { Entry(ClassReader cr) throws IOException { start_pc = cr.readUnsignedShort(); line_number = cr.readUnsignedShort(); } public static int length() { return 4; } public final int start_pc; public final int line_number; } } ././@LongLink0000000000000000000000000000015300000000000011214 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/LocalVariableTable_attribute.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/LocalVariableTable_attribut0000644000000000000000000000642612214026367032236 0ustar 00000000000000/* * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.classfile; import java.io.IOException; /** * See JVMS, section 4.8.13. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. */ public class LocalVariableTable_attribute extends Attribute { LocalVariableTable_attribute(ClassReader cr, int name_index, int length) throws IOException { super(name_index, length); local_variable_table_length = cr.readUnsignedShort(); local_variable_table = new Entry[local_variable_table_length]; for (int i = 0; i < local_variable_table_length; i++) local_variable_table[i] = new Entry(cr); } public LocalVariableTable_attribute(ConstantPool constant_pool, Entry[] local_variable_table) throws ConstantPoolException { this(constant_pool.getUTF8Index(Attribute.LocalVariableTable), local_variable_table); } public LocalVariableTable_attribute(int name_index, Entry[] local_variable_table) { super(name_index, 2 + local_variable_table.length * Entry.length()); this.local_variable_table_length = local_variable_table.length; this.local_variable_table = local_variable_table; } public R accept(Visitor visitor, D data) { return visitor.visitLocalVariableTable(this, data); } public final int local_variable_table_length; public final Entry[] local_variable_table; public static class Entry { Entry(ClassReader cr) throws IOException { start_pc = cr.readUnsignedShort(); length = cr.readUnsignedShort(); name_index = cr.readUnsignedShort(); descriptor_index = cr.readUnsignedShort(); index = cr.readUnsignedShort(); } public static int length() { return 10; } public final int start_pc; public final int length; public final int name_index; public final int descriptor_index; public final int index; } } ././@LongLink0000000000000000000000000000015700000000000011220 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/LocalVariableTypeTable_attribute.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/LocalVariableTypeTable_attr0000644000000000000000000000645412214026367032215 0ustar 00000000000000/* * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.classfile; import java.io.IOException; /** * See JVMS, section 4.8.14. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. */ public class LocalVariableTypeTable_attribute extends Attribute { LocalVariableTypeTable_attribute(ClassReader cr, int name_index, int length) throws IOException { super(name_index, length); local_variable_table_length = cr.readUnsignedShort(); local_variable_table = new Entry[local_variable_table_length]; for (int i = 0; i < local_variable_table_length; i++) local_variable_table[i] = new Entry(cr); } public LocalVariableTypeTable_attribute(ConstantPool constant_pool, Entry[] local_variable_table) throws ConstantPoolException { this(constant_pool.getUTF8Index(Attribute.LocalVariableTypeTable), local_variable_table); } public LocalVariableTypeTable_attribute(int name_index, Entry[] local_variable_table) { super(name_index, 2 + local_variable_table.length * Entry.length()); this.local_variable_table_length = local_variable_table.length; this.local_variable_table = local_variable_table; } public R accept(Visitor visitor, D data) { return visitor.visitLocalVariableTypeTable(this, data); } public final int local_variable_table_length; public final Entry[] local_variable_table; public static class Entry { Entry(ClassReader cr) throws IOException { start_pc = cr.readUnsignedShort(); length = cr.readUnsignedShort(); name_index = cr.readUnsignedShort(); signature_index = cr.readUnsignedShort(); index = cr.readUnsignedShort(); } public static int length() { return 10; } public final int start_pc; public final int length; public final int name_index; public final int signature_index; public final int index; } } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/Method.java0000644000000000000000000000460212214026367027002 0ustar 00000000000000/* * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.classfile; import java.io.IOException; /* *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. */ public class Method { Method(ClassReader cr) throws IOException { access_flags = new AccessFlags(cr); name_index = cr.readUnsignedShort(); descriptor = new Descriptor(cr); attributes = new Attributes(cr); } public Method(AccessFlags access_flags, int name_index, Descriptor descriptor, Attributes attributes) { this.access_flags = access_flags; this.name_index = name_index; this.descriptor = descriptor; this.attributes = attributes; } public int byteLength() { return 6 + attributes.byteLength(); } public String getName(ConstantPool constant_pool) throws ConstantPoolException { return constant_pool.getUTF8Value(name_index); } public final AccessFlags access_flags; public final int name_index; public final Descriptor descriptor; public final Attributes attributes; } ././@LongLink0000000000000000000000000000015100000000000011212 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/MethodParameters_attribute.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/MethodParameters_attribute.0000644000000000000000000000627212214026367032254 0ustar 00000000000000/* * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.classfile; import java.io.IOException; /** * See JVMS, section 4.8.13. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. */ public class MethodParameters_attribute extends Attribute { public final int method_parameter_table_length; public final Entry[] method_parameter_table; MethodParameters_attribute(ClassReader cr, int name_index, int length) throws IOException { super(name_index, length); method_parameter_table_length = cr.readUnsignedByte(); method_parameter_table = new Entry[method_parameter_table_length]; for (int i = 0; i < method_parameter_table_length; i++) method_parameter_table[i] = new Entry(cr); } public MethodParameters_attribute(ConstantPool constant_pool, Entry[] method_parameter_table) throws ConstantPoolException { this(constant_pool.getUTF8Index(Attribute.MethodParameters), method_parameter_table); } public MethodParameters_attribute(int name_index, Entry[] method_parameter_table) { super(name_index, 1 + method_parameter_table.length * Entry.length()); this.method_parameter_table_length = method_parameter_table.length; this.method_parameter_table = method_parameter_table; } public R accept(Visitor visitor, D data) { return visitor.visitMethodParameters(this, data); } public static class Entry { Entry(ClassReader cr) throws IOException { name_index = cr.readUnsignedShort(); flags = cr.readUnsignedShort(); } public static int length() { return 6; } public final int name_index; public final int flags; } } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/Opcode.java0000644000000000000000000003334012214026367026774 0ustar 00000000000000/* * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.classfile; import static com.sun.tools.classfile.Instruction.Kind.*; import static com.sun.tools.classfile.Opcode.Set.*; /** * See JVMS, chapter 6. * *

In addition to providing all the standard opcodes defined in JVMS, * this class also provides legacy support for the PicoJava extensions. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. */ public enum Opcode { NOP(0x0), ACONST_NULL(0x1), ICONST_M1(0x2), ICONST_0(0x3), ICONST_1(0x4), ICONST_2(0x5), ICONST_3(0x6), ICONST_4(0x7), ICONST_5(0x8), LCONST_0(0x9), LCONST_1(0xa), FCONST_0(0xb), FCONST_1(0xc), FCONST_2(0xd), DCONST_0(0xe), DCONST_1(0xf), BIPUSH(0x10, BYTE), SIPUSH(0x11, SHORT), LDC(0x12, CPREF), LDC_W(0x13, CPREF_W), LDC2_W(0x14, CPREF_W), ILOAD(0x15, LOCAL), LLOAD(0x16, LOCAL), FLOAD(0x17, LOCAL), DLOAD(0x18, LOCAL), ALOAD(0x19, LOCAL), ILOAD_0(0x1a), ILOAD_1(0x1b), ILOAD_2(0x1c), ILOAD_3(0x1d), LLOAD_0(0x1e), LLOAD_1(0x1f), LLOAD_2(0x20), LLOAD_3(0x21), FLOAD_0(0x22), FLOAD_1(0x23), FLOAD_2(0x24), FLOAD_3(0x25), DLOAD_0(0x26), DLOAD_1(0x27), DLOAD_2(0x28), DLOAD_3(0x29), ALOAD_0(0x2a), ALOAD_1(0x2b), ALOAD_2(0x2c), ALOAD_3(0x2d), IALOAD(0x2e), LALOAD(0x2f), FALOAD(0x30), DALOAD(0x31), AALOAD(0x32), BALOAD(0x33), CALOAD(0x34), SALOAD(0x35), ISTORE(0x36, LOCAL), LSTORE(0x37, LOCAL), FSTORE(0x38, LOCAL), DSTORE(0x39, LOCAL), ASTORE(0x3a, LOCAL), ISTORE_0(0x3b), ISTORE_1(0x3c), ISTORE_2(0x3d), ISTORE_3(0x3e), LSTORE_0(0x3f), LSTORE_1(0x40), LSTORE_2(0x41), LSTORE_3(0x42), FSTORE_0(0x43), FSTORE_1(0x44), FSTORE_2(0x45), FSTORE_3(0x46), DSTORE_0(0x47), DSTORE_1(0x48), DSTORE_2(0x49), DSTORE_3(0x4a), ASTORE_0(0x4b), ASTORE_1(0x4c), ASTORE_2(0x4d), ASTORE_3(0x4e), IASTORE(0x4f), LASTORE(0x50), FASTORE(0x51), DASTORE(0x52), AASTORE(0x53), BASTORE(0x54), CASTORE(0x55), SASTORE(0x56), POP(0x57), POP2(0x58), DUP(0x59), DUP_X1(0x5a), DUP_X2(0x5b), DUP2(0x5c), DUP2_X1(0x5d), DUP2_X2(0x5e), SWAP(0x5f), IADD(0x60), LADD(0x61), FADD(0x62), DADD(0x63), ISUB(0x64), LSUB(0x65), FSUB(0x66), DSUB(0x67), IMUL(0x68), LMUL(0x69), FMUL(0x6a), DMUL(0x6b), IDIV(0x6c), LDIV(0x6d), FDIV(0x6e), DDIV(0x6f), IREM(0x70), LREM(0x71), FREM(0x72), DREM(0x73), INEG(0x74), LNEG(0x75), FNEG(0x76), DNEG(0x77), ISHL(0x78), LSHL(0x79), ISHR(0x7a), LSHR(0x7b), IUSHR(0x7c), LUSHR(0x7d), IAND(0x7e), LAND(0x7f), IOR(0x80), LOR(0x81), IXOR(0x82), LXOR(0x83), IINC(0x84, LOCAL_BYTE), I2L(0x85), I2F(0x86), I2D(0x87), L2I(0x88), L2F(0x89), L2D(0x8a), F2I(0x8b), F2L(0x8c), F2D(0x8d), D2I(0x8e), D2L(0x8f), D2F(0x90), I2B(0x91), I2C(0x92), I2S(0x93), LCMP(0x94), FCMPL(0x95), FCMPG(0x96), DCMPL(0x97), DCMPG(0x98), IFEQ(0x99, BRANCH), IFNE(0x9a, BRANCH), IFLT(0x9b, BRANCH), IFGE(0x9c, BRANCH), IFGT(0x9d, BRANCH), IFLE(0x9e, BRANCH), IF_ICMPEQ(0x9f, BRANCH), IF_ICMPNE(0xa0, BRANCH), IF_ICMPLT(0xa1, BRANCH), IF_ICMPGE(0xa2, BRANCH), IF_ICMPGT(0xa3, BRANCH), IF_ICMPLE(0xa4, BRANCH), IF_ACMPEQ(0xa5, BRANCH), IF_ACMPNE(0xa6, BRANCH), GOTO(0xa7, BRANCH), JSR(0xa8, BRANCH), RET(0xa9, LOCAL), TABLESWITCH(0xaa, DYNAMIC), LOOKUPSWITCH(0xab, DYNAMIC), IRETURN(0xac), LRETURN(0xad), FRETURN(0xae), DRETURN(0xaf), ARETURN(0xb0), RETURN(0xb1), GETSTATIC(0xb2, CPREF_W), PUTSTATIC(0xb3, CPREF_W), GETFIELD(0xb4, CPREF_W), PUTFIELD(0xb5, CPREF_W), INVOKEVIRTUAL(0xb6, CPREF_W), INVOKESPECIAL(0xb7, CPREF_W), INVOKESTATIC(0xb8, CPREF_W), INVOKEINTERFACE(0xb9, CPREF_W_UBYTE_ZERO), INVOKEDYNAMIC(0xba, CPREF_W_UBYTE_ZERO), NEW(0xbb, CPREF_W), NEWARRAY(0xbc, ATYPE), ANEWARRAY(0xbd, CPREF_W), ARRAYLENGTH(0xbe), ATHROW(0xbf), CHECKCAST(0xc0, CPREF_W), INSTANCEOF(0xc1, CPREF_W), MONITORENTER(0xc2), MONITOREXIT(0xc3), // wide 0xc4 MULTIANEWARRAY(0xc5, CPREF_W_UBYTE), IFNULL(0xc6, BRANCH), IFNONNULL(0xc7, BRANCH), GOTO_W(0xc8, BRANCH_W), JSR_W(0xc9, BRANCH_W), // impdep 0xfe: PicoJava nonpriv // impdep 0xff: Picojava priv // wide opcodes ILOAD_W(0xc415, WIDE_LOCAL), LLOAD_W(0xc416, WIDE_LOCAL), FLOAD_W(0xc417, WIDE_LOCAL), DLOAD_W(0xc418, WIDE_LOCAL), ALOAD_W(0xc419, WIDE_LOCAL), ISTORE_W(0xc436, WIDE_LOCAL), LSTORE_W(0xc437, WIDE_LOCAL), FSTORE_W(0xc438, WIDE_LOCAL), DSTORE_W(0xc439, WIDE_LOCAL), ASTORE_W(0xc43a, WIDE_LOCAL), IINC_W(0xc484, WIDE_LOCAL_SHORT), RET_W(0xc4a9, WIDE_LOCAL), // PicoJava nonpriv instructions LOAD_UBYTE(PICOJAVA, 0xfe00), LOAD_BYTE(PICOJAVA, 0xfe01), LOAD_CHAR(PICOJAVA, 0xfe02), LOAD_SHORT(PICOJAVA, 0xfe03), LOAD_WORD(PICOJAVA, 0xfe04), RET_FROM_SUB(PICOJAVA, 0xfe05), LOAD_CHAR_OE(PICOJAVA, 0xfe0a), LOAD_SHORT_OE(PICOJAVA, 0xfe0b), LOAD_WORD_OE(PICOJAVA, 0xfe0c), NCLOAD_UBYTE(PICOJAVA, 0xfe10), NCLOAD_BYTE(PICOJAVA, 0xfe11), NCLOAD_CHAR(PICOJAVA, 0xfe12), NCLOAD_SHORT(PICOJAVA, 0xfe13), NCLOAD_WORD(PICOJAVA, 0xfe14), NCLOAD_CHAR_OE(PICOJAVA, 0xfe1a), NCLOAD_SHORT_OE(PICOJAVA, 0xfe1b), NCLOAD_WORD_OE(PICOJAVA, 0xfe1c), CACHE_FLUSH(PICOJAVA, 0xfe1e), STORE_BYTE(PICOJAVA, 0xfe20), STORE_SHORT(PICOJAVA, 0xfe22), STORE_WORD(PICOJAVA, 0xfe24), STORE_SHORT_OE(PICOJAVA, 0xfe2a), STORE_WORD_OE(PICOJAVA, 0xfe2c), NCSTORE_BYTE(PICOJAVA, 0xfe30), NCSTORE_SHORT(PICOJAVA, 0xfe32), NCSTORE_WORD(PICOJAVA, 0xfe34), NCSTORE_SHORT_OE(PICOJAVA, 0xfe3a), NCSTORE_WORD_OE(PICOJAVA, 0xfe3c), ZERO_LINE(PICOJAVA, 0xfe3e), ENTER_SYNC_METHOD(PICOJAVA, 0xfe3f), // PicoJava priv instructions PRIV_LOAD_UBYTE(PICOJAVA, 0xff00), PRIV_LOAD_BYTE(PICOJAVA, 0xff01), PRIV_LOAD_CHAR(PICOJAVA, 0xff02), PRIV_LOAD_SHORT(PICOJAVA, 0xff03), PRIV_LOAD_WORD(PICOJAVA, 0xff04), PRIV_RET_FROM_TRAP(PICOJAVA, 0xff05), PRIV_READ_DCACHE_TAG(PICOJAVA, 0xff06), PRIV_READ_DCACHE_DATA(PICOJAVA, 0xff07), PRIV_LOAD_CHAR_OE(PICOJAVA, 0xff0a), PRIV_LOAD_SHORT_OE(PICOJAVA, 0xff0b), PRIV_LOAD_WORD_OE(PICOJAVA, 0xff0c), PRIV_READ_ICACHE_TAG(PICOJAVA, 0xff0e), PRIV_READ_ICACHE_DATA(PICOJAVA, 0xff0f), PRIV_NCLOAD_UBYTE(PICOJAVA, 0xff10), PRIV_NCLOAD_BYTE(PICOJAVA, 0xff11), PRIV_NCLOAD_CHAR(PICOJAVA, 0xff12), PRIV_NCLOAD_SHORT(PICOJAVA, 0xff13), PRIV_NCLOAD_WORD(PICOJAVA, 0xff14), PRIV_POWERDOWN(PICOJAVA, 0xff16), PRIV_READ_SCACHE_DATA(PICOJAVA, 0xff17), PRIV_NCLOAD_CHAR_OE(PICOJAVA, 0xff1a), PRIV_NCLOAD_SHORT_OE(PICOJAVA, 0xff1b), PRIV_NCLOAD_WORD_OE(PICOJAVA, 0xff1c), PRIV_CACHE_FLUSH(PICOJAVA, 0xff1e), PRIV_CACHE_INDEX_FLUSH(PICOJAVA, 0xff1f), PRIV_STORE_BYTE(PICOJAVA, 0xff20), PRIV_STORE_SHORT(PICOJAVA, 0xff22), PRIV_STORE_WORD(PICOJAVA, 0xff24), PRIV_WRITE_DCACHE_TAG(PICOJAVA, 0xff26), PRIV_WRITE_DCACHE_DATA(PICOJAVA, 0xff27), PRIV_STORE_SHORT_OE(PICOJAVA, 0xff2a), PRIV_STORE_WORD_OE(PICOJAVA, 0xff2c), PRIV_WRITE_ICACHE_TAG(PICOJAVA, 0xff2e), PRIV_WRITE_ICACHE_DATA(PICOJAVA, 0xff2f), PRIV_NCSTORE_BYTE(PICOJAVA, 0xff30), PRIV_NCSTORE_SHORT(PICOJAVA, 0xff32), PRIV_NCSTORE_WORD(PICOJAVA, 0xff34), PRIV_RESET(PICOJAVA, 0xff36), PRIV_WRITE_SCACHE_DATA(PICOJAVA, 0xff37), PRIV_NCSTORE_SHORT_OE(PICOJAVA, 0xff3a), PRIV_NCSTORE_WORD_OE(PICOJAVA, 0xff3c), PRIV_ZERO_LINE(PICOJAVA, 0xff3e), PRIV_READ_REG_0(PICOJAVA, 0xff40), PRIV_READ_REG_1(PICOJAVA, 0xff41), PRIV_READ_REG_2(PICOJAVA, 0xff42), PRIV_READ_REG_3(PICOJAVA, 0xff43), PRIV_READ_REG_4(PICOJAVA, 0xff44), PRIV_READ_REG_5(PICOJAVA, 0xff45), PRIV_READ_REG_6(PICOJAVA, 0xff46), PRIV_READ_REG_7(PICOJAVA, 0xff47), PRIV_READ_REG_8(PICOJAVA, 0xff48), PRIV_READ_REG_9(PICOJAVA, 0xff49), PRIV_READ_REG_10(PICOJAVA, 0xff4a), PRIV_READ_REG_11(PICOJAVA, 0xff4b), PRIV_READ_REG_12(PICOJAVA, 0xff4c), PRIV_READ_REG_13(PICOJAVA, 0xff4d), PRIV_READ_REG_14(PICOJAVA, 0xff4e), PRIV_READ_REG_15(PICOJAVA, 0xff4f), PRIV_READ_REG_16(PICOJAVA, 0xff50), PRIV_READ_REG_17(PICOJAVA, 0xff51), PRIV_READ_REG_18(PICOJAVA, 0xff52), PRIV_READ_REG_19(PICOJAVA, 0xff53), PRIV_READ_REG_20(PICOJAVA, 0xff54), PRIV_READ_REG_21(PICOJAVA, 0xff55), PRIV_READ_REG_22(PICOJAVA, 0xff56), PRIV_READ_REG_23(PICOJAVA, 0xff57), PRIV_READ_REG_24(PICOJAVA, 0xff58), PRIV_READ_REG_25(PICOJAVA, 0xff59), PRIV_READ_REG_26(PICOJAVA, 0xff5a), PRIV_READ_REG_27(PICOJAVA, 0xff5b), PRIV_READ_REG_28(PICOJAVA, 0xff5c), PRIV_READ_REG_29(PICOJAVA, 0xff5d), PRIV_READ_REG_30(PICOJAVA, 0xff5e), PRIV_READ_REG_31(PICOJAVA, 0xff5f), PRIV_WRITE_REG_0(PICOJAVA, 0xff60), PRIV_WRITE_REG_1(PICOJAVA, 0xff61), PRIV_WRITE_REG_2(PICOJAVA, 0xff62), PRIV_WRITE_REG_3(PICOJAVA, 0xff63), PRIV_WRITE_REG_4(PICOJAVA, 0xff64), PRIV_WRITE_REG_5(PICOJAVA, 0xff65), PRIV_WRITE_REG_6(PICOJAVA, 0xff66), PRIV_WRITE_REG_7(PICOJAVA, 0xff67), PRIV_WRITE_REG_8(PICOJAVA, 0xff68), PRIV_WRITE_REG_9(PICOJAVA, 0xff69), PRIV_WRITE_REG_10(PICOJAVA, 0xff6a), PRIV_WRITE_REG_11(PICOJAVA, 0xff6b), PRIV_WRITE_REG_12(PICOJAVA, 0xff6c), PRIV_WRITE_REG_13(PICOJAVA, 0xff6d), PRIV_WRITE_REG_14(PICOJAVA, 0xff6e), PRIV_WRITE_REG_15(PICOJAVA, 0xff6f), PRIV_WRITE_REG_16(PICOJAVA, 0xff70), PRIV_WRITE_REG_17(PICOJAVA, 0xff71), PRIV_WRITE_REG_18(PICOJAVA, 0xff72), PRIV_WRITE_REG_19(PICOJAVA, 0xff73), PRIV_WRITE_REG_20(PICOJAVA, 0xff74), PRIV_WRITE_REG_21(PICOJAVA, 0xff75), PRIV_WRITE_REG_22(PICOJAVA, 0xff76), PRIV_WRITE_REG_23(PICOJAVA, 0xff77), PRIV_WRITE_REG_24(PICOJAVA, 0xff78), PRIV_WRITE_REG_25(PICOJAVA, 0xff79), PRIV_WRITE_REG_26(PICOJAVA, 0xff7a), PRIV_WRITE_REG_27(PICOJAVA, 0xff7b), PRIV_WRITE_REG_28(PICOJAVA, 0xff7c), PRIV_WRITE_REG_29(PICOJAVA, 0xff7d), PRIV_WRITE_REG_30(PICOJAVA, 0xff7e), PRIV_WRITE_REG_31(PICOJAVA, 0xff7f); Opcode(int opcode) { this(STANDARD, opcode, NO_OPERANDS); } Opcode(int opcode, Instruction.Kind kind) { this(STANDARD, opcode, kind); } Opcode(Set set, int opcode) { this(set, opcode, (set == STANDARD ? NO_OPERANDS : WIDE_NO_OPERANDS)); } Opcode(Set set, int opcode, Instruction.Kind kind) { this.set = set; this.opcode = opcode; this.kind = kind; } public final Set set; public final int opcode; public final Instruction.Kind kind; /** Get the Opcode for a simple standard 1-byte opcode. */ public static Opcode get(int opcode) { return stdOpcodes[opcode]; } /** Get the Opcode for 1- or 2-byte opcode. */ public static Opcode get(int opcodePrefix, int opcode) { Opcode[] block = getOpcodeBlock(opcodePrefix); return (block == null ? null : block[opcode]); } private static Opcode[] getOpcodeBlock(int opcodePrefix) { switch (opcodePrefix) { case 0: return stdOpcodes; case WIDE: return wideOpcodes; case NONPRIV: return nonPrivOpcodes; case PRIV: return privOpcodes; default: return null; } } private static final Opcode[] stdOpcodes = new Opcode[256]; private static final Opcode[] wideOpcodes = new Opcode[256]; private static final Opcode[] nonPrivOpcodes = new Opcode[256]; private static final Opcode[] privOpcodes = new Opcode[256]; static { for (Opcode o: values()) getOpcodeBlock(o.opcode >> 8)[o.opcode & 0xff] = o; } /** The byte prefix for the wide instructions. */ public static final int WIDE = 0xc4; /** The byte prefix for the PicoJava nonpriv instructions. */ public static final int NONPRIV = 0xfe; /** The byte prefix for the PicoJava priv instructions. */ public static final int PRIV = 0xff; public enum Set { /** Standard opcodes. */ STANDARD, /** Legacy support for PicoJava opcodes. */ PICOJAVA }; } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/ReferenceFinder.java0000644000000000000000000002066612214026367030620 0ustar 00000000000000/* * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.classfile; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Objects; import java.util.Set; import com.sun.tools.classfile.Instruction.TypeKind; import static com.sun.tools.classfile.ConstantPool.*; /** * A utility class to find where in a ClassFile references * a {@link CONSTANT_Methodref_info method}, * a {@link CONSTANT_InterfaceMethodref_info interface method, * or a {@link CONSTANT_Fieldref_info field}. */ public final class ReferenceFinder { /** * Filter for ReferenceFinder of what constant pool entries for reference lookup. */ public interface Filter { /** * Decides if the given CPRefInfo entry should be accepted or filtered. * * @param cpool ConstantPool of the ClassFile being parsed * @param cpref constant pool entry representing a reference to * a fields method, and interface method. * @return {@code true} if accepted; otherwise {@code false} */ boolean accept(ConstantPool cpool, CPRefInfo cpref); } /** * Visitor of individual method of a ClassFile that references the * accepted field, method, or interface method references. */ public interface Visitor { /** * Invoked for a method containing one or more accepted CPRefInfo entries * * @param cf ClassFile * @param method Method that does the references the accepted references * @param refs Accepted constant pool method/field reference */ void visit(ClassFile cf, Method method, List refConstantPool); } private final Filter filter; private final Visitor visitor; /** * Constructor. */ public ReferenceFinder(Filter filter, Visitor visitor) { this.filter = Objects.requireNonNull(filter); this.visitor = Objects.requireNonNull(visitor); } /** * Parses a given ClassFile and invoke the visitor if there is any reference * to the constant pool entries referencing field, method, or * interface method that are accepted. This method will return * {@code true} if there is one or more accepted constant pool entries * to lookup; otherwise, it will return {@code false}. * * @param cf ClassFile * @return {@code true} if the given class file is processed to lookup * references * @throws ConstantPoolException if an error of the constant pool */ public boolean parse(ClassFile cf) throws ConstantPoolException { List cprefs = new ArrayList(); int index = 1; for (ConstantPool.CPInfo cpInfo : cf.constant_pool.entries()) { if (cpInfo.accept(cpVisitor, cf.constant_pool)) { cprefs.add(index); } index += cpInfo.size(); } if (cprefs.isEmpty()) { return false; } for (Method m : cf.methods) { Set ids = new HashSet(); Code_attribute c_attr = (Code_attribute) m.attributes.get(Attribute.Code); if (c_attr != null) { for (Instruction instr : c_attr.getInstructions()) { int idx = instr.accept(codeVisitor, cprefs); if (idx > 0) { ids.add(idx); } } } if (ids.size() > 0) { List refInfos = new ArrayList(ids.size()); for (int id : ids) { refInfos.add(CPRefInfo.class.cast(cf.constant_pool.get(id))); } visitor.visit(cf, m, refInfos); } } return true; } private ConstantPool.Visitor cpVisitor = new ConstantPool.Visitor() { public Boolean visitClass(CONSTANT_Class_info info, ConstantPool cpool) { return false; } public Boolean visitInterfaceMethodref(CONSTANT_InterfaceMethodref_info info, ConstantPool cpool) { return filter.accept(cpool, info); } public Boolean visitMethodref(CONSTANT_Methodref_info info, ConstantPool cpool) { return filter.accept(cpool, info); } public Boolean visitFieldref(CONSTANT_Fieldref_info info, ConstantPool cpool) { return filter.accept(cpool, info); } public Boolean visitDouble(CONSTANT_Double_info info, ConstantPool cpool) { return false; } public Boolean visitFloat(CONSTANT_Float_info info, ConstantPool cpool) { return false; } public Boolean visitInteger(CONSTANT_Integer_info info, ConstantPool cpool) { return false; } public Boolean visitInvokeDynamic(CONSTANT_InvokeDynamic_info info, ConstantPool cpool) { return false; } public Boolean visitLong(CONSTANT_Long_info info, ConstantPool cpool) { return false; } public Boolean visitNameAndType(CONSTANT_NameAndType_info info, ConstantPool cpool) { return false; } public Boolean visitMethodHandle(CONSTANT_MethodHandle_info info, ConstantPool cpool) { return false; } public Boolean visitMethodType(CONSTANT_MethodType_info info, ConstantPool cpool) { return false; } public Boolean visitString(CONSTANT_String_info info, ConstantPool cpool) { return false; } public Boolean visitUtf8(CONSTANT_Utf8_info info, ConstantPool cpool) { return false; } }; private Instruction.KindVisitor> codeVisitor = new Instruction.KindVisitor>() { public Integer visitNoOperands(Instruction instr, List p) { return 0; } public Integer visitArrayType(Instruction instr, TypeKind kind, List p) { return 0; } public Integer visitBranch(Instruction instr, int offset, List p) { return 0; } public Integer visitConstantPoolRef(Instruction instr, int index, List p) { return p.contains(index) ? index : 0; } public Integer visitConstantPoolRefAndValue(Instruction instr, int index, int value, List p) { return p.contains(index) ? index : 0; } public Integer visitLocal(Instruction instr, int index, List p) { return 0; } public Integer visitLocalAndValue(Instruction instr, int index, int value, List p) { return 0; } public Integer visitLookupSwitch(Instruction instr, int default_, int npairs, int[] matches, int[] offsets, List p) { return 0; } public Integer visitTableSwitch(Instruction instr, int default_, int low, int high, int[] offsets, List p) { return 0; } public Integer visitValue(Instruction instr, int value, List p) { return 0; } public Integer visitUnknown(Instruction instr, List p) { return 0; } }; } ././@LongLink0000000000000000000000000000015300000000000011214 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/RuntimeAnnotations_attribute.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/RuntimeAnnotations_attribut0000644000000000000000000000455712214026367032432 0ustar 00000000000000/* * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.classfile; import java.io.IOException; /** * See JVMS, section 4.8.16 and 4.8.17. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. */ public abstract class RuntimeAnnotations_attribute extends Attribute { protected RuntimeAnnotations_attribute(ClassReader cr, int name_index, int length) throws IOException, Annotation.InvalidAnnotation { super(name_index, length); int num_annotations = cr.readUnsignedShort(); annotations = new Annotation[num_annotations]; for (int i = 0; i < annotations.length; i++) annotations[i] = new Annotation(cr); } protected RuntimeAnnotations_attribute(int name_index, Annotation[] annotations) { super(name_index, length(annotations)); this.annotations = annotations; } private static int length(Annotation[] annos) { int n = 2; for (Annotation anno: annos) n += anno.length(); return n; } public final Annotation[] annotations; } ././@LongLink0000000000000000000000000000016400000000000011216 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/RuntimeInvisibleAnnotations_attribute.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/RuntimeInvisibleAnnotations0000644000000000000000000000440512214026367032351 0ustar 00000000000000/* * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.classfile; import java.io.IOException; /** * See JVMS, section 4.8.17. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. */ public class RuntimeInvisibleAnnotations_attribute extends RuntimeAnnotations_attribute { RuntimeInvisibleAnnotations_attribute(ClassReader cr, int name_index, int length) throws IOException, AttributeException { super(cr, name_index, length); } public RuntimeInvisibleAnnotations_attribute(ConstantPool cp, Annotation[] annotations) throws ConstantPoolException { this(cp.getUTF8Index(Attribute.RuntimeInvisibleAnnotations), annotations); } public RuntimeInvisibleAnnotations_attribute(int name_index, Annotation[] annotations) { super(name_index, annotations); } public R accept(Visitor visitor, P p) { return visitor.visitRuntimeInvisibleAnnotations(this, p); } } ././@LongLink0000000000000000000000000000017500000000000011220 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/RuntimeInvisibleParameterAnnotations_attribute.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/RuntimeInvisibleParameterAn0000644000000000000000000000457212214026367032260 0ustar 00000000000000/* * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.classfile; import java.io.IOException; /** * See JVMS, section 4.8.18. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. */ public class RuntimeInvisibleParameterAnnotations_attribute extends RuntimeParameterAnnotations_attribute { RuntimeInvisibleParameterAnnotations_attribute(ClassReader cr, int name_index, int length) throws IOException, Annotation.InvalidAnnotation { super(cr, name_index, length); } public RuntimeInvisibleParameterAnnotations_attribute(ConstantPool cp, Annotation[][] parameter_annotations) throws ConstantPoolException { this(cp.getUTF8Index(Attribute.RuntimeInvisibleParameterAnnotations), parameter_annotations); } public RuntimeInvisibleParameterAnnotations_attribute(int name_index, Annotation[][] parameter_annotations) { super(name_index, parameter_annotations); } public R accept(Visitor visitor, P p) { return visitor.visitRuntimeInvisibleParameterAnnotations(this, p); } } ././@LongLink0000000000000000000000000000017000000000000011213 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/RuntimeInvisibleTypeAnnotations_attribute.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/RuntimeInvisibleTypeAnnotat0000644000000000000000000000447712214026367032333 0ustar 00000000000000/* * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.classfile; import java.io.IOException; /** * See JSR 308 specification, Section 3. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. */ public class RuntimeInvisibleTypeAnnotations_attribute extends RuntimeTypeAnnotations_attribute { RuntimeInvisibleTypeAnnotations_attribute(ClassReader cr, int name_index, int length) throws IOException, Annotation.InvalidAnnotation { super(cr, name_index, length); } public RuntimeInvisibleTypeAnnotations_attribute(ConstantPool cp, TypeAnnotation[] annotations) throws ConstantPoolException { this(cp.getUTF8Index(Attribute.RuntimeInvisibleTypeAnnotations), annotations); } public RuntimeInvisibleTypeAnnotations_attribute(int name_index, TypeAnnotation[] annotations) { super(name_index, annotations); } public R accept(Visitor visitor, P p) { return visitor.visitRuntimeInvisibleTypeAnnotations(this, p); } } ././@LongLink0000000000000000000000000000016400000000000011216 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/RuntimeParameterAnnotations_attribute.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/RuntimeParameterAnnotations0000644000000000000000000000545612214026367032354 0ustar 00000000000000/* * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.classfile; import java.io.IOException; /** * See JVMS, section 4.8.18 and 4.8.19. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. */ public abstract class RuntimeParameterAnnotations_attribute extends Attribute { RuntimeParameterAnnotations_attribute(ClassReader cr, int name_index, int length) throws IOException, Annotation.InvalidAnnotation { super(name_index, length); int num_parameters = cr.readUnsignedByte(); parameter_annotations = new Annotation[num_parameters][]; for (int p = 0; p < parameter_annotations.length; p++) { int num_annotations = cr.readUnsignedShort(); Annotation[] annotations = new Annotation[num_annotations]; for (int i = 0; i < num_annotations; i++) annotations[i] = new Annotation(cr); parameter_annotations[p] = annotations; } } protected RuntimeParameterAnnotations_attribute(int name_index, Annotation[][] parameter_annotations) { super(name_index, length(parameter_annotations)); this.parameter_annotations = parameter_annotations; } private static int length(Annotation[][] anno_arrays) { int n = 1; for (Annotation[] anno_array: anno_arrays) { n += 2; for (Annotation anno: anno_array) n += anno.length(); } return n; } public final Annotation[][] parameter_annotations; } ././@LongLink0000000000000000000000000000015700000000000011220 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/RuntimeTypeAnnotations_attribute.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/RuntimeTypeAnnotations_attr0000644000000000000000000000462412214026367032403 0ustar 00000000000000/* * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.classfile; import java.io.IOException; /** * See JSR 308 specification, Section 3. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. */ public abstract class RuntimeTypeAnnotations_attribute extends Attribute { protected RuntimeTypeAnnotations_attribute(ClassReader cr, int name_index, int length) throws IOException, Annotation.InvalidAnnotation { super(name_index, length); int num_annotations = cr.readUnsignedShort(); annotations = new TypeAnnotation[num_annotations]; for (int i = 0; i < annotations.length; i++) annotations[i] = new TypeAnnotation(cr); } protected RuntimeTypeAnnotations_attribute(int name_index, TypeAnnotation[] annotations) { super(name_index, length(annotations)); this.annotations = annotations; } private static int length(TypeAnnotation[] annos) { int n = 2; for (TypeAnnotation anno: annos) n += anno.length(); return n; } public final TypeAnnotation[] annotations; } ././@LongLink0000000000000000000000000000016200000000000011214 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/RuntimeVisibleAnnotations_attribute.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/RuntimeVisibleAnnotations_a0000644000000000000000000000440312214026367032320 0ustar 00000000000000/* * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.classfile; import java.io.IOException; /** * See JVMS, section 4.8.16. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. */ public class RuntimeVisibleAnnotations_attribute extends RuntimeAnnotations_attribute { RuntimeVisibleAnnotations_attribute(ClassReader cr, int name_index, int length) throws IOException, Annotation.InvalidAnnotation { super(cr, name_index, length); } public RuntimeVisibleAnnotations_attribute(ConstantPool cp, Annotation[] annotations) throws ConstantPoolException { this(cp.getUTF8Index(Attribute.RuntimeVisibleAnnotations), annotations); } public RuntimeVisibleAnnotations_attribute(int name_index, Annotation[] annotations) { super(name_index, annotations); } public R accept(Visitor visitor, P p) { return visitor.visitRuntimeVisibleAnnotations(this, p); } } ././@LongLink0000000000000000000000000000017300000000000011216 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/RuntimeVisibleParameterAnnotations_attribute.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/RuntimeVisibleParameterAnno0000644000000000000000000000455612214026367032270 0ustar 00000000000000/* * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.classfile; import java.io.IOException; /** * See JVMS, section 4.8.18. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. */ public class RuntimeVisibleParameterAnnotations_attribute extends RuntimeParameterAnnotations_attribute { RuntimeVisibleParameterAnnotations_attribute(ClassReader cr, int name_index, int length) throws IOException, Annotation.InvalidAnnotation { super(cr, name_index, length); } public RuntimeVisibleParameterAnnotations_attribute(ConstantPool cp, Annotation[][] parameter_annotations) throws ConstantPoolException { this(cp.getUTF8Index(Attribute.RuntimeVisibleParameterAnnotations), parameter_annotations); } public RuntimeVisibleParameterAnnotations_attribute(int name_index, Annotation[][] parameter_annotations) { super(name_index, parameter_annotations); } public R accept(Visitor visitor, P p) { return visitor.visitRuntimeVisibleParameterAnnotations(this, p); } } ././@LongLink0000000000000000000000000000016600000000000011220 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/RuntimeVisibleTypeAnnotations_attribute.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/RuntimeVisibleTypeAnnotatio0000644000000000000000000000446312214026367032327 0ustar 00000000000000/* * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.classfile; import java.io.IOException; /** * See JSR 308 specification, Section 3. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. */ public class RuntimeVisibleTypeAnnotations_attribute extends RuntimeTypeAnnotations_attribute { RuntimeVisibleTypeAnnotations_attribute(ClassReader cr, int name_index, int length) throws IOException, Annotation.InvalidAnnotation { super(cr, name_index, length); } public RuntimeVisibleTypeAnnotations_attribute(ConstantPool cp, TypeAnnotation[] annotations) throws ConstantPoolException { this(cp.getUTF8Index(Attribute.RuntimeVisibleTypeAnnotations), annotations); } public RuntimeVisibleTypeAnnotations_attribute(int name_index, TypeAnnotation[] annotations) { super(name_index, annotations); } public R accept(Visitor visitor, P p) { return visitor.visitRuntimeVisibleTypeAnnotations(this, p); } } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/Signature.java0000644000000000000000000002040512214026367027522 0ustar 00000000000000/* * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.classfile; import java.util.ArrayList; import java.util.List; import com.sun.tools.classfile.Type.*; /** * See JVMS 4.4.4. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. */ public class Signature extends Descriptor { public Signature(int index) { super(index); } public Type getType(ConstantPool constant_pool) throws ConstantPoolException { if (type == null) type = parse(getValue(constant_pool)); return type; } @Override public int getParameterCount(ConstantPool constant_pool) throws ConstantPoolException { MethodType m = (MethodType) getType(constant_pool); return m.paramTypes.size(); } @Override public String getParameterTypes(ConstantPool constant_pool) throws ConstantPoolException { MethodType m = (MethodType) getType(constant_pool); StringBuilder sb = new StringBuilder(); sb.append("("); String sep = ""; for (Type paramType: m.paramTypes) { sb.append(sep); sb.append(paramType); sep = ", "; } sb.append(")"); return sb.toString(); } @Override public String getReturnType(ConstantPool constant_pool) throws ConstantPoolException { MethodType m = (MethodType) getType(constant_pool); return m.returnType.toString(); } @Override public String getFieldType(ConstantPool constant_pool) throws ConstantPoolException { return getType(constant_pool).toString(); } private Type parse(String sig) { this.sig = sig; sigp = 0; List typeParamTypes = null; if (sig.charAt(sigp) == '<') typeParamTypes = parseTypeParamTypes(); if (sig.charAt(sigp) == '(') { List paramTypes = parseTypeSignatures(')'); Type returnType = parseTypeSignature(); List throwsTypes = null; while (sigp < sig.length() && sig.charAt(sigp) == '^') { sigp++; if (throwsTypes == null) throwsTypes = new ArrayList(); throwsTypes.add(parseTypeSignature()); } return new MethodType(typeParamTypes, paramTypes, returnType, throwsTypes); } else { Type t = parseTypeSignature(); if (typeParamTypes == null && sigp == sig.length()) return t; Type superclass = t; List superinterfaces = null; while (sigp < sig.length()) { if (superinterfaces == null) superinterfaces = new ArrayList(); superinterfaces.add(parseTypeSignature()); } return new ClassSigType(typeParamTypes, superclass, superinterfaces); } } private Type parseTypeSignature() { switch (sig.charAt(sigp)) { case 'B': sigp++; return new SimpleType("byte"); case 'C': sigp++; return new SimpleType("char"); case 'D': sigp++; return new SimpleType("double"); case 'F': sigp++; return new SimpleType("float"); case 'I': sigp++; return new SimpleType("int"); case 'J': sigp++; return new SimpleType("long"); case 'L': return parseClassTypeSignature(); case 'S': sigp++; return new SimpleType("short"); case 'T': return parseTypeVariableSignature(); case 'V': sigp++; return new SimpleType("void"); case 'Z': sigp++; return new SimpleType("boolean"); case '[': sigp++; return new ArrayType(parseTypeSignature()); case '*': sigp++; return new WildcardType(); case '+': sigp++; return new WildcardType(WildcardType.Kind.EXTENDS, parseTypeSignature()); case '-': sigp++; return new WildcardType(WildcardType.Kind.SUPER, parseTypeSignature()); default: throw new IllegalStateException(debugInfo()); } } private List parseTypeSignatures(char term) { sigp++; List types = new ArrayList(); while (sig.charAt(sigp) != term) types.add(parseTypeSignature()); sigp++; return types; } private Type parseClassTypeSignature() { assert sig.charAt(sigp) == 'L'; sigp++; return parseClassTypeSignatureRest(); } private Type parseClassTypeSignatureRest() { StringBuilder sb = new StringBuilder(); List argTypes = null; ClassType t = null; char sigch ; do { switch (sigch = sig.charAt(sigp)) { case '<': argTypes = parseTypeSignatures('>'); break; case '.': case ';': sigp++; t = new ClassType(t, sb.toString(), argTypes); sb.setLength(0); argTypes = null; break; default: sigp++; sb.append(sigch); break; } } while (sigch != ';'); return t; } private List parseTypeParamTypes() { assert sig.charAt(sigp) == '<'; sigp++; List types = new ArrayList(); while (sig.charAt(sigp) != '>') types.add(parseTypeParamType()); sigp++; return types; } private TypeParamType parseTypeParamType() { int sep = sig.indexOf(":", sigp); String name = sig.substring(sigp, sep); Type classBound = null; List interfaceBounds = null; sigp = sep + 1; if (sig.charAt(sigp) != ':') classBound = parseTypeSignature(); while (sig.charAt(sigp) == ':') { sigp++; if (interfaceBounds == null) interfaceBounds = new ArrayList(); interfaceBounds.add(parseTypeSignature()); } return new TypeParamType(name, classBound, interfaceBounds); } private Type parseTypeVariableSignature() { sigp++; int sep = sig.indexOf(';', sigp); Type t = new SimpleType(sig.substring(sigp, sep)); sigp = sep + 1; return t; } private String debugInfo() { return sig.substring(0, sigp) + "!" + sig.charAt(sigp) + "!" + sig.substring(sigp+1); } private String sig; private int sigp; private Type type; } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/Signature_attribute.java0000644000000000000000000000476512214026367031620 0ustar 00000000000000/* * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.classfile; import java.io.IOException; /** * See JVMS, section 4.8.9. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. */ public class Signature_attribute extends Attribute { Signature_attribute(ClassReader cr, int name_index, int length) throws IOException { super(name_index, length); signature_index = cr.readUnsignedShort(); } public Signature_attribute(ConstantPool constant_pool, int signature_index) throws ConstantPoolException { this(constant_pool.getUTF8Index(Attribute.Signature), signature_index); } public Signature_attribute(int name_index, int signature_index) { super(name_index, 2); this.signature_index = signature_index; } public String getSignature(ConstantPool constant_pool) throws ConstantPoolException { return constant_pool.getUTF8Value(signature_index); } public Signature getParsedSignature() { return new Signature(signature_index); } public R accept(Visitor visitor, D data) { return visitor.visitSignature(this, data); } public final int signature_index; } ././@LongLink0000000000000000000000000000015500000000000011216 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/SourceDebugExtension_attribute.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/SourceDebugExtension_attrib0000644000000000000000000000520312214026367032311 0ustar 00000000000000/* * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.classfile; import java.io.ByteArrayInputStream; import java.io.DataInputStream; import java.io.IOException; import java.nio.charset.Charset; /** * See JVMS, section 4.8.15. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. */ public class SourceDebugExtension_attribute extends Attribute { private static final Charset UTF8 = Charset.forName("UTF-8"); SourceDebugExtension_attribute(ClassReader cr, int name_index, int length) throws IOException { super(name_index, length); debug_extension = new byte[attribute_length]; cr.readFully(debug_extension); } public SourceDebugExtension_attribute(ConstantPool constant_pool, byte[] debug_extension) throws ConstantPoolException { this(constant_pool.getUTF8Index(Attribute.SourceDebugExtension), debug_extension); } public SourceDebugExtension_attribute(int name_index, byte[] debug_extension) { super(name_index, debug_extension.length); this.debug_extension = debug_extension; } public String getValue() { return new String(debug_extension, UTF8); } public R accept(Visitor visitor, D data) { return visitor.visitSourceDebugExtension(this, data); } public final byte[] debug_extension; } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/SourceFile_attribute.java0000644000000000000000000000463512214026367031713 0ustar 00000000000000/* * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.classfile; import java.io.IOException; /** * See JVMS, section 4.8.10. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. */ public class SourceFile_attribute extends Attribute { SourceFile_attribute(ClassReader cr, int name_index, int length) throws IOException { super(name_index, length); sourcefile_index = cr.readUnsignedShort(); } public SourceFile_attribute(ConstantPool constant_pool, int sourcefile_index) throws ConstantPoolException { this(constant_pool.getUTF8Index(Attribute.SourceFile), sourcefile_index); } public SourceFile_attribute(int name_index, int sourcefile_index) { super(name_index, 2); this.sourcefile_index = sourcefile_index; } public String getSourceFile(ConstantPool constant_pool) throws ConstantPoolException { return constant_pool.getUTF8Value(sourcefile_index); } public R accept(Visitor visitor, P p) { return visitor.visitSourceFile(this, p); } public final int sourcefile_index; } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/SourceID_attribute.java0000644000000000000000000000453012214026367031322 0ustar 00000000000000/* * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.classfile; import java.io.IOException; /** *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. */ public class SourceID_attribute extends Attribute { SourceID_attribute(ClassReader cr, int name_index, int length) throws IOException { super(name_index, length); sourceID_index = cr.readUnsignedShort(); } public SourceID_attribute(ConstantPool constant_pool, int sourceID_index) throws ConstantPoolException { this(constant_pool.getUTF8Index(Attribute.SourceID), sourceID_index); } public SourceID_attribute(int name_index, int sourceID_index) { super(name_index, 2); this.sourceID_index = sourceID_index; } String getSourceID(ConstantPool constant_pool) throws ConstantPoolException { return constant_pool.getUTF8Value(sourceID_index); } public R accept(Visitor visitor, D data) { return visitor.visitSourceID(this, data); } public final int sourceID_index; } ././@LongLink0000000000000000000000000000014600000000000011216 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/StackMapTable_attribute.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/StackMapTable_attribute.jav0000644000000000000000000003104512214026367032160 0ustar 00000000000000/* * Copyright (c) 2007, 2009, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.classfile; import java.io.IOException; /** * See JVMS, section 4.8.4. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. */ public class StackMapTable_attribute extends Attribute { static class InvalidStackMap extends AttributeException { private static final long serialVersionUID = -5659038410855089780L; InvalidStackMap(String msg) { super(msg); } } StackMapTable_attribute(ClassReader cr, int name_index, int length) throws IOException, InvalidStackMap { super(name_index, length); number_of_entries = cr.readUnsignedShort(); entries = new stack_map_frame[number_of_entries]; for (int i = 0; i < number_of_entries; i++) entries[i] = stack_map_frame.read(cr); } public StackMapTable_attribute(ConstantPool constant_pool, stack_map_frame[] entries) throws ConstantPoolException { this(constant_pool.getUTF8Index(Attribute.StackMapTable), entries); } public StackMapTable_attribute(int name_index, stack_map_frame[] entries) { super(name_index, length(entries)); this.number_of_entries = entries.length; this.entries = entries; } public R accept(Visitor visitor, D data) { return visitor.visitStackMapTable(this, data); } static int length(stack_map_frame[] entries) { int n = 2; for (stack_map_frame entry: entries) n += entry.length(); return n; } public final int number_of_entries; public final stack_map_frame entries[]; public static abstract class stack_map_frame { static stack_map_frame read(ClassReader cr) throws IOException, InvalidStackMap { int frame_type = cr.readUnsignedByte(); if (frame_type <= 63) return new same_frame(frame_type); else if (frame_type <= 127) return new same_locals_1_stack_item_frame(frame_type, cr); else if (frame_type <= 246) throw new Error("unknown frame_type " + frame_type); else if (frame_type == 247) return new same_locals_1_stack_item_frame_extended(frame_type, cr); else if (frame_type <= 250) return new chop_frame(frame_type, cr); else if (frame_type == 251) return new same_frame_extended(frame_type, cr); else if (frame_type <= 254) return new append_frame(frame_type, cr); else return new full_frame(frame_type, cr); } protected stack_map_frame(int frame_type) { this.frame_type = frame_type; } public int length() { return 1; } public abstract int getOffsetDelta(); public abstract R accept(Visitor visitor, D data); public final int frame_type; public static interface Visitor { R visit_same_frame(same_frame frame, P p); R visit_same_locals_1_stack_item_frame(same_locals_1_stack_item_frame frame, P p); R visit_same_locals_1_stack_item_frame_extended(same_locals_1_stack_item_frame_extended frame, P p); R visit_chop_frame(chop_frame frame, P p); R visit_same_frame_extended(same_frame_extended frame, P p); R visit_append_frame(append_frame frame, P p); R visit_full_frame(full_frame frame, P p); } } public static class same_frame extends stack_map_frame { same_frame(int frame_type) { super(frame_type); } public R accept(Visitor visitor, D data) { return visitor.visit_same_frame(this, data); } public int getOffsetDelta() { return frame_type; } } public static class same_locals_1_stack_item_frame extends stack_map_frame { same_locals_1_stack_item_frame(int frame_type, ClassReader cr) throws IOException, InvalidStackMap { super(frame_type); stack = new verification_type_info[1]; stack[0] = verification_type_info.read(cr); } @Override public int length() { return super.length() + stack[0].length(); } public R accept(Visitor visitor, D data) { return visitor.visit_same_locals_1_stack_item_frame(this, data); } public int getOffsetDelta() { return frame_type - 64; } public final verification_type_info[] stack; } public static class same_locals_1_stack_item_frame_extended extends stack_map_frame { same_locals_1_stack_item_frame_extended(int frame_type, ClassReader cr) throws IOException, InvalidStackMap { super(frame_type); offset_delta = cr.readUnsignedShort(); stack = new verification_type_info[1]; stack[0] = verification_type_info.read(cr); } @Override public int length() { return super.length() + 2 + stack[0].length(); } public R accept(Visitor visitor, D data) { return visitor.visit_same_locals_1_stack_item_frame_extended(this, data); } public int getOffsetDelta() { return offset_delta; } public final int offset_delta; public final verification_type_info[] stack; } public static class chop_frame extends stack_map_frame { chop_frame(int frame_type, ClassReader cr) throws IOException { super(frame_type); offset_delta = cr.readUnsignedShort(); } @Override public int length() { return super.length() + 2; } public R accept(Visitor visitor, D data) { return visitor.visit_chop_frame(this, data); } public int getOffsetDelta() { return offset_delta; } public final int offset_delta; } public static class same_frame_extended extends stack_map_frame { same_frame_extended(int frame_type, ClassReader cr) throws IOException { super(frame_type); offset_delta = cr.readUnsignedShort(); } @Override public int length() { return super.length() + 2; } public R accept(Visitor visitor, D data) { return visitor.visit_same_frame_extended(this, data); } public int getOffsetDelta() { return offset_delta; } public final int offset_delta; } public static class append_frame extends stack_map_frame { append_frame(int frame_type, ClassReader cr) throws IOException, InvalidStackMap { super(frame_type); offset_delta = cr.readUnsignedShort(); locals = new verification_type_info[frame_type - 251]; for (int i = 0; i < locals.length; i++) locals[i] = verification_type_info.read(cr); } @Override public int length() { int n = super.length() + 2; for (verification_type_info local: locals) n += local.length(); return n; } public R accept(Visitor visitor, D data) { return visitor.visit_append_frame(this, data); } public int getOffsetDelta() { return offset_delta; } public final int offset_delta; public final verification_type_info[] locals; } public static class full_frame extends stack_map_frame { full_frame(int frame_type, ClassReader cr) throws IOException, InvalidStackMap { super(frame_type); offset_delta = cr.readUnsignedShort(); number_of_locals = cr.readUnsignedShort(); locals = new verification_type_info[number_of_locals]; for (int i = 0; i < locals.length; i++) locals[i] = verification_type_info.read(cr); number_of_stack_items = cr.readUnsignedShort(); stack = new verification_type_info[number_of_stack_items]; for (int i = 0; i < stack.length; i++) stack[i] = verification_type_info.read(cr); } @Override public int length() { int n = super.length() + 2; for (verification_type_info local: locals) n += local.length(); n += 2; for (verification_type_info item: stack) n += item.length(); return n; } public R accept(Visitor visitor, D data) { return visitor.visit_full_frame(this, data); } public int getOffsetDelta() { return offset_delta; } public final int offset_delta; public final int number_of_locals; public final verification_type_info[] locals; public final int number_of_stack_items; public final verification_type_info[] stack; } public static class verification_type_info { public static final int ITEM_Top = 0; public static final int ITEM_Integer = 1; public static final int ITEM_Float = 2; public static final int ITEM_Long = 4; public static final int ITEM_Double = 3; public static final int ITEM_Null = 5; public static final int ITEM_UninitializedThis = 6; public static final int ITEM_Object = 7; public static final int ITEM_Uninitialized = 8; static verification_type_info read(ClassReader cr) throws IOException, InvalidStackMap { int tag = cr.readUnsignedByte(); switch (tag) { case ITEM_Top: case ITEM_Integer: case ITEM_Float: case ITEM_Long: case ITEM_Double: case ITEM_Null: case ITEM_UninitializedThis: return new verification_type_info(tag); case ITEM_Object: return new Object_variable_info(cr); case ITEM_Uninitialized: return new Uninitialized_variable_info(cr); default: throw new InvalidStackMap("unrecognized verification_type_info tag"); } } protected verification_type_info(int tag) { this.tag = tag; } public int length() { return 1; } public final int tag; } public static class Object_variable_info extends verification_type_info { Object_variable_info(ClassReader cr) throws IOException { super(ITEM_Object); cpool_index = cr.readUnsignedShort(); } @Override public int length() { return super.length() + 2; } public final int cpool_index; } public static class Uninitialized_variable_info extends verification_type_info { Uninitialized_variable_info(ClassReader cr) throws IOException { super(ITEM_Uninitialized); offset = cr.readUnsignedShort(); } @Override public int length() { return super.length() + 2; } public final int offset; } } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/StackMap_attribute.java0000644000000000000000000000543112214026367031351 0ustar 00000000000000/* * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.classfile; import java.io.IOException; /** *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. */ public class StackMap_attribute extends Attribute { StackMap_attribute(ClassReader cr, int name_index, int length) throws IOException, StackMapTable_attribute.InvalidStackMap { super(name_index, length); number_of_entries = cr.readUnsignedShort(); entries = new stack_map_frame[number_of_entries]; for (int i = 0; i < number_of_entries; i++) entries[i] = new stack_map_frame(cr); } public StackMap_attribute(ConstantPool constant_pool, stack_map_frame[] entries) throws ConstantPoolException { this(constant_pool.getUTF8Index(Attribute.StackMap), entries); } public StackMap_attribute(int name_index, stack_map_frame[] entries) { super(name_index, StackMapTable_attribute.length(entries)); this.number_of_entries = entries.length; this.entries = entries; } public R accept(Visitor visitor, D data) { return visitor.visitStackMap(this, data); } public final int number_of_entries; public final stack_map_frame entries[]; public static class stack_map_frame extends StackMapTable_attribute.full_frame { stack_map_frame(ClassReader cr) throws IOException, StackMapTable_attribute.InvalidStackMap { super(255, cr); } } } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/Synthetic_attribute.java0000644000000000000000000000406212214026367031617 0ustar 00000000000000/* * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.classfile; import java.io.IOException; /** * See JVMS, section 4.8.8. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. */ public class Synthetic_attribute extends Attribute { Synthetic_attribute(ClassReader cr, int name_index, int length) throws IOException { super(name_index, length); } public Synthetic_attribute(ConstantPool constant_pool) throws ConstantPoolException { this(constant_pool.getUTF8Index(Attribute.Synthetic)); } public Synthetic_attribute(int name_index) { super(name_index, 0); } public R accept(Visitor visitor, D data) { return visitor.visitSynthetic(this, data); } } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/Type.java0000644000000000000000000003024212214026367026502 0ustar 00000000000000/* * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.classfile; import java.util.Arrays; import java.util.HashSet; import java.util.List; import java.util.Set; /* * Family of classes used to represent the parsed form of a {@link Descriptor} * or {@link Signature}. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. */ public abstract class Type { protected Type() { } public boolean isObject() { return false; } public abstract R accept(Visitor visitor, D data); protected static void append(StringBuilder sb, String prefix, List types, String suffix) { sb.append(prefix); String sep = ""; for (Type t: types) { sb.append(sep); sb.append(t); sep = ", "; } sb.append(suffix); } protected static void appendIfNotEmpty(StringBuilder sb, String prefix, List types, String suffix) { if (types != null && types.size() > 0) append(sb, prefix, types, suffix); } public interface Visitor { R visitSimpleType(SimpleType type, P p); R visitArrayType(ArrayType type, P p); R visitMethodType(MethodType type, P p); R visitClassSigType(ClassSigType type, P p); R visitClassType(ClassType type, P p); R visitTypeParamType(TypeParamType type, P p); R visitWildcardType(WildcardType type, P p); } /** * Represents a type signature with a simple name. The name may be that of a * primitive type, such "{@code int}, {@code float}, etc * or that of a type argument, such as {@code T}, {@code K}, {@code V}, etc. * * See: * JVMS 4.3.2 * BaseType: * {@code B}, {@code C}, {@code D}, {@code F}, {@code I}, * {@code J}, {@code S}, {@code Z}; * VoidDescriptor: * {@code V}; * JVMS 4.3.4 * TypeVariableSignature: * {@code T} Identifier {@code ;} */ public static class SimpleType extends Type { public SimpleType(String name) { this.name = name; } public R accept(Visitor visitor, D data) { return visitor.visitSimpleType(this, data); } public boolean isPrimitiveType() { return primitiveTypes.contains(name); } // where private static final Set primitiveTypes = new HashSet(Arrays.asList( "boolean", "byte", "char", "double", "float", "int", "long", "short", "void")); @Override public String toString() { return name; } public final String name; } /** * Represents an array type signature. * * See: * JVMS 4.3.4 * ArrayTypeSignature: * {@code [} TypeSignature {@code ]} */ public static class ArrayType extends Type { public ArrayType(Type elemType) { this.elemType = elemType; } public R accept(Visitor visitor, D data) { return visitor.visitArrayType(this, data); } @Override public String toString() { return elemType + "[]"; } public final Type elemType; } /** * Represents a method type signature. * * See; * JVMS 4.3.4 * MethodTypeSignature: * FormalTypeParameters_opt {@code (} TypeSignature* {@code)} ReturnType * ThrowsSignature* */ public static class MethodType extends Type { public MethodType(List paramTypes, Type resultType) { this(null, paramTypes, resultType, null); } public MethodType(List typeParamTypes, List paramTypes, Type returnType, List throwsTypes) { this.typeParamTypes = typeParamTypes; this.paramTypes = paramTypes; this.returnType = returnType; this.throwsTypes = throwsTypes; } public R accept(Visitor visitor, D data) { return visitor.visitMethodType(this, data); } @Override public String toString() { StringBuilder sb = new StringBuilder(); appendIfNotEmpty(sb, "<", typeParamTypes, "> "); sb.append(returnType); append(sb, " (", paramTypes, ")"); appendIfNotEmpty(sb, " throws ", throwsTypes, ""); return sb.toString(); } public final List typeParamTypes; public final List paramTypes; public final Type returnType; public final List throwsTypes; } /** * Represents a class signature. These describe the signature of * a class that has type arguments. * * See: * JVMS 4.3.4 * ClassSignature: * FormalTypeParameters_opt SuperclassSignature SuperinterfaceSignature* */ public static class ClassSigType extends Type { public ClassSigType(List typeParamTypes, Type superclassType, List superinterfaceTypes) { this.typeParamTypes = typeParamTypes; this.superclassType = superclassType; this.superinterfaceTypes = superinterfaceTypes; } public R accept(Visitor visitor, D data) { return visitor.visitClassSigType(this, data); } @Override public String toString() { StringBuilder sb = new StringBuilder(); appendIfNotEmpty(sb, "<", typeParamTypes, ">"); if (superclassType != null) { sb.append(" extends "); sb.append(superclassType); } appendIfNotEmpty(sb, " implements ", superinterfaceTypes, ""); return sb.toString(); } public final List typeParamTypes; public final Type superclassType; public final List superinterfaceTypes; } /** * Represents a class type signature. This is used to represent a * reference to a class, such as in a field, parameter, return type, etc. * * See: * JVMS 4.3.4 * ClassTypeSignature: * {@code L} PackageSpecifier_opt SimpleClassTypeSignature * ClassTypeSignatureSuffix* {@code ;} * PackageSpecifier: * Identifier {@code /} PackageSpecifier* * SimpleClassTypeSignature: * Identifier TypeArguments_opt } * ClassTypeSignatureSuffix: * {@code .} SimpleClassTypeSignature */ public static class ClassType extends Type { public ClassType(ClassType outerType, String name, List typeArgs) { this.outerType = outerType; this.name = name; this.typeArgs = typeArgs; } public R accept(Visitor visitor, D data) { return visitor.visitClassType(this, data); } public String getBinaryName() { if (outerType == null) return name; else return (outerType.getBinaryName() + "$" + name); } @Override public String toString() { StringBuilder sb = new StringBuilder(); if (outerType != null) { sb.append(outerType); sb.append("."); } sb.append(name); appendIfNotEmpty(sb, "<", typeArgs, ">"); return sb.toString(); } @Override public boolean isObject() { return (outerType == null) && name.equals("java/lang/Object") && (typeArgs == null || typeArgs.isEmpty()); } public final ClassType outerType; public final String name; public final List typeArgs; } /** * Represents a FormalTypeParameter. These are used to declare the type * parameters for generic classes and methods. * * See: * JVMS 4.3.4 * FormalTypeParameters: * {@code <} FormalTypeParameter+ {@code >} * FormalTypeParameter: * Identifier ClassBound InterfaceBound* * ClassBound: * {@code :} FieldTypeSignature_opt * InterfaceBound: * {@code :} FieldTypeSignature */ public static class TypeParamType extends Type { public TypeParamType(String name, Type classBound, List interfaceBounds) { this.name = name; this.classBound = classBound; this.interfaceBounds = interfaceBounds; } public R accept(Visitor visitor, D data) { return visitor.visitTypeParamType(this, data); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(name); String sep = " extends "; if (classBound != null) { sb.append(sep); sb.append(classBound); sep = " & "; } if (interfaceBounds != null) { for (Type bound: interfaceBounds) { sb.append(sep); sb.append(bound); sep = " & "; } } return sb.toString(); } public final String name; public final Type classBound; public final List interfaceBounds; } /** * Represents a wildcard type argument. A type argument that is not a * wildcard type argument will be represented by a ClassType, ArrayType, etc. * * See: * JVMS 4.3.4 * TypeArgument: * WildcardIndicator_opt FieldTypeSignature * {@code *} * WildcardIndicator: * {@code +} * {@code -} */ public static class WildcardType extends Type { public enum Kind { UNBOUNDED, EXTENDS, SUPER }; public WildcardType() { this(Kind.UNBOUNDED, null); } public WildcardType(Kind kind, Type boundType) { this.kind = kind; this.boundType = boundType; } public R accept(Visitor visitor, D data) { return visitor.visitWildcardType(this, data); } @Override public String toString() { switch (kind) { case UNBOUNDED: return "?"; case EXTENDS: return "? extends " + boundType; case SUPER: return "? super " + boundType; default: throw new AssertionError(); } } public final Kind kind; public final Type boundType; } } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/TypeAnnotation.java0000644000000000000000000005533312214026367030545 0ustar 00000000000000/* * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.classfile; import java.io.IOException; import java.util.ArrayList; import java.util.List; import com.sun.tools.classfile.TypeAnnotation.Position.TypePathEntry; /** * See JSR 308 specification, Section 3. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. */ public class TypeAnnotation { TypeAnnotation(ClassReader cr) throws IOException, Annotation.InvalidAnnotation { constant_pool = cr.getConstantPool(); position = read_position(cr); annotation = new Annotation(cr); } public TypeAnnotation(ConstantPool constant_pool, Annotation annotation, Position position) { this.constant_pool = constant_pool; this.position = position; this.annotation = annotation; } public int length() { int n = annotation.length(); n += position_length(position); return n; } @Override public String toString() { try { return "@" + constant_pool.getUTF8Value(annotation.type_index).toString().substring(1) + " pos: " + position.toString(); } catch (Exception e) { e.printStackTrace(); return e.toString(); } } public final ConstantPool constant_pool; public final Position position; public final Annotation annotation; private static Position read_position(ClassReader cr) throws IOException, Annotation.InvalidAnnotation { // Copied from ClassReader int tag = cr.readUnsignedByte(); // TargetType tag is a byte if (!TargetType.isValidTargetTypeValue(tag)) throw new Annotation.InvalidAnnotation("TypeAnnotation: Invalid type annotation target type value: " + String.format("0x%02X", tag)); TargetType type = TargetType.fromTargetTypeValue(tag); Position position = new Position(); position.type = type; switch (type) { // instanceof case INSTANCEOF: // new expression case NEW: // constructor/method reference receiver case CONSTRUCTOR_REFERENCE: case METHOD_REFERENCE: position.offset = cr.readUnsignedShort(); break; // local variable case LOCAL_VARIABLE: // resource variable case RESOURCE_VARIABLE: int table_length = cr.readUnsignedShort(); position.lvarOffset = new int[table_length]; position.lvarLength = new int[table_length]; position.lvarIndex = new int[table_length]; for (int i = 0; i < table_length; ++i) { position.lvarOffset[i] = cr.readUnsignedShort(); position.lvarLength[i] = cr.readUnsignedShort(); position.lvarIndex[i] = cr.readUnsignedShort(); } break; // exception parameter case EXCEPTION_PARAMETER: position.exception_index = cr.readUnsignedShort(); break; // method receiver case METHOD_RECEIVER: // Do nothing break; // type parameter case CLASS_TYPE_PARAMETER: case METHOD_TYPE_PARAMETER: position.parameter_index = cr.readUnsignedByte(); break; // type parameter bound case CLASS_TYPE_PARAMETER_BOUND: case METHOD_TYPE_PARAMETER_BOUND: position.parameter_index = cr.readUnsignedByte(); position.bound_index = cr.readUnsignedByte(); break; // class extends or implements clause case CLASS_EXTENDS: int in = cr.readUnsignedShort(); if (in == 0xFFFF) in = -1; position.type_index = in; break; // throws case THROWS: position.type_index = cr.readUnsignedShort(); break; // method parameter case METHOD_FORMAL_PARAMETER: position.parameter_index = cr.readUnsignedByte(); break; // type cast case CAST: // method/constructor/reference type argument case CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT: case METHOD_INVOCATION_TYPE_ARGUMENT: case CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT: case METHOD_REFERENCE_TYPE_ARGUMENT: position.offset = cr.readUnsignedShort(); position.type_index = cr.readUnsignedByte(); break; // We don't need to worry about these case METHOD_RETURN: case FIELD: break; case UNKNOWN: throw new AssertionError("TypeAnnotation: UNKNOWN target type should never occur!"); default: throw new AssertionError("TypeAnnotation: Unknown target type: " + type); } { // Write type path int len = cr.readUnsignedByte(); List loc = new ArrayList(len); for (int i = 0; i < len * TypePathEntry.bytesPerEntry; ++i) loc.add(cr.readUnsignedByte()); position.location = Position.getTypePathFromBinary(loc); } return position; } private static int position_length(Position pos) { int n = 0; n += 1; // TargetType tag is a byte switch (pos.type) { // instanceof case INSTANCEOF: // new expression case NEW: // constructor/method reference receiver case CONSTRUCTOR_REFERENCE: case METHOD_REFERENCE: n += 2; // offset break; // local variable case LOCAL_VARIABLE: // resource variable case RESOURCE_VARIABLE: n += 2; // table_length; int table_length = pos.lvarOffset.length; n += 2 * table_length; // offset n += 2 * table_length; // length n += 2 * table_length; // index break; // exception parameter case EXCEPTION_PARAMETER: n += 2; // exception_index break; // method receiver case METHOD_RECEIVER: // Do nothing break; // type parameter case CLASS_TYPE_PARAMETER: case METHOD_TYPE_PARAMETER: n += 1; // parameter_index break; // type parameter bound case CLASS_TYPE_PARAMETER_BOUND: case METHOD_TYPE_PARAMETER_BOUND: n += 1; // parameter_index n += 1; // bound_index break; // class extends or implements clause case CLASS_EXTENDS: n += 2; // type_index break; // throws case THROWS: n += 2; // type_index break; // method parameter case METHOD_FORMAL_PARAMETER: n += 1; // parameter_index break; // type cast case CAST: // method/constructor/reference type argument case CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT: case METHOD_INVOCATION_TYPE_ARGUMENT: case CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT: case METHOD_REFERENCE_TYPE_ARGUMENT: n += 2; // offset n += 1; // type index break; // We don't need to worry about these case METHOD_RETURN: case FIELD: break; case UNKNOWN: throw new AssertionError("TypeAnnotation: UNKNOWN target type should never occur!"); default: throw new AssertionError("TypeAnnotation: Unknown target type: " + pos.type); } { n += 1; // length n += TypePathEntry.bytesPerEntry * pos.location.size(); // bytes for actual array } return n; } // Code duplicated from com.sun.tools.javac.code.TypeAnnotationPosition public static class Position { public enum TypePathEntryKind { ARRAY(0), INNER_TYPE(1), WILDCARD(2), TYPE_ARGUMENT(3); public final int tag; private TypePathEntryKind(int tag) { this.tag = tag; } } public static class TypePathEntry { /** The fixed number of bytes per TypePathEntry. */ public static final int bytesPerEntry = 2; public final TypePathEntryKind tag; public final int arg; public static final TypePathEntry ARRAY = new TypePathEntry(TypePathEntryKind.ARRAY); public static final TypePathEntry INNER_TYPE = new TypePathEntry(TypePathEntryKind.INNER_TYPE); public static final TypePathEntry WILDCARD = new TypePathEntry(TypePathEntryKind.WILDCARD); private TypePathEntry(TypePathEntryKind tag) { if (!(tag == TypePathEntryKind.ARRAY || tag == TypePathEntryKind.INNER_TYPE || tag == TypePathEntryKind.WILDCARD)) { throw new AssertionError("Invalid TypePathEntryKind: " + tag); } this.tag = tag; this.arg = 0; } public TypePathEntry(TypePathEntryKind tag, int arg) { if (tag != TypePathEntryKind.TYPE_ARGUMENT) { throw new AssertionError("Invalid TypePathEntryKind: " + tag); } this.tag = tag; this.arg = arg; } public static TypePathEntry fromBinary(int tag, int arg) { if (arg != 0 && tag != TypePathEntryKind.TYPE_ARGUMENT.tag) { throw new AssertionError("Invalid TypePathEntry tag/arg: " + tag + "/" + arg); } switch (tag) { case 0: return ARRAY; case 1: return INNER_TYPE; case 2: return WILDCARD; case 3: return new TypePathEntry(TypePathEntryKind.TYPE_ARGUMENT, arg); default: throw new AssertionError("Invalid TypePathEntryKind tag: " + tag); } } @Override public String toString() { return tag.toString() + (tag == TypePathEntryKind.TYPE_ARGUMENT ? ("(" + arg + ")") : ""); } @Override public boolean equals(Object other) { if (! (other instanceof TypePathEntry)) { return false; } TypePathEntry tpe = (TypePathEntry) other; return this.tag == tpe.tag && this.arg == tpe.arg; } @Override public int hashCode() { return this.tag.hashCode() * 17 + this.arg; } } public TargetType type = TargetType.UNKNOWN; // For generic/array types. // TODO: or should we use null? Noone will use this object. public List location = new ArrayList(0); // Tree position. public int pos = -1; // For typecasts, type tests, new (and locals, as start_pc). public boolean isValidOffset = false; public int offset = -1; // For locals. arrays same length public int[] lvarOffset = null; public int[] lvarLength = null; public int[] lvarIndex = null; // For type parameter bound public int bound_index = Integer.MIN_VALUE; // For type parameter and method parameter public int parameter_index = Integer.MIN_VALUE; // For class extends, implements, and throws clauses public int type_index = Integer.MIN_VALUE; // For exception parameters, index into exception table public int exception_index = Integer.MIN_VALUE; public Position() {} @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append('['); sb.append(type); switch (type) { // instanceof case INSTANCEOF: // new expression case NEW: // constructor/method reference receiver case CONSTRUCTOR_REFERENCE: case METHOD_REFERENCE: sb.append(", offset = "); sb.append(offset); break; // local variable case LOCAL_VARIABLE: // resource variable case RESOURCE_VARIABLE: if (lvarOffset == null) { sb.append(", lvarOffset is null!"); break; } sb.append(", {"); for (int i = 0; i < lvarOffset.length; ++i) { if (i != 0) sb.append("; "); sb.append("start_pc = "); sb.append(lvarOffset[i]); sb.append(", length = "); sb.append(lvarLength[i]); sb.append(", index = "); sb.append(lvarIndex[i]); } sb.append("}"); break; // method receiver case METHOD_RECEIVER: // Do nothing break; // type parameter case CLASS_TYPE_PARAMETER: case METHOD_TYPE_PARAMETER: sb.append(", param_index = "); sb.append(parameter_index); break; // type parameter bound case CLASS_TYPE_PARAMETER_BOUND: case METHOD_TYPE_PARAMETER_BOUND: sb.append(", param_index = "); sb.append(parameter_index); sb.append(", bound_index = "); sb.append(bound_index); break; // class extends or implements clause case CLASS_EXTENDS: sb.append(", type_index = "); sb.append(type_index); break; // throws case THROWS: sb.append(", type_index = "); sb.append(type_index); break; // exception parameter case EXCEPTION_PARAMETER: sb.append(", exception_index = "); sb.append(exception_index); break; // method parameter case METHOD_FORMAL_PARAMETER: sb.append(", param_index = "); sb.append(parameter_index); break; // type cast case CAST: // method/constructor/reference type argument case CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT: case METHOD_INVOCATION_TYPE_ARGUMENT: case CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT: case METHOD_REFERENCE_TYPE_ARGUMENT: sb.append(", offset = "); sb.append(offset); sb.append(", type_index = "); sb.append(type_index); break; // We don't need to worry about these case METHOD_RETURN: case FIELD: break; case UNKNOWN: sb.append(", position UNKNOWN!"); break; default: throw new AssertionError("Unknown target type: " + type); } // Append location data for generics/arrays. if (!location.isEmpty()) { sb.append(", location = ("); sb.append(location); sb.append(")"); } sb.append(", pos = "); sb.append(pos); sb.append(']'); return sb.toString(); } /** * Indicates whether the target tree of the annotation has been optimized * away from classfile or not. * @return true if the target has not been optimized away */ public boolean emitToClassfile() { return !type.isLocal() || isValidOffset; } /** * Decode the binary representation for a type path and set * the {@code location} field. * * @param list The bytecode representation of the type path. */ public static List getTypePathFromBinary(List list) { List loc = new ArrayList(list.size() / TypePathEntry.bytesPerEntry); int idx = 0; while (idx < list.size()) { if (idx + 1 == list.size()) { throw new AssertionError("Could not decode type path: " + list); } loc.add(TypePathEntry.fromBinary(list.get(idx), list.get(idx + 1))); idx += 2; } return loc; } public static List getBinaryFromTypePath(List locs) { List loc = new ArrayList(locs.size() * TypePathEntry.bytesPerEntry); for (TypePathEntry tpe : locs) { loc.add(tpe.tag.tag); loc.add(tpe.arg); } return loc; } } // Code duplicated from com.sun.tools.javac.code.TargetType // The IsLocal flag could be removed here. public enum TargetType { /** For annotations on a class type parameter declaration. */ CLASS_TYPE_PARAMETER(0x00), /** For annotations on a method type parameter declaration. */ METHOD_TYPE_PARAMETER(0x01), /** For annotations on the type of an "extends" or "implements" clause. */ CLASS_EXTENDS(0x10), /** For annotations on a bound of a type parameter of a class. */ CLASS_TYPE_PARAMETER_BOUND(0x11), /** For annotations on a bound of a type parameter of a method. */ METHOD_TYPE_PARAMETER_BOUND(0x12), /** For annotations on a field. */ FIELD(0x13), /** For annotations on a method return type. */ METHOD_RETURN(0x14), /** For annotations on the method receiver. */ METHOD_RECEIVER(0x15), /** For annotations on a method parameter. */ METHOD_FORMAL_PARAMETER(0x16), /** For annotations on a throws clause in a method declaration. */ THROWS(0x17), /** For annotations on a local variable. */ LOCAL_VARIABLE(0x40, true), /** For annotations on a resource variable. */ RESOURCE_VARIABLE(0x41, true), /** For annotations on an exception parameter. */ EXCEPTION_PARAMETER(0x42, true), /** For annotations on a type test. */ INSTANCEOF(0x43, true), /** For annotations on an object creation expression. */ NEW(0x44, true), /** For annotations on a constructor reference receiver. */ CONSTRUCTOR_REFERENCE(0x45, true), /** For annotations on a method reference receiver. */ METHOD_REFERENCE(0x46, true), /** For annotations on a typecast. */ CAST(0x47, true), /** For annotations on a type argument of an object creation expression. */ CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT(0x48, true), /** For annotations on a type argument of a method call. */ METHOD_INVOCATION_TYPE_ARGUMENT(0x49, true), /** For annotations on a type argument of a constructor reference. */ CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT(0x4A, true), /** For annotations on a type argument of a method reference. */ METHOD_REFERENCE_TYPE_ARGUMENT(0x4B, true), /** For annotations with an unknown target. */ UNKNOWN(0xFF); private static final int MAXIMUM_TARGET_TYPE_VALUE = 0x4B; private final int targetTypeValue; private final boolean isLocal; private TargetType(int targetTypeValue) { this(targetTypeValue, false); } private TargetType(int targetTypeValue, boolean isLocal) { if (targetTypeValue < 0 || targetTypeValue > 255) throw new AssertionError("Attribute type value needs to be an unsigned byte: " + String.format("0x%02X", targetTypeValue)); this.targetTypeValue = targetTypeValue; this.isLocal = isLocal; } /** * Returns whether or not this TargetType represents an annotation whose * target is exclusively a tree in a method body * * Note: wildcard bound targets could target a local tree and a class * member declaration signature tree */ public boolean isLocal() { return isLocal; } public int targetTypeValue() { return this.targetTypeValue; } private static final TargetType[] targets; static { targets = new TargetType[MAXIMUM_TARGET_TYPE_VALUE + 1]; TargetType[] alltargets = values(); for (TargetType target : alltargets) { if (target.targetTypeValue != UNKNOWN.targetTypeValue) targets[target.targetTypeValue] = target; } for (int i = 0; i <= MAXIMUM_TARGET_TYPE_VALUE; ++i) { if (targets[i] == null) targets[i] = UNKNOWN; } } public static boolean isValidTargetTypeValue(int tag) { if (tag == UNKNOWN.targetTypeValue) return true; return (tag >= 0 && tag < targets.length); } public static TargetType fromTargetTypeValue(int tag) { if (tag == UNKNOWN.targetTypeValue) return UNKNOWN; if (tag < 0 || tag >= targets.length) throw new AssertionError("Unknown TargetType: " + tag); return targets[tag]; } } } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/classfile/package.html0000644000000000000000000000062412214026367027200 0ustar 00000000000000 A minimalist library to read and write class files into objects closely based on the corresponding definitions in The Java™ Virtual Machine Specification (JVMS). libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/Taglet.java0000644000000000000000000001307612214026367026477 0ustar 00000000000000/* * Copyright (c) 2001, 2006, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets; import com.sun.javadoc.*; /** * The interface for a custom tag used by Doclets. A custom * tag must implement this interface. To be loaded and used by * doclets at run-time, the taglet must have a static method called * register that accepts a {@link java.util.Map} as an * argument with the following signature: *

 *   public void register(Map map)
 * 
* This method should add an instance of the custom taglet to the map * with the name of the taglet as the key. If overriding a taglet, * to avoid a name conflict, the overridden taglet must be deleted from * the map before an instance of the new taglet is added to the map. *

* It is recommended that the taglet throw an exception when it fails * to register itself. The exception that it throws is up to the user. *

* Here are two sample taglets:
*

*

* For more information on how to create your own Taglets, please see the * Taglet Overview. * * @since 1.4 * @author Jamie Ho */ public interface Taglet { /** * Return true if this Taglet * is used in field documentation. Set to * false for inline tags. * @return true if this Taglet * is used in field documentation and false * otherwise. */ public abstract boolean inField(); /** * Return true if this Taglet * is used in constructor documentation. Set to * false for inline tags. * @return true if this Taglet * is used in constructor documentation and false * otherwise. */ public abstract boolean inConstructor(); /** * Return true if this Taglet * is used in method documentation. Set to * false for inline tags. * @return true if this Taglet * is used in method documentation and false * otherwise. */ public abstract boolean inMethod(); /** * Return true if this Taglet * is used in overview documentation. Set to * false for inline tags. * @return true if this Taglet * is used in method documentation and false * otherwise. */ public abstract boolean inOverview(); /** * Return true if this Taglet * is used in package documentation. Set to * false for inline tags. * @return true if this Taglet * is used in package documentation and false * otherwise. */ public abstract boolean inPackage(); /** * Return true if this Taglet * is used in type documentation (classes or * interfaces). Set to false for inline tags. * @return true if this Taglet * is used in type documentation and false * otherwise. */ public abstract boolean inType(); /** * Return true if this Taglet * is an inline tag. Return false otherwise. * @return true if this Taglet * is an inline tag and false otherwise. */ public abstract boolean isInlineTag(); /** * Return the name of this custom tag. * @return the name of this custom tag. */ public abstract String getName(); /** * Given the Tag representation of this custom * tag, return its string representation, which is output * to the generated page. * @param tag the Tag representation of this custom tag. * @return the string representation of this Tag. */ public abstract String toString(Tag tag); /** * Given an array of Tags representing this custom * tag, return its string representation, which is output * to the generated page. This method should * return null if this taglet represents an inline tag. * @param tags the array of Tags representing of this custom tag. * @return the string representation of this Tag. */ public abstract String toString(Tag[] tags); } ././@LongLink0000000000000000000000000000017000000000000011213 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/AbstractExecutableMemberWriter.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/AbstractExecutab0000644000000000000000000003060112214026367032173 0ustar 00000000000000/* * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html; import com.sun.javadoc.*; import com.sun.tools.doclets.formats.html.markup.*; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.*; /** * Print method and constructor info. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Robert Field * @author Atul M Dambalkar * @author Bhavesh Patel (Modified) */ public abstract class AbstractExecutableMemberWriter extends AbstractMemberWriter { public AbstractExecutableMemberWriter(SubWriterHolderWriter writer, ClassDoc classdoc) { super(writer, classdoc); } public AbstractExecutableMemberWriter(SubWriterHolderWriter writer) { super(writer); } /** * Add the type parameters for the executable member. * * @param member the member to write type parameters for. * @param htmltree the content tree to which the parameters will be added. * @return the display length required to write this information. */ protected void addTypeParameters(ExecutableMemberDoc member, Content htmltree) { Content typeParameters = getTypeParameters(member); if (!typeParameters.isEmpty()) { htmltree.addContent(typeParameters); htmltree.addContent(writer.getSpace()); } } /** * Get the type parameters for the executable member. * * @param member the member for which to get the type parameters. * @return the type parameters. */ protected Content getTypeParameters(ExecutableMemberDoc member) { LinkInfoImpl linkInfo = new LinkInfoImpl(configuration, LinkInfoImpl.Kind.MEMBER_TYPE_PARAMS, member); return writer.getTypeParameterLinks(linkInfo); } /** * {@inheritDoc} */ protected Content getDeprecatedLink(ProgramElementDoc member) { ExecutableMemberDoc emd = (ExecutableMemberDoc)member; return writer.getDocLink(LinkInfoImpl.Kind.MEMBER, (MemberDoc) emd, emd.qualifiedName() + emd.flatSignature()); } /** * Add the summary link for the member. * * @param context the id of the context where the link will be printed * @param cd the classDoc that we should link to * @param member the member being linked to * @param tdSummary the content tree to which the link will be added */ protected void addSummaryLink(LinkInfoImpl.Kind context, ClassDoc cd, ProgramElementDoc member, Content tdSummary) { ExecutableMemberDoc emd = (ExecutableMemberDoc)member; String name = emd.name(); Content strong = HtmlTree.STRONG( writer.getDocLink(context, cd, (MemberDoc) emd, name, false)); Content code = HtmlTree.CODE(strong); addParameters(emd, false, code, name.length() - 1); tdSummary.addContent(code); } /** * Add the inherited summary link for the member. * * @param cd the classDoc that we should link to * @param member the member being linked to * @param linksTree the content tree to which the link will be added */ protected void addInheritedSummaryLink(ClassDoc cd, ProgramElementDoc member, Content linksTree) { linksTree.addContent( writer.getDocLink(LinkInfoImpl.Kind.MEMBER, cd, (MemberDoc) member, member.name(), false)); } /** * Add the parameter for the executable member. * * @param member the member to write parameter for. * @param param the parameter that needs to be written. * @param isVarArg true if this is a link to var arg. * @param tree the content tree to which the parameter information will be added. */ protected void addParam(ExecutableMemberDoc member, Parameter param, boolean isVarArg, Content tree) { if (param.type() != null) { Content link = writer.getLink(new LinkInfoImpl( configuration, LinkInfoImpl.Kind.EXECUTABLE_MEMBER_PARAM, param.type()).varargs(isVarArg)); tree.addContent(link); } if(param.name().length() > 0) { tree.addContent(writer.getSpace()); tree.addContent(param.name()); } } /** * Add the receiver annotations information. * * @param member the member to write receiver annotations for. * @param rcvrType the receiver type. * @param descList list of annotation description. * @param tree the content tree to which the information will be added. */ protected void addReceiverAnnotations(ExecutableMemberDoc member, Type rcvrType, AnnotationDesc[] descList, Content tree) { writer.addReceiverAnnotationInfo(member, descList, tree); tree.addContent(writer.getSpace()); tree.addContent(rcvrType.typeName()); LinkInfoImpl linkInfo = new LinkInfoImpl(configuration, LinkInfoImpl.Kind.CLASS_SIGNATURE, rcvrType); tree.addContent(writer.getTypeParameterLinks(linkInfo)); tree.addContent(writer.getSpace()); tree.addContent("this"); } /** * Add all the parameters for the executable member. * * @param member the member to write parameters for. * @param htmltree the content tree to which the parameters information will be added. */ protected void addParameters(ExecutableMemberDoc member, Content htmltree, int indentSize) { addParameters(member, true, htmltree, indentSize); } /** * Add all the parameters for the executable member. * * @param member the member to write parameters for. * @param includeAnnotations true if annotation information needs to be added. * @param htmltree the content tree to which the parameters information will be added. */ protected void addParameters(ExecutableMemberDoc member, boolean includeAnnotations, Content htmltree, int indentSize) { htmltree.addContent("("); String sep = ""; Parameter[] params = member.parameters(); String indent = makeSpace(indentSize + 1); Type rcvrType = member.receiverType(); if (includeAnnotations && rcvrType instanceof AnnotatedType) { AnnotationDesc[] descList = rcvrType.asAnnotatedType().annotations(); if (descList.length > 0) { addReceiverAnnotations(member, rcvrType, descList, htmltree); sep = "," + DocletConstants.NL + indent; } } int paramstart; for (paramstart = 0; paramstart < params.length; paramstart++) { htmltree.addContent(sep); Parameter param = params[paramstart]; if (!param.name().startsWith("this$")) { if (includeAnnotations) { boolean foundAnnotations = writer.addAnnotationInfo(indent.length(), member, param, htmltree); if (foundAnnotations) { htmltree.addContent(DocletConstants.NL); htmltree.addContent(indent); } } addParam(member, param, (paramstart == params.length - 1) && member.isVarArgs(), htmltree); break; } } for (int i = paramstart + 1; i < params.length; i++) { htmltree.addContent(","); htmltree.addContent(DocletConstants.NL); htmltree.addContent(indent); if (includeAnnotations) { boolean foundAnnotations = writer.addAnnotationInfo(indent.length(), member, params[i], htmltree); if (foundAnnotations) { htmltree.addContent(DocletConstants.NL); htmltree.addContent(indent); } } addParam(member, params[i], (i == params.length - 1) && member.isVarArgs(), htmltree); } htmltree.addContent(")"); } /** * Add exceptions for the executable member. * * @param member the member to write exceptions for. * @param htmltree the content tree to which the exceptions information will be added. */ protected void addExceptions(ExecutableMemberDoc member, Content htmltree, int indentSize) { Type[] exceptions = member.thrownExceptionTypes(); if (exceptions.length > 0) { LinkInfoImpl memberTypeParam = new LinkInfoImpl(configuration, LinkInfoImpl.Kind.MEMBER, member); String indent = makeSpace(indentSize + 1 - 7); htmltree.addContent(DocletConstants.NL); htmltree.addContent(indent); htmltree.addContent("throws "); indent = makeSpace(indentSize + 1); Content link = writer.getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.MEMBER, exceptions[0])); htmltree.addContent(link); for(int i = 1; i < exceptions.length; i++) { htmltree.addContent(","); htmltree.addContent(DocletConstants.NL); htmltree.addContent(indent); Content exceptionLink = writer.getLink(new LinkInfoImpl( configuration, LinkInfoImpl.Kind.MEMBER, exceptions[i])); htmltree.addContent(exceptionLink); } } } protected ClassDoc implementsMethodInIntfac(MethodDoc method, ClassDoc[] intfacs) { for (int i = 0; i < intfacs.length; i++) { MethodDoc[] methods = intfacs[i].methods(); if (methods.length > 0) { for (int j = 0; j < methods.length; j++) { if (methods[j].name().equals(method.name()) && methods[j].signature().equals(method.signature())) { return intfacs[i]; } } } } return null; } /** * For backward compatibility, include an anchor using the erasures of the * parameters. NOTE: We won't need this method anymore after we fix * see tags so that they use the type instead of the erasure. * * @param emd the ExecutableMemberDoc to anchor to. * @return the 1.4.x style anchor for the ExecutableMemberDoc. */ protected String getErasureAnchor(ExecutableMemberDoc emd) { StringBuilder buf = new StringBuilder(emd.name() + "("); Parameter[] params = emd.parameters(); boolean foundTypeVariable = false; for (int i = 0; i < params.length; i++) { if (i > 0) { buf.append(","); } Type t = params[i].type(); foundTypeVariable = foundTypeVariable || t.asTypeVariable() != null; buf.append(t.isPrimitive() ? t.typeName() : t.asClassDoc().qualifiedName()); buf.append(t.dimension()); } buf.append(")"); return foundTypeVariable ? buf.toString() : null; } } ././@LongLink0000000000000000000000000000015500000000000011216 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/AbstractIndexWriter.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/AbstractIndexWri0000644000000000000000000002376012214026367032174 0ustar 00000000000000/* * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html; import java.io.*; import java.util.*; import com.sun.javadoc.*; import com.sun.tools.doclets.formats.html.markup.*; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.*; /** * Generate Index for all the Member Names with Indexing in * Unicode Order. This class is a base class for {@link SingleIndexWriter} and * {@link SplitIndexWriter}. It uses the functionality from * {@link HtmlDocletWriter} to generate the Index Contents. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @see IndexBuilder * @author Atul M Dambalkar * @author Bhavesh Patel (Modified) */ public class AbstractIndexWriter extends HtmlDocletWriter { /** * The index of all the members with unicode character. */ protected IndexBuilder indexbuilder; /** * This constructor will be used by {@link SplitIndexWriter}. Initializes * path to this file and relative path from this file. * * @param configuration The current configuration * @param path Path to the file which is getting generated. * @param indexbuilder Unicode based Index from {@link IndexBuilder} */ protected AbstractIndexWriter(ConfigurationImpl configuration, DocPath path, IndexBuilder indexbuilder) throws IOException { super(configuration, path); this.indexbuilder = indexbuilder; } /** * Get the index label for navigation bar. * * @return a content tree for the tree label */ protected Content getNavLinkIndex() { Content li = HtmlTree.LI(HtmlStyle.navBarCell1Rev, indexLabel); return li; } /** * Add the member information for the unicode character along with the * list of the members. * * @param unicode Unicode for which member list information to be generated * @param memberlist List of members for the unicode character * @param contentTree the content tree to which the information will be added */ protected void addContents(Character unicode, List memberlist, Content contentTree) { contentTree.addContent(getMarkerAnchor("_" + unicode + "_")); Content headContent = new StringContent(unicode.toString()); Content heading = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, false, HtmlStyle.title, headContent); contentTree.addContent(heading); int memberListSize = memberlist.size(); // Display the list only if there are elements to be displayed. if (memberListSize > 0) { Content dl = new HtmlTree(HtmlTag.DL); for (int i = 0; i < memberListSize; i++) { Doc element = memberlist.get(i); if (element instanceof MemberDoc) { addDescription((MemberDoc)element, dl); } else if (element instanceof ClassDoc) { addDescription((ClassDoc)element, dl); } else if (element instanceof PackageDoc) { addDescription((PackageDoc)element, dl); } } contentTree.addContent(dl); } } /** * Add one line summary comment for the package. * * @param pkg the package to be documented * @param dlTree the content tree to which the description will be added */ protected void addDescription(PackageDoc pkg, Content dlTree) { Content link = getPackageLink(pkg, new StringContent(Util.getPackageName(pkg))); Content dt = HtmlTree.DT(link); dt.addContent(" - "); dt.addContent(getResource("doclet.package")); dt.addContent(" " + pkg.name()); dlTree.addContent(dt); Content dd = new HtmlTree(HtmlTag.DD); addSummaryComment(pkg, dd); dlTree.addContent(dd); } /** * Add one line summary comment for the class. * * @param cd the class being documented * @param dlTree the content tree to which the description will be added */ protected void addDescription(ClassDoc cd, Content dlTree) { Content link = getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.INDEX, cd).strong(true)); Content dt = HtmlTree.DT(link); dt.addContent(" - "); addClassInfo(cd, dt); dlTree.addContent(dt); Content dd = new HtmlTree(HtmlTag.DD); addComment(cd, dd); dlTree.addContent(dd); } /** * Add the classkind (class, interface, exception), error of the class * passed. * * @param cd the class being documented * @param contentTree the content tree to which the class info will be added */ protected void addClassInfo(ClassDoc cd, Content contentTree) { contentTree.addContent(getResource("doclet.in", Util.getTypeName(configuration, cd, false), getPackageLink(cd.containingPackage(), Util.getPackageName(cd.containingPackage())) )); } /** * Add description for Class, Field, Method or Constructor. * * @param member MemberDoc for the member of the Class Kind * @param dlTree the content tree to which the description will be added */ protected void addDescription(MemberDoc member, Content dlTree) { String name = (member instanceof ExecutableMemberDoc)? member.name() + ((ExecutableMemberDoc)member).flatSignature() : member.name(); Content span = HtmlTree.SPAN(HtmlStyle.strong, getDocLink(LinkInfoImpl.Kind.INDEX, member, name)); Content dt = HtmlTree.DT(span); dt.addContent(" - "); addMemberDesc(member, dt); dlTree.addContent(dt); Content dd = new HtmlTree(HtmlTag.DD); addComment(member, dd); dlTree.addContent(dd); } /** * Add comment for each element in the index. If the element is deprecated * and it has a @deprecated tag, use that comment. Else if the containing * class for this element is deprecated, then add the word "Deprecated." at * the start and then print the normal comment. * * @param element Index element * @param contentTree the content tree to which the comment will be added */ protected void addComment(ProgramElementDoc element, Content contentTree) { Tag[] tags; Content span = HtmlTree.SPAN(HtmlStyle.strong, deprecatedPhrase); HtmlTree div = new HtmlTree(HtmlTag.DIV); div.addStyle(HtmlStyle.block); if (Util.isDeprecated(element)) { div.addContent(span); if ((tags = element.tags("deprecated")).length > 0) addInlineDeprecatedComment(element, tags[0], div); contentTree.addContent(div); } else { ClassDoc cont = element.containingClass(); while (cont != null) { if (Util.isDeprecated(cont)) { div.addContent(span); contentTree.addContent(div); break; } cont = cont.containingClass(); } addSummaryComment(element, contentTree); } } /** * Add description about the Static Varible/Method/Constructor for a * member. * * @param member MemberDoc for the member within the Class Kind * @param contentTree the content tree to which the member description will be added */ protected void addMemberDesc(MemberDoc member, Content contentTree) { ClassDoc containing = member.containingClass(); String classdesc = Util.getTypeName( configuration, containing, true) + " "; if (member.isField()) { if (member.isStatic()) { contentTree.addContent( getResource("doclet.Static_variable_in", classdesc)); } else { contentTree.addContent( getResource("doclet.Variable_in", classdesc)); } } else if (member.isConstructor()) { contentTree.addContent( getResource("doclet.Constructor_for", classdesc)); } else if (member.isMethod()) { if (member.isStatic()) { contentTree.addContent( getResource("doclet.Static_method_in", classdesc)); } else { contentTree.addContent( getResource("doclet.Method_in", classdesc)); } } addPreQualifiedClassLink(LinkInfoImpl.Kind.INDEX, containing, false, contentTree); } } ././@LongLink0000000000000000000000000000015600000000000011217 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/AbstractMemberWriter.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/AbstractMemberWr0000644000000000000000000006455712214026367032174 0ustar 00000000000000/* * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html; import java.lang.reflect.Modifier; import java.util.*; import com.sun.javadoc.*; import com.sun.tools.doclets.formats.html.markup.*; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.taglets.*; import com.sun.tools.doclets.internal.toolkit.util.*; /** * The base class for member writers. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Robert Field * @author Atul M Dambalkar * @author Jamie Ho (Re-write) * @author Bhavesh Patel (Modified) */ public abstract class AbstractMemberWriter { protected final ConfigurationImpl configuration; protected final SubWriterHolderWriter writer; protected final ClassDoc classdoc; protected Map typeMap = new LinkedHashMap(); protected Set methodTypes = EnumSet.noneOf(MethodTypes.class); private int methodTypesOr = 0; public final boolean nodepr; protected boolean printedSummaryHeader = false; public AbstractMemberWriter(SubWriterHolderWriter writer, ClassDoc classdoc) { this.configuration = writer.configuration; this.writer = writer; this.nodepr = configuration.nodeprecated; this.classdoc = classdoc; } public AbstractMemberWriter(SubWriterHolderWriter writer) { this(writer, null); } /*** abstracts ***/ /** * Add the summary label for the member. * * @param memberTree the content tree to which the label will be added */ public abstract void addSummaryLabel(Content memberTree); /** * Get the summary for the member summary table. * * @return a string for the table summary */ public abstract String getTableSummary(); /** * Get the caption for the member summary table. * * @return a string for the table caption */ public abstract Content getCaption(); /** * Get the summary table header for the member. * * @param member the member to be documented * @return the summary table header */ public abstract String[] getSummaryTableHeader(ProgramElementDoc member); /** * Add inherited summary lable for the member. * * @param cd the class doc to which to link to * @param inheritedTree the content tree to which the inherited summary label will be added */ public abstract void addInheritedSummaryLabel(ClassDoc cd, Content inheritedTree); /** * Add the anchor for the summary section of the member. * * @param cd the class doc to be documented * @param memberTree the content tree to which the summary anchor will be added */ public abstract void addSummaryAnchor(ClassDoc cd, Content memberTree); /** * Add the anchor for the inherited summary section of the member. * * @param cd the class doc to be documented * @param inheritedTree the content tree to which the inherited summary anchor will be added */ public abstract void addInheritedSummaryAnchor(ClassDoc cd, Content inheritedTree); /** * Add the summary type for the member. * * @param member the member to be documented * @param tdSummaryType the content tree to which the type will be added */ protected abstract void addSummaryType(ProgramElementDoc member, Content tdSummaryType); /** * Add the summary link for the member. * * @param cd the class doc to be documented * @param member the member to be documented * @param tdSummary the content tree to which the link will be added */ protected void addSummaryLink(ClassDoc cd, ProgramElementDoc member, Content tdSummary) { addSummaryLink(LinkInfoImpl.Kind.MEMBER, cd, member, tdSummary); } /** * Add the summary link for the member. * * @param context the id of the context where the link will be printed * @param cd the class doc to be documented * @param member the member to be documented * @param tdSummary the content tree to which the summary link will be added */ protected abstract void addSummaryLink(LinkInfoImpl.Kind context, ClassDoc cd, ProgramElementDoc member, Content tdSummary); /** * Add the inherited summary link for the member. * * @param cd the class doc to be documented * @param member the member to be documented * @param linksTree the content tree to which the inherited summary link will be added */ protected abstract void addInheritedSummaryLink(ClassDoc cd, ProgramElementDoc member, Content linksTree); /** * Get the deprecated link. * * @param member the member being linked to * @return a content tree representing the link */ protected abstract Content getDeprecatedLink(ProgramElementDoc member); /** * Get the navigation summary link. * * @param cd the class doc to be documented * @param link true if its a link else the label to be printed * @return a content tree for the navigation summary link. */ protected abstract Content getNavSummaryLink(ClassDoc cd, boolean link); /** * Add the navigation detail link. * * @param link true if its a link else the label to be printed * @param liNav the content tree to which the navigation detail link will be added */ protected abstract void addNavDetailLink(boolean link, Content liNav); /** * Add the member name to the content tree. * * @param name the member name to be added to the content tree. * @param htmltree the content tree to which the name will be added. */ protected void addName(String name, Content htmltree) { htmltree.addContent(name); } /** * Return a string describing the access modifier flags. * Don't include native or synchronized. * * The modifier names are returned in canonical order, as * specified by The Java Language Specification. */ protected String modifierString(MemberDoc member) { int ms = member.modifierSpecifier(); int no = Modifier.NATIVE | Modifier.SYNCHRONIZED; return Modifier.toString(ms & ~no); } protected String typeString(MemberDoc member) { String type = ""; if (member instanceof MethodDoc) { type = ((MethodDoc)member).returnType().toString(); } else if (member instanceof FieldDoc) { type = ((FieldDoc)member).type().toString(); } return type; } /** * Add the modifier for the member. * * @param member the member for which teh modifier will be added. * @param htmltree the content tree to which the modifier information will be added. */ protected void addModifiers(MemberDoc member, Content htmltree) { String mod = modifierString(member); // According to JLS, we should not be showing public modifier for // interface methods. if ((member.isField() || member.isMethod()) && writer instanceof ClassWriterImpl && ((ClassWriterImpl) writer).getClassDoc().isInterface()) { // This check for isDefault() and the default modifier needs to be // added for it to appear on the method details section. Once the // default modifier is added to the Modifier list on DocEnv and once // it is updated to use the javax.lang.model.element.Modifier, we // will need to remove this. mod = (member.isMethod() && ((MethodDoc)member).isDefault()) ? Util.replaceText(mod, "public", "default").trim() : Util.replaceText(mod, "public", "").trim(); } if(mod.length() > 0) { htmltree.addContent(mod); htmltree.addContent(writer.getSpace()); } } protected String makeSpace(int len) { if (len <= 0) { return ""; } StringBuilder sb = new StringBuilder(len); for (int i = 0; i < len; i++) { sb.append(' '); } return sb.toString(); } /** * Add the modifier and type for the member in the member summary. * * @param member the member to add the type for * @param type the type to add * @param tdSummaryType the content tree to which the modified and type will be added */ protected void addModifierAndType(ProgramElementDoc member, Type type, Content tdSummaryType) { HtmlTree code = new HtmlTree(HtmlTag.CODE); addModifier(member, code); if (type == null) { if (member.isClass()) { code.addContent("class"); } else { code.addContent("interface"); } code.addContent(writer.getSpace()); } else { if (member instanceof ExecutableMemberDoc && ((ExecutableMemberDoc) member).typeParameters().length > 0) { Content typeParameters = ((AbstractExecutableMemberWriter) this).getTypeParameters( (ExecutableMemberDoc) member); code.addContent(typeParameters); //Code to avoid ugly wrapping in member summary table. if (typeParameters.charCount() > 10) { code.addContent(new HtmlTree(HtmlTag.BR)); } else { code.addContent(writer.getSpace()); } code.addContent( writer.getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.SUMMARY_RETURN_TYPE, type))); } else { code.addContent( writer.getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.SUMMARY_RETURN_TYPE, type))); } } tdSummaryType.addContent(code); } /** * Add the modifier for the member. * * @param member the member to add the type for * @param code the content tree to which the modified will be added */ private void addModifier(ProgramElementDoc member, Content code) { if (member.isProtected()) { code.addContent("protected "); } else if (member.isPrivate()) { code.addContent("private "); } else if (!member.isPublic()) { // Package private code.addContent(configuration.getText("doclet.Package_private")); code.addContent(" "); } if (member.isMethod()) { if (!(member.containingClass().isInterface()) && ((MethodDoc)member).isAbstract()) { code.addContent("abstract "); } // This check for isDefault() and the default modifier needs to be // added for it to appear on the "Modifier and Type" column in the // method summary section. Once the default modifier is added // to the Modifier list on DocEnv and once it is updated to use the // javax.lang.model.element.Modifier, we will need to remove this. if (((MethodDoc)member).isDefault()) { code.addContent("default "); } } if (member.isStatic()) { code.addContent("static "); } } /** * Add the deprecated information for the given member. * * @param member the member being documented. * @param contentTree the content tree to which the deprecated information will be added. */ protected void addDeprecatedInfo(ProgramElementDoc member, Content contentTree) { Content output = (new DeprecatedTaglet()).getTagletOutput(member, writer.getTagletWriterInstance(false)); if (!output.isEmpty()) { Content deprecatedContent = output; Content div = HtmlTree.DIV(HtmlStyle.block, deprecatedContent); contentTree.addContent(div); } } /** * Add the comment for the given member. * * @param member the member being documented. * @param htmltree the content tree to which the comment will be added. */ protected void addComment(ProgramElementDoc member, Content htmltree) { if (member.inlineTags().length > 0) { writer.addInlineComment(member, htmltree); } } protected String name(ProgramElementDoc member) { return member.name(); } /** * Get the header for the section. * * @param member the member being documented. * @return a header content for the section. */ protected Content getHead(MemberDoc member) { Content memberContent = new StringContent(member.name()); Content heading = HtmlTree.HEADING(HtmlConstants.MEMBER_HEADING, memberContent); return heading; } /** * Return true if the given ProgramElement is inherited * by the class that is being documented. * * @param ped The ProgramElement being checked. * return true if the ProgramElement is being inherited and * false otherwise. */ protected boolean isInherited(ProgramElementDoc ped){ if(ped.isPrivate() || (ped.isPackagePrivate() && ! ped.containingPackage().equals(classdoc.containingPackage()))){ return false; } return true; } /** * Add deprecated information to the documentation tree * * @param deprmembers list of deprecated members * @param headingKey the caption for the deprecated members table * @param tableSummary the summary for the deprecated members table * @param tableHeader table headers for the deprecated members table * @param contentTree the content tree to which the deprecated members table will be added */ protected void addDeprecatedAPI(List deprmembers, String headingKey, String tableSummary, String[] tableHeader, Content contentTree) { if (deprmembers.size() > 0) { Content table = HtmlTree.TABLE(0, 3, 0, tableSummary, writer.getTableCaption(configuration.getResource(headingKey))); table.addContent(writer.getSummaryTableHeader(tableHeader, "col")); Content tbody = new HtmlTree(HtmlTag.TBODY); for (int i = 0; i < deprmembers.size(); i++) { ProgramElementDoc member =(ProgramElementDoc)deprmembers.get(i); HtmlTree td = HtmlTree.TD(HtmlStyle.colOne, getDeprecatedLink(member)); if (member.tags("deprecated").length > 0) writer.addInlineDeprecatedComment(member, member.tags("deprecated")[0], td); HtmlTree tr = HtmlTree.TR(td); if (i%2 == 0) tr.addStyle(HtmlStyle.altColor); else tr.addStyle(HtmlStyle.rowColor); tbody.addContent(tr); } table.addContent(tbody); Content li = HtmlTree.LI(HtmlStyle.blockList, table); Content ul = HtmlTree.UL(HtmlStyle.blockList, li); contentTree.addContent(ul); } } /** * Add use information to the documentation tree. * * @param mems list of program elements for which the use information will be added * @param heading the section heading * @param tableSummary the summary for the use table * @param contentTree the content tree to which the use information will be added */ protected void addUseInfo(List mems, Content heading, String tableSummary, Content contentTree) { if (mems == null) { return; } List members = mems; boolean printedUseTableHeader = false; if (members.size() > 0) { Content table = HtmlTree.TABLE(0, 3, 0, tableSummary, writer.getTableCaption(heading)); Content tbody = new HtmlTree(HtmlTag.TBODY); Iterator it = members.iterator(); for (int i = 0; it.hasNext(); i++) { ProgramElementDoc pgmdoc = it.next(); ClassDoc cd = pgmdoc.containingClass(); if (!printedUseTableHeader) { table.addContent(writer.getSummaryTableHeader( this.getSummaryTableHeader(pgmdoc), "col")); printedUseTableHeader = true; } HtmlTree tr = new HtmlTree(HtmlTag.TR); if (i % 2 == 0) { tr.addStyle(HtmlStyle.altColor); } else { tr.addStyle(HtmlStyle.rowColor); } HtmlTree tdFirst = new HtmlTree(HtmlTag.TD); tdFirst.addStyle(HtmlStyle.colFirst); writer.addSummaryType(this, pgmdoc, tdFirst); tr.addContent(tdFirst); HtmlTree tdLast = new HtmlTree(HtmlTag.TD); tdLast.addStyle(HtmlStyle.colLast); if (cd != null && !(pgmdoc instanceof ConstructorDoc) && !(pgmdoc instanceof ClassDoc)) { HtmlTree name = new HtmlTree(HtmlTag.SPAN); name.addStyle(HtmlStyle.strong); name.addContent(cd.name() + "."); tdLast.addContent(name); } addSummaryLink(pgmdoc instanceof ClassDoc ? LinkInfoImpl.Kind.CLASS_USE : LinkInfoImpl.Kind.MEMBER, cd, pgmdoc, tdLast); writer.addSummaryLinkComment(this, pgmdoc, tdLast); tr.addContent(tdLast); tbody.addContent(tr); } table.addContent(tbody); contentTree.addContent(table); } } /** * Add the navigation detail link. * * @param members the members to be linked * @param liNav the content tree to which the navigation detail link will be added */ protected void addNavDetailLink(List members, Content liNav) { addNavDetailLink(members.size() > 0 ? true : false, liNav); } /** * Add the navigation summary link. * * @param members members to be linked * @param visibleMemberMap the visible inherited members map * @param liNav the content tree to which the navigation summary link will be added */ protected void addNavSummaryLink(List members, VisibleMemberMap visibleMemberMap, Content liNav) { if (members.size() > 0) { liNav.addContent(getNavSummaryLink(null, true)); return; } ClassDoc icd = classdoc.superclass(); while (icd != null) { List inhmembers = visibleMemberMap.getMembersFor(icd); if (inhmembers.size() > 0) { liNav.addContent(getNavSummaryLink(icd, true)); return; } icd = icd.superclass(); } liNav.addContent(getNavSummaryLink(null, false)); } protected void serialWarning(SourcePosition pos, String key, String a1, String a2) { if (configuration.serialwarn) { configuration.getDocletSpecificMsg().warning(pos, key, a1, a2); } } public ProgramElementDoc[] eligibleMembers(ProgramElementDoc[] members) { return nodepr? Util.excludeDeprecatedMembers(members): members; } /** * Add the member summary for the given class. * * @param classDoc the class that is being documented * @param member the member being documented * @param firstSentenceTags the first sentence tags to be added to the summary * @param tableContents the list of contents to which the documentation will be added * @param counter the counter for determining id and style for the table row */ public void addMemberSummary(ClassDoc classDoc, ProgramElementDoc member, Tag[] firstSentenceTags, List tableContents, int counter) { HtmlTree tdSummaryType = new HtmlTree(HtmlTag.TD); tdSummaryType.addStyle(HtmlStyle.colFirst); writer.addSummaryType(this, member, tdSummaryType); HtmlTree tdSummary = new HtmlTree(HtmlTag.TD); setSummaryColumnStyle(tdSummary); addSummaryLink(classDoc, member, tdSummary); writer.addSummaryLinkComment(this, member, firstSentenceTags, tdSummary); HtmlTree tr = HtmlTree.TR(tdSummaryType); tr.addContent(tdSummary); if (member instanceof MethodDoc && !member.isAnnotationTypeElement()) { int methodType = (member.isStatic()) ? MethodTypes.STATIC.value() : MethodTypes.INSTANCE.value(); if (member.containingClass().isInterface()) { methodType = (((MethodDoc) member).isAbstract()) ? methodType | MethodTypes.ABSTRACT.value() : methodType | MethodTypes.DEFAULT.value(); } else { methodType = (((MethodDoc) member).isAbstract()) ? methodType | MethodTypes.ABSTRACT.value() : methodType | MethodTypes.CONCRETE.value(); } if (Util.isDeprecated(member) || Util.isDeprecated(classdoc)) { methodType = methodType | MethodTypes.DEPRECATED.value(); } methodTypesOr = methodTypesOr | methodType; String tableId = "i" + counter; typeMap.put(tableId, methodType); tr.addAttr(HtmlAttr.ID, tableId); } if (counter%2 == 0) tr.addStyle(HtmlStyle.altColor); else tr.addStyle(HtmlStyle.rowColor); tableContents.add(tr); } /** * Generate the method types set and return true if the method summary table * needs to show tabs. * * @return true if the table should show tabs */ public boolean showTabs() { int value; for (MethodTypes type : EnumSet.allOf(MethodTypes.class)) { value = type.value(); if ((value & methodTypesOr) == value) { methodTypes.add(type); } } boolean showTabs = methodTypes.size() > 1; if (showTabs) { methodTypes.add(MethodTypes.ALL); } return showTabs; } /** * Set the style for the summary column. * * @param tdTree the column for which the style will be set */ public void setSummaryColumnStyle(HtmlTree tdTree) { tdTree.addStyle(HtmlStyle.colLast); } /** * Add inherited member summary for the given class and member. * * @param classDoc the class the inherited member belongs to * @param nestedClass the inherited member that is summarized * @param isFirst true if this is the first member in the list * @param isLast true if this is the last member in the list * @param linksTree the content tree to which the summary will be added */ public void addInheritedMemberSummary(ClassDoc classDoc, ProgramElementDoc nestedClass, boolean isFirst, boolean isLast, Content linksTree) { writer.addInheritedMemberSummary(this, classDoc, nestedClass, isFirst, linksTree); } /** * Get the inherited summary header for the given class. * * @param classDoc the class the inherited member belongs to * @return a content tree for the inherited summary header */ public Content getInheritedSummaryHeader(ClassDoc classDoc) { Content inheritedTree = writer.getMemberTreeHeader(); writer.addInheritedSummaryHeader(this, classDoc, inheritedTree); return inheritedTree; } /** * Get the inherited summary links tree. * * @return a content tree for the inherited summary links */ public Content getInheritedSummaryLinksTree() { return new HtmlTree(HtmlTag.CODE); } /** * Get the summary table tree for the given class. * * @param classDoc the class for which the summary table is generated * @param tableContents list of contents to be displayed in the summary table * @return a content tree for the summary table */ public Content getSummaryTableTree(ClassDoc classDoc, List tableContents) { return writer.getSummaryTableTree(this, classDoc, tableContents, showTabs()); } /** * Get the member tree to be documented. * * @param memberTree the content tree of member to be documented * @return a content tree that will be added to the class documentation */ public Content getMemberTree(Content memberTree) { return writer.getMemberTree(memberTree); } /** * Get the member tree to be documented. * * @param memberTree the content tree of member to be documented * @param isLastContent true if the content to be added is the last content * @return a content tree that will be added to the class documentation */ public Content getMemberTree(Content memberTree, boolean isLastContent) { if (isLastContent) return HtmlTree.UL(HtmlStyle.blockListLast, memberTree); else return HtmlTree.UL(HtmlStyle.blockList, memberTree); } } ././@LongLink0000000000000000000000000000016400000000000011216 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/AbstractPackageIndexWriter.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/AbstractPackageI0000644000000000000000000002042512214026367032102 0ustar 00000000000000/* * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html; import java.io.*; import java.util.*; import com.sun.javadoc.*; import com.sun.tools.doclets.formats.html.markup.*; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.DocPath; /** * Abstract class to generate the overview files in * Frame and Non-Frame format. This will be sub-classed by to * generate overview-frame.html as well as overview-summary.html. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Atul M Dambalkar * @author Bhavesh Patel (Modified) */ public abstract class AbstractPackageIndexWriter extends HtmlDocletWriter { /** * Array of Packages to be documented. */ protected PackageDoc[] packages; /** * Constructor. Also initializes the packages variable. * * @param configuration The current configuration * @param filename Name of the package index file to be generated. */ public AbstractPackageIndexWriter(ConfigurationImpl configuration, DocPath filename) throws IOException { super(configuration, filename); packages = configuration.packages; } /** * Adds the navigation bar header to the documentation tree. * * @param body the document tree to which the navigation bar header will be added */ protected abstract void addNavigationBarHeader(Content body); /** * Adds the navigation bar footer to the documentation tree. * * @param body the document tree to which the navigation bar footer will be added */ protected abstract void addNavigationBarFooter(Content body); /** * Adds the overview header to the documentation tree. * * @param body the document tree to which the overview header will be added */ protected abstract void addOverviewHeader(Content body); /** * Adds the packages list to the documentation tree. * * @param packages an array of packagedoc objects * @param text caption for the table * @param tableSummary summary for the table * @param body the document tree to which the packages list will be added */ protected abstract void addPackagesList(PackageDoc[] packages, String text, String tableSummary, Content body); /** * Generate and prints the contents in the package index file. Call appropriate * methods from the sub-class in order to generate Frame or Non * Frame format. * * @param title the title of the window. * @param includeScript boolean set true if windowtitle script is to be included */ protected void buildPackageIndexFile(String title, boolean includeScript) throws IOException { String windowOverview = configuration.getText(title); Content body = getBody(includeScript, getWindowTitle(windowOverview)); addNavigationBarHeader(body); addOverviewHeader(body); addIndex(body); addOverview(body); addNavigationBarFooter(body); printHtmlDocument(configuration.metakeywords.getOverviewMetaKeywords(title, configuration.doctitle), includeScript, body); } /** * Default to no overview, override to add overview. * * @param body the document tree to which the overview will be added */ protected void addOverview(Content body) throws IOException { } /** * Adds the frame or non-frame package index to the documentation tree. * * @param body the document tree to which the index will be added */ protected void addIndex(Content body) { addIndexContents(packages, "doclet.Package_Summary", configuration.getText("doclet.Member_Table_Summary", configuration.getText("doclet.Package_Summary"), configuration.getText("doclet.packages")), body); } /** * Adds package index contents. Call appropriate methods from * the sub-classes. Adds it to the body HtmlTree * * @param packages array of packages to be documented * @param text string which will be used as the heading * @param tableSummary summary for the table * @param body the document tree to which the index contents will be added */ protected void addIndexContents(PackageDoc[] packages, String text, String tableSummary, Content body) { if (packages.length > 0) { Arrays.sort(packages); HtmlTree div = new HtmlTree(HtmlTag.DIV); div.addStyle(HtmlStyle.indexHeader); addAllClassesLink(div); if (configuration.showProfiles) { addAllProfilesLink(div); } body.addContent(div); if (configuration.showProfiles) { Content profileSummary = configuration.getResource("doclet.Profiles"); Content profilesTableSummary = configuration.getResource("doclet.Member_Table_Summary", configuration.getResource("doclet.Profile_Summary"), configuration.getResource("doclet.profiles")); addProfilesList(profileSummary, profilesTableSummary, body); } addPackagesList(packages, text, tableSummary, body); } } /** * Adds the doctitle to the documentation tree, if it is specified on the command line. * * @param body the document tree to which the title will be added */ protected void addConfigurationTitle(Content body) { if (configuration.doctitle.length() > 0) { Content title = new RawHtml(configuration.doctitle); Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, HtmlStyle.title, title); Content div = HtmlTree.DIV(HtmlStyle.header, heading); body.addContent(div); } } /** * Returns highlighted "Overview", in the navigation bar as this is the * overview page. * * @return a Content object to be added to the documentation tree */ protected Content getNavLinkContents() { Content li = HtmlTree.LI(HtmlStyle.navBarCell1Rev, overviewLabel); return li; } /** * Do nothing. This will be overridden. * * @param div the document tree to which the all classes link will be added */ protected void addAllClassesLink(Content div) { } /** * Do nothing. This will be overridden. * * @param div the document tree to which the all profiles link will be added */ protected void addAllProfilesLink(Content div) { } /** * Do nothing. This will be overridden. * * @param profileSummary the profile summary heading * @param profilesTableSummary the profiles table summary information * @param body the content tree to which the profiles list will be added */ protected void addProfilesList(Content profileSummary, Content profilesTableSummary, Content body) { } } ././@LongLink0000000000000000000000000000016400000000000011216 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/AbstractProfileIndexWriter.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/AbstractProfileI0000644000000000000000000002506612214026367032155 0ustar 00000000000000/* * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html; import java.io.*; import com.sun.tools.javac.sym.Profiles; import com.sun.tools.doclets.formats.html.markup.*; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.DocPath; /** * Abstract class to generate the profile overview files in * Frame and Non-Frame format. This will be sub-classed to * generate profile-overview-frame.html as well as profile-overview-summary.html. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Bhavesh Patel */ public abstract class AbstractProfileIndexWriter extends HtmlDocletWriter { /** * Profiles to be documented. */ protected Profiles profiles; /** * Constructor. Also initializes the profiles variable. * * @param configuration The current configuration * @param filename Name of the profile index file to be generated. */ public AbstractProfileIndexWriter(ConfigurationImpl configuration, DocPath filename) throws IOException { super(configuration, filename); profiles = configuration.profiles; } /** * Adds the navigation bar header to the documentation tree. * * @param body the document tree to which the navigation bar header will be added */ protected abstract void addNavigationBarHeader(Content body); /** * Adds the navigation bar footer to the documentation tree. * * @param body the document tree to which the navigation bar footer will be added */ protected abstract void addNavigationBarFooter(Content body); /** * Adds the overview header to the documentation tree. * * @param body the document tree to which the overview header will be added */ protected abstract void addOverviewHeader(Content body); /** * Adds the profiles list to the documentation tree. * * @param profiles profiles object * @param text caption for the table * @param tableSummary summary for the table * @param body the document tree to which the profiles list will be added */ protected abstract void addProfilesList(Profiles profiles, String text, String tableSummary, Content body); /** * Adds the profile packages list to the documentation tree. * * @param profiles profiles object * @param text caption for the table * @param tableSummary summary for the table * @param body the document tree to which the profiles list will be added * @param profileName the name for the profile being documented */ protected abstract void addProfilePackagesList(Profiles profiles, String text, String tableSummary, Content body, String profileName); /** * Generate and prints the contents in the profile index file. Call appropriate * methods from the sub-class in order to generate Frame or Non * Frame format. * * @param title the title of the window. * @param includeScript boolean set true if windowtitle script is to be included */ protected void buildProfileIndexFile(String title, boolean includeScript) throws IOException { String windowOverview = configuration.getText(title); Content body = getBody(includeScript, getWindowTitle(windowOverview)); addNavigationBarHeader(body); addOverviewHeader(body); addIndex(body); addOverview(body); addNavigationBarFooter(body); printHtmlDocument(configuration.metakeywords.getOverviewMetaKeywords(title, configuration.doctitle), includeScript, body); } /** * Generate and prints the contents in the profile packages index file. Call appropriate * methods from the sub-class in order to generate Frame or Non * Frame format. * * @param title the title of the window. * @param includeScript boolean set true if windowtitle script is to be included * @param profileName the name of the profile being documented */ protected void buildProfilePackagesIndexFile(String title, boolean includeScript, String profileName) throws IOException { String windowOverview = configuration.getText(title); Content body = getBody(includeScript, getWindowTitle(windowOverview)); addNavigationBarHeader(body); addOverviewHeader(body); addProfilePackagesIndex(body, profileName); addOverview(body); addNavigationBarFooter(body); printHtmlDocument(configuration.metakeywords.getOverviewMetaKeywords(title, configuration.doctitle), includeScript, body); } /** * Default to no overview, override to add overview. * * @param body the document tree to which the overview will be added */ protected void addOverview(Content body) throws IOException { } /** * Adds the frame or non-frame profile index to the documentation tree. * * @param body the document tree to which the index will be added */ protected void addIndex(Content body) { addIndexContents(profiles, "doclet.Profile_Summary", configuration.getText("doclet.Member_Table_Summary", configuration.getText("doclet.Profile_Summary"), configuration.getText("doclet.profiles")), body); } /** * Adds the frame or non-frame profile packages index to the documentation tree. * * @param body the document tree to which the index will be added * @param profileName the name of the profile being documented */ protected void addProfilePackagesIndex(Content body, String profileName) { addProfilePackagesIndexContents(profiles, "doclet.Profile_Summary", configuration.getText("doclet.Member_Table_Summary", configuration.getText("doclet.Profile_Summary"), configuration.getText("doclet.profiles")), body, profileName); } /** * Adds profile index contents. Call appropriate methods from * the sub-classes. Adds it to the body HtmlTree * * @param profiles profiles to be documented * @param text string which will be used as the heading * @param tableSummary summary for the table * @param body the document tree to which the index contents will be added */ protected void addIndexContents(Profiles profiles, String text, String tableSummary, Content body) { if (profiles.getProfileCount() > 0) { HtmlTree div = new HtmlTree(HtmlTag.DIV); div.addStyle(HtmlStyle.indexHeader); addAllClassesLink(div); addAllPackagesLink(div); body.addContent(div); addProfilesList(profiles, text, tableSummary, body); } } /** * Adds profile packages index contents. Call appropriate methods from * the sub-classes. Adds it to the body HtmlTree * * @param profiles profiles to be documented * @param text string which will be used as the heading * @param tableSummary summary for the table * @param body the document tree to which the index contents will be added * @param profileName the name of the profile being documented */ protected void addProfilePackagesIndexContents(Profiles profiles, String text, String tableSummary, Content body, String profileName) { HtmlTree div = new HtmlTree(HtmlTag.DIV); div.addStyle(HtmlStyle.indexHeader); addAllClassesLink(div); addAllPackagesLink(div); addAllProfilesLink(div); body.addContent(div); addProfilePackagesList(profiles, text, tableSummary, body, profileName); } /** * Adds the doctitle to the documentation tree, if it is specified on the command line. * * @param body the document tree to which the title will be added */ protected void addConfigurationTitle(Content body) { if (configuration.doctitle.length() > 0) { Content title = new RawHtml(configuration.doctitle); Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, HtmlStyle.title, title); Content div = HtmlTree.DIV(HtmlStyle.header, heading); body.addContent(div); } } /** * Returns highlighted "Overview", in the navigation bar as this is the * overview page. * * @return a Content object to be added to the documentation tree */ protected Content getNavLinkContents() { Content li = HtmlTree.LI(HtmlStyle.navBarCell1Rev, overviewLabel); return li; } /** * Do nothing. This will be overridden in ProfileIndexFrameWriter. * * @param div the document tree to which the all classes link will be added */ protected void addAllClassesLink(Content div) { } /** * Do nothing. This will be overridden in ProfileIndexFrameWriter. * * @param div the document tree to which the all packages link will be added */ protected void addAllPackagesLink(Content div) { } /** * Do nothing. This will be overridden in ProfilePackageIndexFrameWriter. * * @param div the document tree to which the all profiles link will be added */ protected void addAllProfilesLink(Content div) { } } ././@LongLink0000000000000000000000000000015400000000000011215 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/AbstractTreeWriter.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/AbstractTreeWrit0000644000000000000000000001626712214026367032214 0ustar 00000000000000/* * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html; import java.io.*; import java.util.*; import com.sun.javadoc.*; import com.sun.tools.doclets.formats.html.markup.*; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.*; /** * Abstract class to print the class hierarchy page for all the Classes. This * is sub-classed by {@link PackageTreeWriter} and {@link TreeWriter} to * generate the Package Tree and global Tree(for all the classes and packages) * pages. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Atul M Dambalkar */ public abstract class AbstractTreeWriter extends HtmlDocletWriter { /** * The class and interface tree built by using {@link ClassTree} */ protected final ClassTree classtree; private static final String LI_CIRCLE = "circle"; /** * Constructor initializes classtree variable. This constructor will be used * while generating global tree file "overview-tree.html". * * @param configuration The current configuration * @param filename File to be generated. * @param classtree Tree built by {@link ClassTree}. * @throws IOException * @throws DocletAbortException */ protected AbstractTreeWriter(ConfigurationImpl configuration, DocPath filename, ClassTree classtree) throws IOException { super(configuration, filename); this.classtree = classtree; } /** * Add each level of the class tree. For each sub-class or * sub-interface indents the next level information. * Recurses itself to add subclasses info. * * @param parent the superclass or superinterface of the list * @param list list of the sub-classes at this level * @param isEnum true if we are generating a tree for enums * @param contentTree the content tree to which the level information will be added */ protected void addLevelInfo(ClassDoc parent, List list, boolean isEnum, Content contentTree) { int size = list.size(); if (size > 0) { Content ul = new HtmlTree(HtmlTag.UL); for (int i = 0; i < size; i++) { ClassDoc local = list.get(i); HtmlTree li = new HtmlTree(HtmlTag.LI); li.addAttr(HtmlAttr.TYPE, LI_CIRCLE); addPartialInfo(local, li); addExtendsImplements(parent, local, li); addLevelInfo(local, classtree.subs(local, isEnum), isEnum, li); // Recurse ul.addContent(li); } contentTree.addContent(ul); } } /** * Add the heading for the tree depending upon tree type if it's a * Class Tree or Interface tree. * * @param list List of classes which are at the most base level, all the * other classes in this run will derive from these classes * @param heading heading for the tree * @param div the content tree to which the tree will be added */ protected void addTree(List list, String heading, Content div) { if (list.size() > 0) { ClassDoc firstClassDoc = list.get(0); Content headingContent = getResource(heading); div.addContent(HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, true, headingContent)); addLevelInfo(!firstClassDoc.isInterface()? firstClassDoc : null, list, list == classtree.baseEnums(), div); } } /** * Add information regarding the classes which this class extends or * implements. * * @param parent the parent class of the class being documented * @param cd the classdoc under consideration * @param contentTree the content tree to which the information will be added */ protected void addExtendsImplements(ClassDoc parent, ClassDoc cd, Content contentTree) { ClassDoc[] interfaces = cd.interfaces(); if (interfaces.length > (cd.isInterface()? 1 : 0)) { Arrays.sort(interfaces); int counter = 0; for (int i = 0; i < interfaces.length; i++) { if (parent != interfaces[i]) { if (! (interfaces[i].isPublic() || Util.isLinkable(interfaces[i], configuration))) { continue; } if (counter == 0) { if (cd.isInterface()) { contentTree.addContent(" ("); contentTree.addContent(getResource("doclet.also")); contentTree.addContent(" extends "); } else { contentTree.addContent(" (implements "); } } else { contentTree.addContent(", "); } addPreQualifiedClassLink(LinkInfoImpl.Kind.TREE, interfaces[i], contentTree); counter++; } } if (counter > 0) { contentTree.addContent(")"); } } } /** * Add information about the class kind, if it's a "class" or "interface". * * @param cd the class being documented * @param contentTree the content tree to which the information will be added */ protected void addPartialInfo(ClassDoc cd, Content contentTree) { addPreQualifiedStrongClassLink(LinkInfoImpl.Kind.TREE, cd, contentTree); } /** * Get the tree label for the navigation bar. * * @return a content tree for the tree label */ protected Content getNavLinkTree() { Content li = HtmlTree.LI(HtmlStyle.navBarCell1Rev, treeLabel); return li; } } ././@LongLink0000000000000000000000000000015700000000000011220 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/AllClassesFrameWriter.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/AllClassesFrameW0000644000000000000000000001554112214026367032105 0ustar 00000000000000/* * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html; import java.io.*; import java.util.*; import com.sun.javadoc.*; import com.sun.tools.doclets.formats.html.markup.*; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.*; /** * Generate the file with list of all the classes in this run. This page will be * used in the left-hand bottom frame, when "All Classes" link is clicked in * the left-hand top frame. The name of the generated file is * "allclasses-frame.html". * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Atul M Dambalkar * @author Doug Kramer * @author Bhavesh Patel (Modified) */ public class AllClassesFrameWriter extends HtmlDocletWriter { /** * Index of all the classes. */ protected IndexBuilder indexbuilder; /** * BR tag to be used within a document tree. */ final HtmlTree BR = new HtmlTree(HtmlTag.BR); /** * Construct AllClassesFrameWriter object. Also initializes the indexbuilder * variable in this class. * @param configuration The current configuration * @param filename Path to the file which is getting generated. * @param indexbuilder Unicode based Index from {@link IndexBuilder} * @throws IOException * @throws DocletAbortException */ public AllClassesFrameWriter(ConfigurationImpl configuration, DocPath filename, IndexBuilder indexbuilder) throws IOException { super(configuration, filename); this.indexbuilder = indexbuilder; } /** * Create AllClassesFrameWriter object. Then use it to generate the * "allclasses-frame.html" file. Generate the file in the current or the * destination directory. * * @param indexbuilder IndexBuilder object for all classes index. * @throws DocletAbortException */ public static void generate(ConfigurationImpl configuration, IndexBuilder indexbuilder) { AllClassesFrameWriter allclassgen; DocPath filename = DocPaths.ALLCLASSES_FRAME; try { allclassgen = new AllClassesFrameWriter(configuration, filename, indexbuilder); allclassgen.buildAllClassesFile(true); allclassgen.close(); filename = DocPaths.ALLCLASSES_NOFRAME; allclassgen = new AllClassesFrameWriter(configuration, filename, indexbuilder); allclassgen.buildAllClassesFile(false); allclassgen.close(); } catch (IOException exc) { configuration.standardmessage. error("doclet.exception_encountered", exc.toString(), filename); throw new DocletAbortException(); } } /** * Print all the classes in the file. * @param wantFrames True if we want frames. */ protected void buildAllClassesFile(boolean wantFrames) throws IOException { String label = configuration.getText("doclet.All_Classes"); Content body = getBody(false, getWindowTitle(label)); Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, HtmlStyle.bar, allclassesLabel); body.addContent(heading); Content ul = new HtmlTree(HtmlTag.UL); // Generate the class links and add it to the tdFont tree. addAllClasses(ul, wantFrames); Content div = HtmlTree.DIV(HtmlStyle.indexContainer, ul); body.addContent(div); printHtmlDocument(null, false, body); } /** * Use the sorted index of all the classes and add all the classes to the * content list. * * @param content HtmlTree content to which all classes information will be added * @param wantFrames True if we want frames. */ protected void addAllClasses(Content content, boolean wantFrames) { for (int i = 0; i < indexbuilder.elements().length; i++) { Character unicode = (Character)((indexbuilder.elements())[i]); addContents(indexbuilder.getMemberList(unicode), wantFrames, content); } } /** * Given a list of classes, generate links for each class or interface. * If the class kind is interface, print it in the italics font. Also all * links should target the right-hand frame. If clicked on any class name * in this page, appropriate class page should get opened in the right-hand * frame. * * @param classlist Sorted list of classes. * @param wantFrames True if we want frames. * @param content HtmlTree content to which the links will be added */ protected void addContents(List classlist, boolean wantFrames, Content content) { for (int i = 0; i < classlist.size(); i++) { ClassDoc cd = (ClassDoc)classlist.get(i); if (!Util.isCoreClass(cd)) { continue; } Content label = italicsClassName(cd, false); Content linkContent; if (wantFrames) { linkContent = getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.ALL_CLASSES_FRAME, cd).label(label).target("classFrame")); } else { linkContent = getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.DEFAULT, cd).label(label)); } Content li = HtmlTree.LI(linkContent); content.addContent(li); } } } ././@LongLink0000000000000000000000000000020000000000000011205 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeOptionalMemberWriterImpl.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeOp0000644000000000000000000001222512214026367032224 0ustar 00000000000000/* * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html; import java.io.*; import com.sun.javadoc.*; import com.sun.tools.doclets.formats.html.markup.*; import com.sun.tools.doclets.internal.toolkit.*; /** * Writes annotation type optional member documentation in HTML format. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Jamie Ho * @author Bhavesh Patel (Modified) */ public class AnnotationTypeOptionalMemberWriterImpl extends AnnotationTypeRequiredMemberWriterImpl implements AnnotationTypeOptionalMemberWriter, MemberSummaryWriter { /** * Construct a new AnnotationTypeOptionalMemberWriterImpl. * * @param writer the writer that will write the output. * @param annotationType the AnnotationType that holds this member. */ public AnnotationTypeOptionalMemberWriterImpl(SubWriterHolderWriter writer, AnnotationTypeDoc annotationType) { super(writer, annotationType); } /** * {@inheritDoc} */ public Content getMemberSummaryHeader(ClassDoc classDoc, Content memberSummaryTree) { memberSummaryTree.addContent( HtmlConstants.START_OF_ANNOTATION_TYPE_OPTIONAL_MEMBER_SUMMARY); Content memberTree = writer.getMemberTreeHeader(); writer.addSummaryHeader(this, classDoc, memberTree); return memberTree; } /** * {@inheritDoc} */ public void addDefaultValueInfo(MemberDoc member, Content annotationDocTree) { if (((AnnotationTypeElementDoc) member).defaultValue() != null) { Content dt = HtmlTree.DT(writer.getResource("doclet.Default")); Content dl = HtmlTree.DL(dt); Content dd = HtmlTree.DD(new StringContent( ((AnnotationTypeElementDoc) member).defaultValue().toString())); dl.addContent(dd); annotationDocTree.addContent(dl); } } /** * {@inheritDoc} */ public void close() throws IOException { writer.close(); } /** * {@inheritDoc} */ public void addSummaryLabel(Content memberTree) { Content label = HtmlTree.HEADING(HtmlConstants.SUMMARY_HEADING, writer.getResource("doclet.Annotation_Type_Optional_Member_Summary")); memberTree.addContent(label); } /** * {@inheritDoc} */ public String getTableSummary() { return configuration.getText("doclet.Member_Table_Summary", configuration.getText("doclet.Annotation_Type_Optional_Member_Summary"), configuration.getText("doclet.annotation_type_optional_members")); } /** * {@inheritDoc} */ public Content getCaption() { return configuration.getResource("doclet.Annotation_Type_Optional_Members"); } /** * {@inheritDoc} */ public String[] getSummaryTableHeader(ProgramElementDoc member) { String[] header = new String[] { writer.getModifierTypeHeader(), configuration.getText("doclet.0_and_1", configuration.getText("doclet.Annotation_Type_Optional_Member"), configuration.getText("doclet.Description")) }; return header; } /** * {@inheritDoc} */ public void addSummaryAnchor(ClassDoc cd, Content memberTree) { memberTree.addContent(writer.getMarkerAnchor( "annotation_type_optional_element_summary")); } /** * {@inheritDoc} */ protected Content getNavSummaryLink(ClassDoc cd, boolean link) { if (link) { return writer.getHyperLink("annotation_type_optional_element_summary", writer.getResource("doclet.navAnnotationTypeOptionalMember")); } else { return writer.getResource("doclet.navAnnotationTypeOptionalMember"); } } } ././@LongLink0000000000000000000000000000020000000000000011205 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeRequiredMemberWriterImpl.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeRe0000644000000000000000000002221212214026367032211 0ustar 00000000000000/* * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html; import java.io.*; import com.sun.javadoc.*; import com.sun.tools.doclets.formats.html.markup.*; import com.sun.tools.doclets.internal.toolkit.*; /** * Writes annotation type required member documentation in HTML format. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Jamie Ho * @author Bhavesh Patel (Modified) */ public class AnnotationTypeRequiredMemberWriterImpl extends AbstractMemberWriter implements AnnotationTypeRequiredMemberWriter, MemberSummaryWriter { /** * Construct a new AnnotationTypeRequiredMemberWriterImpl. * * @param writer the writer that will write the output. * @param annotationType the AnnotationType that holds this member. */ public AnnotationTypeRequiredMemberWriterImpl(SubWriterHolderWriter writer, AnnotationTypeDoc annotationType) { super(writer, annotationType); } /** * {@inheritDoc} */ public Content getMemberSummaryHeader(ClassDoc classDoc, Content memberSummaryTree) { memberSummaryTree.addContent( HtmlConstants.START_OF_ANNOTATION_TYPE_REQUIRED_MEMBER_SUMMARY); Content memberTree = writer.getMemberTreeHeader(); writer.addSummaryHeader(this, classDoc, memberTree); return memberTree; } /** * {@inheritDoc} */ public void addAnnotationDetailsTreeHeader(ClassDoc classDoc, Content memberDetailsTree) { if (!writer.printedAnnotationHeading) { memberDetailsTree.addContent(writer.getMarkerAnchor( "annotation_type_element_detail")); Content heading = HtmlTree.HEADING(HtmlConstants.DETAILS_HEADING, writer.annotationTypeDetailsLabel); memberDetailsTree.addContent(heading); writer.printedAnnotationHeading = true; } } /** * {@inheritDoc} */ public Content getAnnotationDocTreeHeader(MemberDoc member, Content annotationDetailsTree) { annotationDetailsTree.addContent( writer.getMarkerAnchor(member.name() + ((ExecutableMemberDoc) member).signature())); Content annotationDocTree = writer.getMemberTreeHeader(); Content heading = new HtmlTree(HtmlConstants.MEMBER_HEADING); heading.addContent(member.name()); annotationDocTree.addContent(heading); return annotationDocTree; } /** * {@inheritDoc} */ public Content getSignature(MemberDoc member) { Content pre = new HtmlTree(HtmlTag.PRE); writer.addAnnotationInfo(member, pre); addModifiers(member, pre); Content link = writer.getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.MEMBER, getType(member))); pre.addContent(link); pre.addContent(writer.getSpace()); if (configuration.linksource) { Content memberName = new StringContent(member.name()); writer.addSrcLink(member, memberName, pre); } else { addName(member.name(), pre); } return pre; } /** * {@inheritDoc} */ public void addDeprecated(MemberDoc member, Content annotationDocTree) { addDeprecatedInfo(member, annotationDocTree); } /** * {@inheritDoc} */ public void addComments(MemberDoc member, Content annotationDocTree) { addComment(member, annotationDocTree); } /** * {@inheritDoc} */ public void addTags(MemberDoc member, Content annotationDocTree) { writer.addTagsInfo(member, annotationDocTree); } /** * {@inheritDoc} */ public Content getAnnotationDetails(Content annotationDetailsTree) { return getMemberTree(annotationDetailsTree); } /** * {@inheritDoc} */ public Content getAnnotationDoc(Content annotationDocTree, boolean isLastContent) { return getMemberTree(annotationDocTree, isLastContent); } /** * Close the writer. */ public void close() throws IOException { writer.close(); } /** * {@inheritDoc} */ public void addSummaryLabel(Content memberTree) { Content label = HtmlTree.HEADING(HtmlConstants.SUMMARY_HEADING, writer.getResource("doclet.Annotation_Type_Required_Member_Summary")); memberTree.addContent(label); } /** * {@inheritDoc} */ public String getTableSummary() { return configuration.getText("doclet.Member_Table_Summary", configuration.getText("doclet.Annotation_Type_Required_Member_Summary"), configuration.getText("doclet.annotation_type_required_members")); } /** * {@inheritDoc} */ public Content getCaption() { return configuration.getResource("doclet.Annotation_Type_Required_Members"); } /** * {@inheritDoc} */ public String[] getSummaryTableHeader(ProgramElementDoc member) { String[] header = new String[] { writer.getModifierTypeHeader(), configuration.getText("doclet.0_and_1", configuration.getText("doclet.Annotation_Type_Required_Member"), configuration.getText("doclet.Description")) }; return header; } /** * {@inheritDoc} */ public void addSummaryAnchor(ClassDoc cd, Content memberTree) { memberTree.addContent(writer.getMarkerAnchor( "annotation_type_required_element_summary")); } /** * {@inheritDoc} */ public void addInheritedSummaryAnchor(ClassDoc cd, Content inheritedTree) { } /** * {@inheritDoc} */ public void addInheritedSummaryLabel(ClassDoc cd, Content inheritedTree) { } /** * {@inheritDoc} */ protected void addSummaryLink(LinkInfoImpl.Kind context, ClassDoc cd, ProgramElementDoc member, Content tdSummary) { Content strong = HtmlTree.STRONG( writer.getDocLink(context, (MemberDoc) member, member.name(), false)); Content code = HtmlTree.CODE(strong); tdSummary.addContent(code); } /** * {@inheritDoc} */ protected void addInheritedSummaryLink(ClassDoc cd, ProgramElementDoc member, Content linksTree) { //Not applicable. } /** * {@inheritDoc} */ protected void addSummaryType(ProgramElementDoc member, Content tdSummaryType) { MemberDoc m = (MemberDoc)member; addModifierAndType(m, getType(m), tdSummaryType); } /** * {@inheritDoc} */ protected Content getDeprecatedLink(ProgramElementDoc member) { return writer.getDocLink(LinkInfoImpl.Kind.MEMBER, (MemberDoc) member, ((MemberDoc)member).qualifiedName()); } /** * {@inheritDoc} */ protected Content getNavSummaryLink(ClassDoc cd, boolean link) { if (link) { return writer.getHyperLink("annotation_type_required_element_summary", writer.getResource("doclet.navAnnotationTypeRequiredMember")); } else { return writer.getResource("doclet.navAnnotationTypeRequiredMember"); } } /** * {@inheritDoc} */ protected void addNavDetailLink(boolean link, Content liNav) { if (link) { liNav.addContent(writer.getHyperLink("annotation_type_element_detail", writer.getResource("doclet.navAnnotationTypeMember"))); } else { liNav.addContent(writer.getResource("doclet.navAnnotationTypeMember")); } } private Type getType(MemberDoc member) { if (member instanceof FieldDoc) { return ((FieldDoc) member).type(); } else { return ((MethodDoc) member).returnType(); } } } ././@LongLink0000000000000000000000000000016200000000000011214 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeWriterImpl.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeWr0000644000000000000000000003350712214026367032244 0ustar 00000000000000/* * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html; import java.io.IOException; import com.sun.javadoc.*; import com.sun.tools.doclets.formats.html.markup.*; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.builders.*; import com.sun.tools.doclets.internal.toolkit.util.*; /** * Generate the Class Information Page. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @see com.sun.javadoc.ClassDoc * @see java.util.Collections * @see java.util.List * @see java.util.ArrayList * @see java.util.HashMap * * @author Atul M Dambalkar * @author Robert Field * @author Bhavesh Patel (Modified) */ public class AnnotationTypeWriterImpl extends SubWriterHolderWriter implements AnnotationTypeWriter { protected AnnotationTypeDoc annotationType; protected Type prev; protected Type next; /** * @param annotationType the annotation type being documented. * @param prevType the previous class that was documented. * @param nextType the next class being documented. */ public AnnotationTypeWriterImpl(ConfigurationImpl configuration, AnnotationTypeDoc annotationType, Type prevType, Type nextType) throws Exception { super(configuration, DocPath.forClass(annotationType)); this.annotationType = annotationType; configuration.currentcd = annotationType.asClassDoc(); this.prev = prevType; this.next = nextType; } /** * Get this package link. * * @return a content tree for the package link */ protected Content getNavLinkPackage() { Content linkContent = getHyperLink(DocPaths.PACKAGE_SUMMARY, packageLabel); Content li = HtmlTree.LI(linkContent); return li; } /** * Get the class link. * * @return a content tree for the class link */ protected Content getNavLinkClass() { Content li = HtmlTree.LI(HtmlStyle.navBarCell1Rev, classLabel); return li; } /** * Get the class use link. * * @return a content tree for the class use link */ protected Content getNavLinkClassUse() { Content linkContent = getHyperLink(DocPaths.CLASS_USE.resolve(filename), useLabel); Content li = HtmlTree.LI(linkContent); return li; } /** * Get link to previous class. * * @return a content tree for the previous class link */ public Content getNavLinkPrevious() { Content li; if (prev != null) { Content prevLink = getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.CLASS, prev.asClassDoc()) .label(configuration.getText("doclet.Prev_Class")).strong(true)); li = HtmlTree.LI(prevLink); } else li = HtmlTree.LI(prevclassLabel); return li; } /** * Get link to next class. * * @return a content tree for the next class link */ public Content getNavLinkNext() { Content li; if (next != null) { Content nextLink = getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.CLASS, next.asClassDoc()) .label(configuration.getText("doclet.Next_Class")).strong(true)); li = HtmlTree.LI(nextLink); } else li = HtmlTree.LI(nextclassLabel); return li; } /** * {@inheritDoc} */ public Content getHeader(String header) { String pkgname = (annotationType.containingPackage() != null)? annotationType.containingPackage().name(): ""; String clname = annotationType.name(); Content bodyTree = getBody(true, getWindowTitle(clname)); addTop(bodyTree); addNavLinks(true, bodyTree); bodyTree.addContent(HtmlConstants.START_OF_CLASS_DATA); HtmlTree div = new HtmlTree(HtmlTag.DIV); div.addStyle(HtmlStyle.header); if (pkgname.length() > 0) { Content pkgNameContent = new StringContent(pkgname); Content pkgNameDiv = HtmlTree.DIV(HtmlStyle.subTitle, pkgNameContent); div.addContent(pkgNameDiv); } LinkInfoImpl linkInfo = new LinkInfoImpl(configuration, LinkInfoImpl.Kind.CLASS_HEADER, annotationType); Content headerContent = new StringContent(header); Content heading = HtmlTree.HEADING(HtmlConstants.CLASS_PAGE_HEADING, true, HtmlStyle.title, headerContent); heading.addContent(getTypeParameterLinks(linkInfo)); div.addContent(heading); bodyTree.addContent(div); return bodyTree; } /** * {@inheritDoc} */ public Content getAnnotationContentHeader() { return getContentHeader(); } /** * {@inheritDoc} */ public void addFooter(Content contentTree) { contentTree.addContent(HtmlConstants.END_OF_CLASS_DATA); addNavLinks(false, contentTree); addBottom(contentTree); } /** * {@inheritDoc} */ public void printDocument(Content contentTree) throws IOException { printHtmlDocument(configuration.metakeywords.getMetaKeywords(annotationType), true, contentTree); } /** * {@inheritDoc} */ public Content getAnnotationInfoTreeHeader() { return getMemberTreeHeader(); } /** * {@inheritDoc} */ public Content getAnnotationInfo(Content annotationInfoTree) { return getMemberTree(HtmlStyle.description, annotationInfoTree); } /** * {@inheritDoc} */ public void addAnnotationTypeSignature(String modifiers, Content annotationInfoTree) { annotationInfoTree.addContent(new HtmlTree(HtmlTag.BR)); Content pre = new HtmlTree(HtmlTag.PRE); addAnnotationInfo(annotationType, pre); pre.addContent(modifiers); LinkInfoImpl linkInfo = new LinkInfoImpl(configuration, LinkInfoImpl.Kind.CLASS_SIGNATURE, annotationType); Content annotationName = new StringContent(annotationType.name()); Content parameterLinks = getTypeParameterLinks(linkInfo); if (configuration.linksource) { addSrcLink(annotationType, annotationName, pre); pre.addContent(parameterLinks); } else { Content span = HtmlTree.SPAN(HtmlStyle.strong, annotationName); span.addContent(parameterLinks); pre.addContent(span); } annotationInfoTree.addContent(pre); } /** * {@inheritDoc} */ public void addAnnotationTypeDescription(Content annotationInfoTree) { if(!configuration.nocomment) { if (annotationType.inlineTags().length > 0) { addInlineComment(annotationType, annotationInfoTree); } } } /** * {@inheritDoc} */ public void addAnnotationTypeTagInfo(Content annotationInfoTree) { if(!configuration.nocomment) { addTagsInfo(annotationType, annotationInfoTree); } } /** * {@inheritDoc} */ public void addAnnotationTypeDeprecationInfo(Content annotationInfoTree) { Content hr = new HtmlTree(HtmlTag.HR); annotationInfoTree.addContent(hr); Tag[] deprs = annotationType.tags("deprecated"); if (Util.isDeprecated(annotationType)) { Content strong = HtmlTree.STRONG(deprecatedPhrase); Content div = HtmlTree.DIV(HtmlStyle.block, strong); if (deprs.length > 0) { Tag[] commentTags = deprs[0].inlineTags(); if (commentTags.length > 0) { div.addContent(getSpace()); addInlineDeprecatedComment(annotationType, deprs[0], div); } } annotationInfoTree.addContent(div); } } /** * {@inheritDoc} */ public void addAnnotationDetailsMarker(Content memberDetails) { memberDetails.addContent(HtmlConstants.START_OF_ANNOTATION_TYPE_DETAILS); } /** * {@inheritDoc} */ protected Content getNavLinkTree() { Content treeLinkContent = getHyperLink(DocPaths.PACKAGE_TREE, treeLabel, "", ""); Content li = HtmlTree.LI(treeLinkContent); return li; } /** * Add summary details to the navigation bar. * * @param subDiv the content tree to which the summary detail links will be added */ protected void addSummaryDetailLinks(Content subDiv) { try { Content div = HtmlTree.DIV(getNavSummaryLinks()); div.addContent(getNavDetailLinks()); subDiv.addContent(div); } catch (Exception e) { e.printStackTrace(); throw new DocletAbortException(); } } /** * Get summary links for navigation bar. * * @return the content tree for the navigation summary links */ protected Content getNavSummaryLinks() throws Exception { Content li = HtmlTree.LI(summaryLabel); li.addContent(getSpace()); Content ulNav = HtmlTree.UL(HtmlStyle.subNavList, li); MemberSummaryBuilder memberSummaryBuilder = (MemberSummaryBuilder) configuration.getBuilderFactory().getMemberSummaryBuilder(this); Content liNavReq = new HtmlTree(HtmlTag.LI); addNavSummaryLink(memberSummaryBuilder, "doclet.navAnnotationTypeRequiredMember", VisibleMemberMap.ANNOTATION_TYPE_MEMBER_REQUIRED, liNavReq); addNavGap(liNavReq); ulNav.addContent(liNavReq); Content liNavOpt = new HtmlTree(HtmlTag.LI); addNavSummaryLink(memberSummaryBuilder, "doclet.navAnnotationTypeOptionalMember", VisibleMemberMap.ANNOTATION_TYPE_MEMBER_OPTIONAL, liNavOpt); ulNav.addContent(liNavOpt); return ulNav; } /** * Add the navigation summary link. * * @param builder builder for the member to be documented * @param label the label for the navigation * @param type type to be documented * @param liNav the content tree to which the navigation summary link will be added */ protected void addNavSummaryLink(MemberSummaryBuilder builder, String label, int type, Content liNav) { AbstractMemberWriter writer = ((AbstractMemberWriter) builder. getMemberSummaryWriter(type)); if (writer == null) { liNav.addContent(getResource(label)); } else { liNav.addContent(writer.getNavSummaryLink(null, ! builder.getVisibleMemberMap(type).noVisibleMembers())); } } /** * Get detail links for the navigation bar. * * @return the content tree for the detail links */ protected Content getNavDetailLinks() throws Exception { Content li = HtmlTree.LI(detailLabel); li.addContent(getSpace()); Content ulNav = HtmlTree.UL(HtmlStyle.subNavList, li); MemberSummaryBuilder memberSummaryBuilder = (MemberSummaryBuilder) configuration.getBuilderFactory().getMemberSummaryBuilder(this); AbstractMemberWriter writerOptional = ((AbstractMemberWriter) memberSummaryBuilder. getMemberSummaryWriter(VisibleMemberMap.ANNOTATION_TYPE_MEMBER_OPTIONAL)); AbstractMemberWriter writerRequired = ((AbstractMemberWriter) memberSummaryBuilder. getMemberSummaryWriter(VisibleMemberMap.ANNOTATION_TYPE_MEMBER_REQUIRED)); if (writerOptional != null){ Content liNavOpt = new HtmlTree(HtmlTag.LI); writerOptional.addNavDetailLink(annotationType.elements().length > 0, liNavOpt); ulNav.addContent(liNavOpt); } else if (writerRequired != null){ Content liNavReq = new HtmlTree(HtmlTag.LI); writerRequired.addNavDetailLink(annotationType.elements().length > 0, liNavReq); ulNav.addContent(liNavReq); } else { Content liNav = HtmlTree.LI(getResource("doclet.navAnnotationTypeMember")); ulNav.addContent(liNav); } return ulNav; } /** * Add gap between navigation bar elements. * * @param liNav the content tree to which the gap will be added */ protected void addNavGap(Content liNav) { liNav.addContent(getSpace()); liNav.addContent("|"); liNav.addContent(getSpace()); } /** * {@inheritDoc} */ public AnnotationTypeDoc getAnnotationTypeDoc() { return annotationType; } } ././@LongLink0000000000000000000000000000015000000000000011211 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.j0000644000000000000000000006043712214026367032130 0ustar 00000000000000/* * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html; import java.io.*; import java.util.*; import com.sun.javadoc.*; import com.sun.tools.doclets.formats.html.markup.*; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.*; /** * Generate class usage information. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Robert G. Field * @author Bhavesh Patel (Modified) */ public class ClassUseWriter extends SubWriterHolderWriter { final ClassDoc classdoc; Set pkgToPackageAnnotations = null; final Map> pkgToClassTypeParameter; final Map> pkgToClassAnnotations; final Map> pkgToMethodTypeParameter; final Map> pkgToMethodArgTypeParameter; final Map> pkgToMethodReturnTypeParameter; final Map> pkgToMethodAnnotations; final Map> pkgToMethodParameterAnnotations; final Map> pkgToFieldTypeParameter; final Map> pkgToFieldAnnotations; final Map> pkgToSubclass; final Map> pkgToSubinterface; final Map> pkgToImplementingClass; final Map> pkgToField; final Map> pkgToMethodReturn; final Map> pkgToMethodArgs; final Map> pkgToMethodThrows; final Map> pkgToConstructorAnnotations; final Map> pkgToConstructorParameterAnnotations; final Map> pkgToConstructorArgs; final Map> pkgToConstructorArgTypeParameter; final Map> pkgToConstructorThrows; final SortedSet pkgSet; final MethodWriterImpl methodSubWriter; final ConstructorWriterImpl constrSubWriter; final FieldWriterImpl fieldSubWriter; final NestedClassWriterImpl classSubWriter; // Summary for various use tables. final String classUseTableSummary; final String subclassUseTableSummary; final String subinterfaceUseTableSummary; final String fieldUseTableSummary; final String methodUseTableSummary; final String constructorUseTableSummary; /** * Constructor. * * @param filename the file to be generated. * @throws IOException * @throws DocletAbortException */ public ClassUseWriter(ConfigurationImpl configuration, ClassUseMapper mapper, DocPath filename, ClassDoc classdoc) throws IOException { super(configuration, filename); this.classdoc = classdoc; if (mapper.classToPackageAnnotations.containsKey(classdoc.qualifiedName())) pkgToPackageAnnotations = new HashSet(mapper.classToPackageAnnotations.get(classdoc.qualifiedName())); configuration.currentcd = classdoc; this.pkgSet = new TreeSet(); this.pkgToClassTypeParameter = pkgDivide(mapper.classToClassTypeParam); this.pkgToClassAnnotations = pkgDivide(mapper.classToClassAnnotations); this.pkgToMethodTypeParameter = pkgDivide(mapper.classToExecMemberDocTypeParam); this.pkgToMethodArgTypeParameter = pkgDivide(mapper.classToExecMemberDocArgTypeParam); this.pkgToFieldTypeParameter = pkgDivide(mapper.classToFieldDocTypeParam); this.pkgToFieldAnnotations = pkgDivide(mapper.annotationToFieldDoc); this.pkgToMethodReturnTypeParameter = pkgDivide(mapper.classToExecMemberDocReturnTypeParam); this.pkgToMethodAnnotations = pkgDivide(mapper.classToExecMemberDocAnnotations); this.pkgToMethodParameterAnnotations = pkgDivide(mapper.classToExecMemberDocParamAnnotation); this.pkgToSubclass = pkgDivide(mapper.classToSubclass); this.pkgToSubinterface = pkgDivide(mapper.classToSubinterface); this.pkgToImplementingClass = pkgDivide(mapper.classToImplementingClass); this.pkgToField = pkgDivide(mapper.classToField); this.pkgToMethodReturn = pkgDivide(mapper.classToMethodReturn); this.pkgToMethodArgs = pkgDivide(mapper.classToMethodArgs); this.pkgToMethodThrows = pkgDivide(mapper.classToMethodThrows); this.pkgToConstructorAnnotations = pkgDivide(mapper.classToConstructorAnnotations); this.pkgToConstructorParameterAnnotations = pkgDivide(mapper.classToConstructorParamAnnotation); this.pkgToConstructorArgs = pkgDivide(mapper.classToConstructorArgs); this.pkgToConstructorArgTypeParameter = pkgDivide(mapper.classToConstructorDocArgTypeParam); this.pkgToConstructorThrows = pkgDivide(mapper.classToConstructorThrows); //tmp test if (pkgSet.size() > 0 && mapper.classToPackage.containsKey(classdoc.qualifiedName()) && !pkgSet.equals(mapper.classToPackage.get(classdoc.qualifiedName()))) { configuration.root.printWarning("Internal error: package sets don't match: " + pkgSet + " with: " + mapper.classToPackage.get(classdoc.qualifiedName())); } methodSubWriter = new MethodWriterImpl(this); constrSubWriter = new ConstructorWriterImpl(this); fieldSubWriter = new FieldWriterImpl(this); classSubWriter = new NestedClassWriterImpl(this); classUseTableSummary = configuration.getText("doclet.Use_Table_Summary", configuration.getText("doclet.classes")); subclassUseTableSummary = configuration.getText("doclet.Use_Table_Summary", configuration.getText("doclet.subclasses")); subinterfaceUseTableSummary = configuration.getText("doclet.Use_Table_Summary", configuration.getText("doclet.subinterfaces")); fieldUseTableSummary = configuration.getText("doclet.Use_Table_Summary", configuration.getText("doclet.fields")); methodUseTableSummary = configuration.getText("doclet.Use_Table_Summary", configuration.getText("doclet.methods")); constructorUseTableSummary = configuration.getText("doclet.Use_Table_Summary", configuration.getText("doclet.constructors")); } /** * Write out class use pages. * @throws DocletAbortException */ public static void generate(ConfigurationImpl configuration, ClassTree classtree) { ClassUseMapper mapper = new ClassUseMapper(configuration.root, classtree); ClassDoc[] classes = configuration.root.classes(); for (int i = 0; i < classes.length; i++) { // If -nodeprecated option is set and the containing package is marked // as deprecated, do not generate the class-use page. We will still generate // the class-use page if the class is marked as deprecated but the containing // package is not since it could still be linked from that package-use page. if (!(configuration.nodeprecated && Util.isDeprecated(classes[i].containingPackage()))) ClassUseWriter.generate(configuration, mapper, classes[i]); } PackageDoc[] pkgs = configuration.packages; for (int i = 0; i < pkgs.length; i++) { // If -nodeprecated option is set and the package is marked // as deprecated, do not generate the package-use page. if (!(configuration.nodeprecated && Util.isDeprecated(pkgs[i]))) PackageUseWriter.generate(configuration, mapper, pkgs[i]); } } private Map> pkgDivide(Map> classMap) { Map> map = new HashMap>(); List list= classMap.get(classdoc.qualifiedName()); if (list != null) { Collections.sort(list); Iterator it = list.iterator(); while (it.hasNext()) { ProgramElementDoc doc = it.next(); PackageDoc pkg = doc.containingPackage(); pkgSet.add(pkg); List inPkg = map.get(pkg.name()); if (inPkg == null) { inPkg = new ArrayList(); map.put(pkg.name(), inPkg); } inPkg.add(doc); } } return map; } /** * Generate a class page. */ public static void generate(ConfigurationImpl configuration, ClassUseMapper mapper, ClassDoc classdoc) { ClassUseWriter clsgen; DocPath path = DocPath.forPackage(classdoc) .resolve(DocPaths.CLASS_USE) .resolve(DocPath.forName(classdoc)); try { clsgen = new ClassUseWriter(configuration, mapper, path, classdoc); clsgen.generateClassUseFile(); clsgen.close(); } catch (IOException exc) { configuration.standardmessage. error("doclet.exception_encountered", exc.toString(), path.getPath()); throw new DocletAbortException(); } } /** * Generate the class use list. */ protected void generateClassUseFile() throws IOException { Content body = getClassUseHeader(); HtmlTree div = new HtmlTree(HtmlTag.DIV); div.addStyle(HtmlStyle.classUseContainer); if (pkgSet.size() > 0) { addClassUse(div); } else { div.addContent(getResource("doclet.ClassUse_No.usage.of.0", classdoc.qualifiedName())); } body.addContent(div); addNavLinks(false, body); addBottom(body); printHtmlDocument(null, true, body); } /** * Add the class use documentation. * * @param contentTree the content tree to which the class use information will be added */ protected void addClassUse(Content contentTree) throws IOException { HtmlTree ul = new HtmlTree(HtmlTag.UL); ul.addStyle(HtmlStyle.blockList); if (configuration.packages.length > 1) { addPackageList(ul); addPackageAnnotationList(ul); } addClassList(ul); contentTree.addContent(ul); } /** * Add the packages list that use the given class. * * @param contentTree the content tree to which the packages list will be added */ protected void addPackageList(Content contentTree) throws IOException { Content table = HtmlTree.TABLE(0, 3, 0, useTableSummary, getTableCaption(configuration.getResource( "doclet.ClassUse_Packages.that.use.0", getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.CLASS_USE_HEADER, classdoc ))))); table.addContent(getSummaryTableHeader(packageTableHeader, "col")); Content tbody = new HtmlTree(HtmlTag.TBODY); Iterator it = pkgSet.iterator(); for (int i = 0; it.hasNext(); i++) { PackageDoc pkg = it.next(); HtmlTree tr = new HtmlTree(HtmlTag.TR); if (i % 2 == 0) { tr.addStyle(HtmlStyle.altColor); } else { tr.addStyle(HtmlStyle.rowColor); } addPackageUse(pkg, tr); tbody.addContent(tr); } table.addContent(tbody); Content li = HtmlTree.LI(HtmlStyle.blockList, table); contentTree.addContent(li); } /** * Add the package annotation list. * * @param contentTree the content tree to which the package annotation list will be added */ protected void addPackageAnnotationList(Content contentTree) throws IOException { if ((!classdoc.isAnnotationType()) || pkgToPackageAnnotations == null || pkgToPackageAnnotations.isEmpty()) { return; } Content table = HtmlTree.TABLE(0, 3, 0, useTableSummary, getTableCaption(configuration.getResource( "doclet.ClassUse_PackageAnnotation", getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.CLASS_USE_HEADER, classdoc))))); table.addContent(getSummaryTableHeader(packageTableHeader, "col")); Content tbody = new HtmlTree(HtmlTag.TBODY); Iterator it = pkgToPackageAnnotations.iterator(); for (int i = 0; it.hasNext(); i++) { PackageDoc pkg = it.next(); HtmlTree tr = new HtmlTree(HtmlTag.TR); if (i % 2 == 0) { tr.addStyle(HtmlStyle.altColor); } else { tr.addStyle(HtmlStyle.rowColor); } Content tdFirst = HtmlTree.TD(HtmlStyle.colFirst, getPackageLink(pkg, new StringContent(pkg.name()))); tr.addContent(tdFirst); HtmlTree tdLast = new HtmlTree(HtmlTag.TD); tdLast.addStyle(HtmlStyle.colLast); addSummaryComment(pkg, tdLast); tr.addContent(tdLast); tbody.addContent(tr); } table.addContent(tbody); Content li = HtmlTree.LI(HtmlStyle.blockList, table); contentTree.addContent(li); } /** * Add the class list that use the given class. * * @param contentTree the content tree to which the class list will be added */ protected void addClassList(Content contentTree) throws IOException { HtmlTree ul = new HtmlTree(HtmlTag.UL); ul.addStyle(HtmlStyle.blockList); for (Iterator it = pkgSet.iterator(); it.hasNext();) { PackageDoc pkg = it.next(); Content li = HtmlTree.LI(HtmlStyle.blockList, getMarkerAnchor(pkg.name())); Content link = getResource("doclet.ClassUse_Uses.of.0.in.1", getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.CLASS_USE_HEADER, classdoc)), getPackageLink(pkg, Util.getPackageName(pkg))); Content heading = HtmlTree.HEADING(HtmlConstants.SUMMARY_HEADING, link); li.addContent(heading); addClassUse(pkg, li); ul.addContent(li); } Content li = HtmlTree.LI(HtmlStyle.blockList, ul); contentTree.addContent(li); } /** * Add the package use information. * * @param pkg the package that uses the given class * @param contentTree the content tree to which the package use information will be added */ protected void addPackageUse(PackageDoc pkg, Content contentTree) throws IOException { Content tdFirst = HtmlTree.TD(HtmlStyle.colFirst, getHyperLink(pkg.name(), new StringContent(Util.getPackageName(pkg)))); contentTree.addContent(tdFirst); HtmlTree tdLast = new HtmlTree(HtmlTag.TD); tdLast.addStyle(HtmlStyle.colLast); addSummaryComment(pkg, tdLast); contentTree.addContent(tdLast); } /** * Add the class use information. * * @param pkg the package that uses the given class * @param contentTree the content tree to which the class use information will be added */ protected void addClassUse(PackageDoc pkg, Content contentTree) throws IOException { Content classLink = getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.CLASS_USE_HEADER, classdoc)); Content pkgLink = getPackageLink(pkg, Util.getPackageName(pkg)); classSubWriter.addUseInfo(pkgToClassAnnotations.get(pkg.name()), configuration.getResource("doclet.ClassUse_Annotation", classLink, pkgLink), classUseTableSummary, contentTree); classSubWriter.addUseInfo(pkgToClassTypeParameter.get(pkg.name()), configuration.getResource("doclet.ClassUse_TypeParameter", classLink, pkgLink), classUseTableSummary, contentTree); classSubWriter.addUseInfo(pkgToSubclass.get(pkg.name()), configuration.getResource("doclet.ClassUse_Subclass", classLink, pkgLink), subclassUseTableSummary, contentTree); classSubWriter.addUseInfo(pkgToSubinterface.get(pkg.name()), configuration.getResource("doclet.ClassUse_Subinterface", classLink, pkgLink), subinterfaceUseTableSummary, contentTree); classSubWriter.addUseInfo(pkgToImplementingClass.get(pkg.name()), configuration.getResource("doclet.ClassUse_ImplementingClass", classLink, pkgLink), classUseTableSummary, contentTree); fieldSubWriter.addUseInfo(pkgToField.get(pkg.name()), configuration.getResource("doclet.ClassUse_Field", classLink, pkgLink), fieldUseTableSummary, contentTree); fieldSubWriter.addUseInfo(pkgToFieldAnnotations.get(pkg.name()), configuration.getResource("doclet.ClassUse_FieldAnnotations", classLink, pkgLink), fieldUseTableSummary, contentTree); fieldSubWriter.addUseInfo(pkgToFieldTypeParameter.get(pkg.name()), configuration.getResource("doclet.ClassUse_FieldTypeParameter", classLink, pkgLink), fieldUseTableSummary, contentTree); methodSubWriter.addUseInfo(pkgToMethodAnnotations.get(pkg.name()), configuration.getResource("doclet.ClassUse_MethodAnnotations", classLink, pkgLink), methodUseTableSummary, contentTree); methodSubWriter.addUseInfo(pkgToMethodParameterAnnotations.get(pkg.name()), configuration.getResource("doclet.ClassUse_MethodParameterAnnotations", classLink, pkgLink), methodUseTableSummary, contentTree); methodSubWriter.addUseInfo(pkgToMethodTypeParameter.get(pkg.name()), configuration.getResource("doclet.ClassUse_MethodTypeParameter", classLink, pkgLink), methodUseTableSummary, contentTree); methodSubWriter.addUseInfo(pkgToMethodReturn.get(pkg.name()), configuration.getResource("doclet.ClassUse_MethodReturn", classLink, pkgLink), methodUseTableSummary, contentTree); methodSubWriter.addUseInfo(pkgToMethodReturnTypeParameter.get(pkg.name()), configuration.getResource("doclet.ClassUse_MethodReturnTypeParameter", classLink, pkgLink), methodUseTableSummary, contentTree); methodSubWriter.addUseInfo(pkgToMethodArgs.get(pkg.name()), configuration.getResource("doclet.ClassUse_MethodArgs", classLink, pkgLink), methodUseTableSummary, contentTree); methodSubWriter.addUseInfo(pkgToMethodArgTypeParameter.get(pkg.name()), configuration.getResource("doclet.ClassUse_MethodArgsTypeParameters", classLink, pkgLink), methodUseTableSummary, contentTree); methodSubWriter.addUseInfo(pkgToMethodThrows.get(pkg.name()), configuration.getResource("doclet.ClassUse_MethodThrows", classLink, pkgLink), methodUseTableSummary, contentTree); constrSubWriter.addUseInfo(pkgToConstructorAnnotations.get(pkg.name()), configuration.getResource("doclet.ClassUse_ConstructorAnnotations", classLink, pkgLink), constructorUseTableSummary, contentTree); constrSubWriter.addUseInfo(pkgToConstructorParameterAnnotations.get(pkg.name()), configuration.getResource("doclet.ClassUse_ConstructorParameterAnnotations", classLink, pkgLink), constructorUseTableSummary, contentTree); constrSubWriter.addUseInfo(pkgToConstructorArgs.get(pkg.name()), configuration.getResource("doclet.ClassUse_ConstructorArgs", classLink, pkgLink), constructorUseTableSummary, contentTree); constrSubWriter.addUseInfo(pkgToConstructorArgTypeParameter.get(pkg.name()), configuration.getResource("doclet.ClassUse_ConstructorArgsTypeParameters", classLink, pkgLink), constructorUseTableSummary, contentTree); constrSubWriter.addUseInfo(pkgToConstructorThrows.get(pkg.name()), configuration.getResource("doclet.ClassUse_ConstructorThrows", classLink, pkgLink), constructorUseTableSummary, contentTree); } /** * Get the header for the class use Listing. * * @return a content tree representing the class use header */ protected Content getClassUseHeader() { String cltype = configuration.getText(classdoc.isInterface()? "doclet.Interface":"doclet.Class"); String clname = classdoc.qualifiedName(); String title = configuration.getText("doclet.Window_ClassUse_Header", cltype, clname); Content bodyTree = getBody(true, getWindowTitle(title)); addTop(bodyTree); addNavLinks(true, bodyTree); ContentBuilder headContent = new ContentBuilder(); headContent.addContent(getResource("doclet.ClassUse_Title", cltype)); headContent.addContent(new HtmlTree(HtmlTag.BR)); headContent.addContent(clname); Content heading = HtmlTree.HEADING(HtmlConstants.CLASS_PAGE_HEADING, true, HtmlStyle.title, headContent); Content div = HtmlTree.DIV(HtmlStyle.header, heading); bodyTree.addContent(div); return bodyTree; } /** * Get this package link. * * @return a content tree for the package link */ protected Content getNavLinkPackage() { Content linkContent = getHyperLink(DocPath.parent.resolve(DocPaths.PACKAGE_SUMMARY), packageLabel); Content li = HtmlTree.LI(linkContent); return li; } /** * Get class page link. * * @return a content tree for the class page link */ protected Content getNavLinkClass() { Content linkContent = getLink(new LinkInfoImpl( configuration, LinkInfoImpl.Kind.CLASS_USE_HEADER, classdoc) .label(configuration.getText("doclet.Class"))); Content li = HtmlTree.LI(linkContent); return li; } /** * Get the use link. * * @return a content tree for the use link */ protected Content getNavLinkClassUse() { Content li = HtmlTree.LI(HtmlStyle.navBarCell1Rev, useLabel); return li; } /** * Get the tree link. * * @return a content tree for the tree link */ protected Content getNavLinkTree() { Content linkContent = classdoc.containingPackage().isIncluded() ? getHyperLink(DocPath.parent.resolve(DocPaths.PACKAGE_TREE), treeLabel) : getHyperLink(pathToRoot.resolve(DocPaths.OVERVIEW_TREE), treeLabel); Content li = HtmlTree.LI(linkContent); return li; } } ././@LongLink0000000000000000000000000000015100000000000011212 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/ClassWriterImpl.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/ClassWriterImpl.0000644000000000000000000006167312214026367032126 0ustar 00000000000000/* * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html; import java.util.*; import com.sun.javadoc.*; import com.sun.tools.javac.jvm.Profile; import com.sun.tools.doclets.formats.html.markup.*; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.builders.*; import com.sun.tools.doclets.internal.toolkit.taglets.*; import com.sun.tools.doclets.internal.toolkit.util.*; import java.io.IOException; /** * Generate the Class Information Page. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @see com.sun.javadoc.ClassDoc * @see java.util.Collections * @see java.util.List * @see java.util.ArrayList * @see java.util.HashMap * * @author Atul M Dambalkar * @author Robert Field * @author Bhavesh Patel (Modified) */ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWriter { protected final ClassDoc classDoc; protected final ClassTree classtree; protected final ClassDoc prev; protected final ClassDoc next; /** * @param configuration the configuration data for the doclet * @param classDoc the class being documented. * @param prevClass the previous class that was documented. * @param nextClass the next class being documented. * @param classTree the class tree for the given class. */ public ClassWriterImpl (ConfigurationImpl configuration, ClassDoc classDoc, ClassDoc prevClass, ClassDoc nextClass, ClassTree classTree) throws IOException { super(configuration, DocPath.forClass(classDoc)); this.classDoc = classDoc; configuration.currentcd = classDoc; this.classtree = classTree; this.prev = prevClass; this.next = nextClass; } /** * Get this package link. * * @return a content tree for the package link */ protected Content getNavLinkPackage() { Content linkContent = getHyperLink(DocPaths.PACKAGE_SUMMARY, packageLabel); Content li = HtmlTree.LI(linkContent); return li; } /** * Get the class link. * * @return a content tree for the class link */ protected Content getNavLinkClass() { Content li = HtmlTree.LI(HtmlStyle.navBarCell1Rev, classLabel); return li; } /** * Get the class use link. * * @return a content tree for the class use link */ protected Content getNavLinkClassUse() { Content linkContent = getHyperLink(DocPaths.CLASS_USE.resolve(filename), useLabel); Content li = HtmlTree.LI(linkContent); return li; } /** * Get link to previous class. * * @return a content tree for the previous class link */ public Content getNavLinkPrevious() { Content li; if (prev != null) { Content prevLink = getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.CLASS, prev) .label(configuration.getText("doclet.Prev_Class")).strong(true)); li = HtmlTree.LI(prevLink); } else li = HtmlTree.LI(prevclassLabel); return li; } /** * Get link to next class. * * @return a content tree for the next class link */ public Content getNavLinkNext() { Content li; if (next != null) { Content nextLink = getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.CLASS, next) .label(configuration.getText("doclet.Next_Class")).strong(true)); li = HtmlTree.LI(nextLink); } else li = HtmlTree.LI(nextclassLabel); return li; } /** * {@inheritDoc} */ public Content getHeader(String header) { String pkgname = (classDoc.containingPackage() != null)? classDoc.containingPackage().name(): ""; String clname = classDoc.name(); Content bodyTree = getBody(true, getWindowTitle(clname)); addTop(bodyTree); addNavLinks(true, bodyTree); bodyTree.addContent(HtmlConstants.START_OF_CLASS_DATA); HtmlTree div = new HtmlTree(HtmlTag.DIV); div.addStyle(HtmlStyle.header); if (configuration.showProfiles) { String sep = ""; int profile = configuration.profiles.getProfile(getTypeNameForProfile(classDoc)); if (profile > 0) { Content profNameContent = new StringContent(); for (int i = profile; i < configuration.profiles.getProfileCount(); i++) { profNameContent.addContent(sep); profNameContent.addContent(Profile.lookup(i).name); sep = ", "; } Content profileNameDiv = HtmlTree.DIV(HtmlStyle.subTitle, profNameContent); div.addContent(profileNameDiv); } } if (pkgname.length() > 0) { Content pkgNameContent = new StringContent(pkgname); Content pkgNameDiv = HtmlTree.DIV(HtmlStyle.subTitle, pkgNameContent); div.addContent(pkgNameDiv); } LinkInfoImpl linkInfo = new LinkInfoImpl(configuration, LinkInfoImpl.Kind.CLASS_HEADER, classDoc); //Let's not link to ourselves in the header. linkInfo.linkToSelf = false; Content headerContent = new StringContent(header); Content heading = HtmlTree.HEADING(HtmlConstants.CLASS_PAGE_HEADING, true, HtmlStyle.title, headerContent); heading.addContent(getTypeParameterLinks(linkInfo)); div.addContent(heading); bodyTree.addContent(div); return bodyTree; } /** * {@inheritDoc} */ public Content getClassContentHeader() { return getContentHeader(); } /** * {@inheritDoc} */ public void addFooter(Content contentTree) { contentTree.addContent(HtmlConstants.END_OF_CLASS_DATA); addNavLinks(false, contentTree); addBottom(contentTree); } /** * {@inheritDoc} */ public void printDocument(Content contentTree) throws IOException { printHtmlDocument(configuration.metakeywords.getMetaKeywords(classDoc), true, contentTree); } /** * {@inheritDoc} */ public Content getClassInfoTreeHeader() { return getMemberTreeHeader(); } /** * {@inheritDoc} */ public Content getClassInfo(Content classInfoTree) { return getMemberTree(HtmlStyle.description, classInfoTree); } /** * {@inheritDoc} */ public void addClassSignature(String modifiers, Content classInfoTree) { boolean isInterface = classDoc.isInterface(); classInfoTree.addContent(new HtmlTree(HtmlTag.BR)); Content pre = new HtmlTree(HtmlTag.PRE); addAnnotationInfo(classDoc, pre); pre.addContent(modifiers); LinkInfoImpl linkInfo = new LinkInfoImpl(configuration, LinkInfoImpl.Kind.CLASS_SIGNATURE, classDoc); //Let's not link to ourselves in the signature. linkInfo.linkToSelf = false; Content className = new StringContent(classDoc.name()); Content parameterLinks = getTypeParameterLinks(linkInfo); if (configuration.linksource) { addSrcLink(classDoc, className, pre); pre.addContent(parameterLinks); } else { Content span = HtmlTree.SPAN(HtmlStyle.strong, className); span.addContent(parameterLinks); pre.addContent(span); } if (!isInterface) { Type superclass = Util.getFirstVisibleSuperClass(classDoc, configuration); if (superclass != null) { pre.addContent(DocletConstants.NL); pre.addContent("extends "); Content link = getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.CLASS_SIGNATURE_PARENT_NAME, superclass)); pre.addContent(link); } } Type[] implIntfacs = classDoc.interfaceTypes(); if (implIntfacs != null && implIntfacs.length > 0) { int counter = 0; for (int i = 0; i < implIntfacs.length; i++) { ClassDoc classDoc = implIntfacs[i].asClassDoc(); if (! (classDoc.isPublic() || Util.isLinkable(classDoc, configuration))) { continue; } if (counter == 0) { pre.addContent(DocletConstants.NL); pre.addContent(isInterface? "extends " : "implements "); } else { pre.addContent(", "); } Content link = getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.CLASS_SIGNATURE_PARENT_NAME, implIntfacs[i])); pre.addContent(link); counter++; } } classInfoTree.addContent(pre); } /** * {@inheritDoc} */ public void addClassDescription(Content classInfoTree) { if(!configuration.nocomment) { // generate documentation for the class. if (classDoc.inlineTags().length > 0) { addInlineComment(classDoc, classInfoTree); } } } /** * {@inheritDoc} */ public void addClassTagInfo(Content classInfoTree) { if(!configuration.nocomment) { // Print Information about all the tags here addTagsInfo(classDoc, classInfoTree); } } /** * Get the class hierarchy tree for the given class. * * @param type the class to print the hierarchy for * @return a content tree for class inheritence */ private Content getClassInheritenceTree(Type type) { Type sup; HtmlTree classTreeUl = new HtmlTree(HtmlTag.UL); classTreeUl.addStyle(HtmlStyle.inheritance); Content liTree = null; do { sup = Util.getFirstVisibleSuperClass( type instanceof ClassDoc ? (ClassDoc) type : type.asClassDoc(), configuration); if (sup != null) { HtmlTree ul = new HtmlTree(HtmlTag.UL); ul.addStyle(HtmlStyle.inheritance); ul.addContent(getTreeForClassHelper(type)); if (liTree != null) ul.addContent(liTree); Content li = HtmlTree.LI(ul); liTree = li; type = sup; } else classTreeUl.addContent(getTreeForClassHelper(type)); } while (sup != null); if (liTree != null) classTreeUl.addContent(liTree); return classTreeUl; } /** * Get the class helper tree for the given class. * * @param type the class to print the helper for * @return a content tree for class helper */ private Content getTreeForClassHelper(Type type) { Content li = new HtmlTree(HtmlTag.LI); if (type.equals(classDoc)) { Content typeParameters = getTypeParameterLinks( new LinkInfoImpl(configuration, LinkInfoImpl.Kind.TREE, classDoc)); if (configuration.shouldExcludeQualifier( classDoc.containingPackage().name())) { li.addContent(type.asClassDoc().name()); li.addContent(typeParameters); } else { li.addContent(type.asClassDoc().qualifiedName()); li.addContent(typeParameters); } } else { Content link = getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.CLASS_TREE_PARENT, type) .label(configuration.getClassName(type.asClassDoc()))); li.addContent(link); } return li; } /** * {@inheritDoc} */ public void addClassTree(Content classContentTree) { if (!classDoc.isClass()) { return; } classContentTree.addContent(getClassInheritenceTree(classDoc)); } /** * {@inheritDoc} */ public void addTypeParamInfo(Content classInfoTree) { if (classDoc.typeParamTags().length > 0) { Content typeParam = (new ParamTaglet()).getTagletOutput(classDoc, getTagletWriterInstance(false)); Content dl = HtmlTree.DL(typeParam); classInfoTree.addContent(dl); } } /** * {@inheritDoc} */ public void addSubClassInfo(Content classInfoTree) { if (classDoc.isClass()) { if (classDoc.qualifiedName().equals("java.lang.Object") || classDoc.qualifiedName().equals("org.omg.CORBA.Object")) { return; // Don't generate the list, too huge } List subclasses = classtree.subs(classDoc, false); if (subclasses.size() > 0) { Content label = getResource( "doclet.Subclasses"); Content dt = HtmlTree.DT(label); Content dl = HtmlTree.DL(dt); dl.addContent(getClassLinks(LinkInfoImpl.Kind.SUBCLASSES, subclasses)); classInfoTree.addContent(dl); } } } /** * {@inheritDoc} */ public void addSubInterfacesInfo(Content classInfoTree) { if (classDoc.isInterface()) { List subInterfaces = classtree.allSubs(classDoc, false); if (subInterfaces.size() > 0) { Content label = getResource( "doclet.Subinterfaces"); Content dt = HtmlTree.DT(label); Content dl = HtmlTree.DL(dt); dl.addContent(getClassLinks(LinkInfoImpl.Kind.SUBINTERFACES, subInterfaces)); classInfoTree.addContent(dl); } } } /** * {@inheritDoc} */ public void addInterfaceUsageInfo (Content classInfoTree) { if (! classDoc.isInterface()) { return; } if (classDoc.qualifiedName().equals("java.lang.Cloneable") || classDoc.qualifiedName().equals("java.io.Serializable")) { return; // Don't generate the list, too big } List implcl = classtree.implementingclasses(classDoc); if (implcl.size() > 0) { Content label = getResource( "doclet.Implementing_Classes"); Content dt = HtmlTree.DT(label); Content dl = HtmlTree.DL(dt); dl.addContent(getClassLinks(LinkInfoImpl.Kind.IMPLEMENTED_CLASSES, implcl)); classInfoTree.addContent(dl); } } /** * {@inheritDoc} */ public void addImplementedInterfacesInfo(Content classInfoTree) { //NOTE: we really should be using ClassDoc.interfaceTypes() here, but // it doesn't walk up the tree like we want it to. List interfaceArray = Util.getAllInterfaces(classDoc, configuration); if (classDoc.isClass() && interfaceArray.size() > 0) { Content label = getResource( "doclet.All_Implemented_Interfaces"); Content dt = HtmlTree.DT(label); Content dl = HtmlTree.DL(dt); dl.addContent(getClassLinks(LinkInfoImpl.Kind.IMPLEMENTED_INTERFACES, interfaceArray)); classInfoTree.addContent(dl); } } /** * {@inheritDoc} */ public void addSuperInterfacesInfo(Content classInfoTree) { //NOTE: we really should be using ClassDoc.interfaceTypes() here, but // it doesn't walk up the tree like we want it to. List interfaceArray = Util.getAllInterfaces(classDoc, configuration); if (classDoc.isInterface() && interfaceArray.size() > 0) { Content label = getResource( "doclet.All_Superinterfaces"); Content dt = HtmlTree.DT(label); Content dl = HtmlTree.DL(dt); dl.addContent(getClassLinks(LinkInfoImpl.Kind.SUPER_INTERFACES, interfaceArray)); classInfoTree.addContent(dl); } } /** * {@inheritDoc} */ public void addNestedClassInfo(Content classInfoTree) { ClassDoc outerClass = classDoc.containingClass(); if (outerClass != null) { Content label; if (outerClass.isInterface()) { label = getResource( "doclet.Enclosing_Interface"); } else { label = getResource( "doclet.Enclosing_Class"); } Content dt = HtmlTree.DT(label); Content dl = HtmlTree.DL(dt); Content dd = new HtmlTree(HtmlTag.DD); dd.addContent(getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.CLASS, outerClass))); dl.addContent(dd); classInfoTree.addContent(dl); } } /** * {@inheritDoc} */ public void addFunctionalInterfaceInfo (Content classInfoTree) { if (classDoc.isFunctionalInterface()) { Content dt = HtmlTree.DT(getResource("doclet.Functional_Interface")); Content dl = HtmlTree.DL(dt); Content dd = new HtmlTree(HtmlTag.DD); dd.addContent(getResource("doclet.Functional_Interface_Message")); dl.addContent(dd); classInfoTree.addContent(dl); } } /** * {@inheritDoc} */ public void addClassDeprecationInfo(Content classInfoTree) { Content hr = new HtmlTree(HtmlTag.HR); classInfoTree.addContent(hr); Tag[] deprs = classDoc.tags("deprecated"); if (Util.isDeprecated(classDoc)) { Content strong = HtmlTree.STRONG(deprecatedPhrase); Content div = HtmlTree.DIV(HtmlStyle.block, strong); if (deprs.length > 0) { Tag[] commentTags = deprs[0].inlineTags(); if (commentTags.length > 0) { div.addContent(getSpace()); addInlineDeprecatedComment(classDoc, deprs[0], div); } } classInfoTree.addContent(div); } } /** * Get links to the given classes. * * @param context the id of the context where the link will be printed * @param list the list of classes * @return a content tree for the class list */ private Content getClassLinks(LinkInfoImpl.Kind context, List list) { Object[] typeList = list.toArray(); Content dd = new HtmlTree(HtmlTag.DD); for (int i = 0; i < list.size(); i++) { if (i > 0) { Content separator = new StringContent(", "); dd.addContent(separator); } if (typeList[i] instanceof ClassDoc) { Content link = getLink( new LinkInfoImpl(configuration, context, (ClassDoc)(typeList[i]))); dd.addContent(link); } else { Content link = getLink( new LinkInfoImpl(configuration, context, (Type)(typeList[i]))); dd.addContent(link); } } return dd; } /** * {@inheritDoc} */ protected Content getNavLinkTree() { Content treeLinkContent = getHyperLink(DocPaths.PACKAGE_TREE, treeLabel, "", ""); Content li = HtmlTree.LI(treeLinkContent); return li; } /** * Add summary details to the navigation bar. * * @param subDiv the content tree to which the summary detail links will be added */ protected void addSummaryDetailLinks(Content subDiv) { try { Content div = HtmlTree.DIV(getNavSummaryLinks()); div.addContent(getNavDetailLinks()); subDiv.addContent(div); } catch (Exception e) { e.printStackTrace(); throw new DocletAbortException(); } } /** * Get summary links for navigation bar. * * @return the content tree for the navigation summary links */ protected Content getNavSummaryLinks() throws Exception { Content li = HtmlTree.LI(summaryLabel); li.addContent(getSpace()); Content ulNav = HtmlTree.UL(HtmlStyle.subNavList, li); MemberSummaryBuilder memberSummaryBuilder = (MemberSummaryBuilder) configuration.getBuilderFactory().getMemberSummaryBuilder(this); String[] navLinkLabels = new String[] { "doclet.navNested", "doclet.navEnum", "doclet.navField", "doclet.navConstructor", "doclet.navMethod" }; for (int i = 0; i < navLinkLabels.length; i++ ) { Content liNav = new HtmlTree(HtmlTag.LI); if (i == VisibleMemberMap.ENUM_CONSTANTS && ! classDoc.isEnum()) { continue; } if (i == VisibleMemberMap.CONSTRUCTORS && classDoc.isEnum()) { continue; } AbstractMemberWriter writer = ((AbstractMemberWriter) memberSummaryBuilder. getMemberSummaryWriter(i)); if (writer == null) { liNav.addContent(getResource(navLinkLabels[i])); } else { writer.addNavSummaryLink( memberSummaryBuilder.members(i), memberSummaryBuilder.getVisibleMemberMap(i), liNav); } if (i < navLinkLabels.length-1) { addNavGap(liNav); } ulNav.addContent(liNav); } return ulNav; } /** * Get detail links for the navigation bar. * * @return the content tree for the detail links */ protected Content getNavDetailLinks() throws Exception { Content li = HtmlTree.LI(detailLabel); li.addContent(getSpace()); Content ulNav = HtmlTree.UL(HtmlStyle.subNavList, li); MemberSummaryBuilder memberSummaryBuilder = (MemberSummaryBuilder) configuration.getBuilderFactory().getMemberSummaryBuilder(this); String[] navLinkLabels = new String[] { "doclet.navNested", "doclet.navEnum", "doclet.navField", "doclet.navConstructor", "doclet.navMethod" }; for (int i = 1; i < navLinkLabels.length; i++ ) { Content liNav = new HtmlTree(HtmlTag.LI); AbstractMemberWriter writer = ((AbstractMemberWriter) memberSummaryBuilder. getMemberSummaryWriter(i)); if (i == VisibleMemberMap.ENUM_CONSTANTS && ! classDoc.isEnum()) { continue; } if (i == VisibleMemberMap.CONSTRUCTORS && classDoc.isEnum()) { continue; } if (writer == null) { liNav.addContent(getResource(navLinkLabels[i])); } else { writer.addNavDetailLink(memberSummaryBuilder.members(i), liNav); } if (i < navLinkLabels.length - 1) { addNavGap(liNav); } ulNav.addContent(liNav); } return ulNav; } /** * Add gap between navigation bar elements. * * @param liNav the content tree to which the gap will be added */ protected void addNavGap(Content liNav) { liNav.addContent(getSpace()); liNav.addContent("|"); liNav.addContent(getSpace()); } /** * Return the classDoc being documented. * * @return the classDoc being documented. */ public ClassDoc getClassDoc() { return classDoc; } } ././@LongLink0000000000000000000000000000015300000000000011214 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/ConfigurationImpl.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/ConfigurationImp0000644000000000000000000004647012214026367032237 0ustar 00000000000000/* * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html; import java.net.*; import java.util.*; import javax.tools.JavaFileManager; import com.sun.javadoc.*; import com.sun.tools.doclets.formats.html.markup.ContentBuilder; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.*; import com.sun.tools.doclint.DocLint; import com.sun.tools.javac.file.JavacFileManager; import com.sun.tools.javac.util.Context; import com.sun.tools.javadoc.RootDocImpl; /** * Configure the output based on the command line options. *

* Also determine the length of the command line option. For example, * for a option "-header" there will be a string argument associated, then the * the length of option "-header" is two. But for option "-nohelp" no argument * is needed so it's length is 1. *

*

* Also do the error checking on the options used. For example it is illegal to * use "-helpfile" option when already "-nohelp" option is used. *

* *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Robert Field. * @author Atul Dambalkar. * @author Jamie Ho * @author Bhavesh Patel (Modified) */ public class ConfigurationImpl extends Configuration { /** * The build date. Note: For now, we will use * a version number instead of a date. */ public static final String BUILD_DATE = System.getProperty("java.version"); /** * Argument for command line option "-header". */ public String header = ""; /** * Argument for command line option "-packagesheader". */ public String packagesheader = ""; /** * Argument for command line option "-footer". */ public String footer = ""; /** * Argument for command line option "-doctitle". */ public String doctitle = ""; /** * Argument for command line option "-windowtitle". */ public String windowtitle = ""; /** * Argument for command line option "-top". */ public String top = ""; /** * Argument for command line option "-bottom". */ public String bottom = ""; /** * Argument for command line option "-helpfile". */ public String helpfile = ""; /** * Argument for command line option "-stylesheetfile". */ public String stylesheetfile = ""; /** * Argument for command line option "-Xdocrootparent". */ public String docrootparent = ""; /** * True if command line option "-nohelp" is used. Default value is false. */ public boolean nohelp = false; /** * True if command line option "-splitindex" is used. Default value is * false. */ public boolean splitindex = false; /** * False if command line option "-noindex" is used. Default value is true. */ public boolean createindex = true; /** * True if command line option "-use" is used. Default value is false. */ public boolean classuse = false; /** * False if command line option "-notree" is used. Default value is true. */ public boolean createtree = true; /** * True if command line option "-nodeprecated" is used. Default value is * false. */ public boolean nodeprecatedlist = false; /** * True if command line option "-nonavbar" is used. Default value is false. */ public boolean nonavbar = false; /** * True if command line option "-nooverview" is used. Default value is * false */ private boolean nooverview = false; /** * True if command line option "-overview" is used. Default value is false. */ public boolean overview = false; /** * This is true if option "-overview" is used or option "-overview" is not * used and number of packages is more than one. */ public boolean createoverview = false; /** * Collected set of doclint options */ public Set doclintOpts = new LinkedHashSet(); /** * Unique Resource Handler for this package. */ public final MessageRetriever standardmessage; /** * First file to appear in the right-hand frame in the generated * documentation. */ public DocPath topFile = DocPath.empty; /** * The classdoc for the class file getting generated. */ public ClassDoc currentcd = null; // Set this classdoc in the ClassWriter. /** * Constructor. Initializes resource for the * {@link com.sun.tools.doclets.internal.toolkit.util.MessageRetriever MessageRetriever}. */ public ConfigurationImpl() { standardmessage = new MessageRetriever(this, "com.sun.tools.doclets.formats.html.resources.standard"); } /** * Return the build date for the doclet. */ @Override public String getDocletSpecificBuildDate() { return BUILD_DATE; } /** * Depending upon the command line options provided by the user, set * configure the output generation environment. * * @param options The array of option names and values. */ @Override public void setSpecificDocletOptions(String[][] options) { for (int oi = 0; oi < options.length; ++oi) { String[] os = options[oi]; String opt = os[0].toLowerCase(); if (opt.equals("-footer")) { footer = os[1]; } else if (opt.equals("-header")) { header = os[1]; } else if (opt.equals("-packagesheader")) { packagesheader = os[1]; } else if (opt.equals("-doctitle")) { doctitle = os[1]; } else if (opt.equals("-windowtitle")) { windowtitle = os[1]; } else if (opt.equals("-top")) { top = os[1]; } else if (opt.equals("-bottom")) { bottom = os[1]; } else if (opt.equals("-helpfile")) { helpfile = os[1]; } else if (opt.equals("-stylesheetfile")) { stylesheetfile = os[1]; } else if (opt.equals("-charset")) { charset = os[1]; } else if (opt.equals("-xdocrootparent")) { docrootparent = os[1]; } else if (opt.equals("-nohelp")) { nohelp = true; } else if (opt.equals("-splitindex")) { splitindex = true; } else if (opt.equals("-noindex")) { createindex = false; } else if (opt.equals("-use")) { classuse = true; } else if (opt.equals("-notree")) { createtree = false; } else if (opt.equals("-nodeprecatedlist")) { nodeprecatedlist = true; } else if (opt.equals("-nonavbar")) { nonavbar = true; } else if (opt.equals("-nooverview")) { nooverview = true; } else if (opt.equals("-overview")) { overview = true; } else if (opt.equals("-xdoclint")) { doclintOpts.add(null); } else if (opt.startsWith("-xdoclint:")) { doclintOpts.add(opt.substring(opt.indexOf(":") + 1)); } } if (root.specifiedClasses().length > 0) { Map map = new HashMap(); PackageDoc pd; ClassDoc[] classes = root.classes(); for (int i = 0; i < classes.length; i++) { pd = classes[i].containingPackage(); if(! map.containsKey(pd.name())) { map.put(pd.name(), pd); } } } setCreateOverview(); setTopFile(root); if (root instanceof RootDocImpl) { ((RootDocImpl) root).initDocLint(doclintOpts); } } /** * Returns the "length" of a given option. If an option takes no * arguments, its length is one. If it takes one argument, it's * length is two, and so on. This method is called by JavaDoc to * parse the options it does not recognize. It then calls * {@link #validOptions(String[][], DocErrorReporter)} to * validate them. * Note:
* The options arrive as case-sensitive strings. For options that * are not case-sensitive, use toLowerCase() on the option string * before comparing it. * * * @return number of arguments + 1 for a option. Zero return means * option not known. Negative value means error occurred. */ public int optionLength(String option) { int result = -1; if ((result = super.optionLength(option)) > 0) { return result; } // otherwise look for the options we have added option = option.toLowerCase(); if (option.equals("-nodeprecatedlist") || option.equals("-noindex") || option.equals("-notree") || option.equals("-nohelp") || option.equals("-splitindex") || option.equals("-serialwarn") || option.equals("-use") || option.equals("-nonavbar") || option.equals("-nooverview") || option.equals("-xdoclint") || option.startsWith("-xdoclint:")) { return 1; } else if (option.equals("-help")) { // Uugh: first, this should not be hidden inside optionLength, // and second, we should not be writing directly to stdout. // But we have no access to a DocErrorReporter, which would // allow use of reporter.printNotice System.out.println(getText("doclet.usage")); return 1; } else if (option.equals("-x")) { // Uugh: first, this should not be hidden inside optionLength, // and second, we should not be writing directly to stdout. // But we have no access to a DocErrorReporter, which would // allow use of reporter.printNotice System.out.println(getText("doclet.X.usage")); return 1; } else if (option.equals("-footer") || option.equals("-header") || option.equals("-packagesheader") || option.equals("-doctitle") || option.equals("-windowtitle") || option.equals("-top") || option.equals("-bottom") || option.equals("-helpfile") || option.equals("-stylesheetfile") || option.equals("-charset") || option.equals("-overview") || option.equals("-xdocrootparent")) { return 2; } else { return 0; } } /** * {@inheritDoc} */ @Override public boolean validOptions(String options[][], DocErrorReporter reporter) { boolean helpfile = false; boolean nohelp = false; boolean overview = false; boolean nooverview = false; boolean splitindex = false; boolean noindex = false; // check shared options if (!generalValidOptions(options, reporter)) { return false; } // otherwise look at our options for (int oi = 0; oi < options.length; ++oi) { String[] os = options[oi]; String opt = os[0].toLowerCase(); if (opt.equals("-helpfile")) { if (nohelp == true) { reporter.printError(getText("doclet.Option_conflict", "-helpfile", "-nohelp")); return false; } if (helpfile == true) { reporter.printError(getText("doclet.Option_reuse", "-helpfile")); return false; } DocFile help = DocFile.createFileForInput(this, os[1]); if (!help.exists()) { reporter.printError(getText("doclet.File_not_found", os[1])); return false; } helpfile = true; } else if (opt.equals("-nohelp")) { if (helpfile == true) { reporter.printError(getText("doclet.Option_conflict", "-nohelp", "-helpfile")); return false; } nohelp = true; } else if (opt.equals("-xdocrootparent")) { try { new URL(os[1]); } catch (MalformedURLException e) { reporter.printError(getText("doclet.MalformedURL", os[1])); return false; } } else if (opt.equals("-overview")) { if (nooverview == true) { reporter.printError(getText("doclet.Option_conflict", "-overview", "-nooverview")); return false; } if (overview == true) { reporter.printError(getText("doclet.Option_reuse", "-overview")); return false; } overview = true; } else if (opt.equals("-nooverview")) { if (overview == true) { reporter.printError(getText("doclet.Option_conflict", "-nooverview", "-overview")); return false; } nooverview = true; } else if (opt.equals("-splitindex")) { if (noindex == true) { reporter.printError(getText("doclet.Option_conflict", "-splitindex", "-noindex")); return false; } splitindex = true; } else if (opt.equals("-noindex")) { if (splitindex == true) { reporter.printError(getText("doclet.Option_conflict", "-noindex", "-splitindex")); return false; } noindex = true; } else if (opt.startsWith("-xdoclint:")) { if (opt.contains("/")) { reporter.printError(getText("doclet.Option_doclint_no_qualifiers")); return false; } if (!DocLint.isValidOption( opt.replace("-xdoclint:", DocLint.XMSGS_CUSTOM_PREFIX))) { reporter.printError(getText("doclet.Option_doclint_invalid_arg")); return false; } } } return true; } /** * {@inheritDoc} */ @Override public MessageRetriever getDocletSpecificMsg() { return standardmessage; } /** * Decide the page which will appear first in the right-hand frame. It will * be "overview-summary.html" if "-overview" option is used or no * "-overview" but the number of packages is more than one. It will be * "package-summary.html" of the respective package if there is only one * package to document. It will be a class page(first in the sorted order), * if only classes are provided on the command line. * * @param root Root of the program structure. */ protected void setTopFile(RootDoc root) { if (!checkForDeprecation(root)) { return; } if (createoverview) { topFile = DocPaths.OVERVIEW_SUMMARY; } else { if (packages.length == 1 && packages[0].name().equals("")) { if (root.classes().length > 0) { ClassDoc[] classarr = root.classes(); Arrays.sort(classarr); ClassDoc cd = getValidClass(classarr); topFile = DocPath.forClass(cd); } } else { topFile = DocPath.forPackage(packages[0]).resolve(DocPaths.PACKAGE_SUMMARY); } } } protected ClassDoc getValidClass(ClassDoc[] classarr) { if (!nodeprecated) { return classarr[0]; } for (int i = 0; i < classarr.length; i++) { if (classarr[i].tags("deprecated").length == 0) { return classarr[i]; } } return null; } protected boolean checkForDeprecation(RootDoc root) { ClassDoc[] classarr = root.classes(); for (int i = 0; i < classarr.length; i++) { if (isGeneratedDoc(classarr[i])) { return true; } } return false; } /** * Generate "overview.html" page if option "-overview" is used or number of * packages is more than one. Sets {@link #createoverview} field to true. */ protected void setCreateOverview() { if ((overview || packages.length > 1) && !nooverview) { createoverview = true; } } /** * {@inheritDoc} */ @Override public WriterFactory getWriterFactory() { return new WriterFactoryImpl(this); } /** * {@inheritDoc} */ @Override public Comparator getMemberComparator() { return null; } /** * {@inheritDoc} */ @Override public Locale getLocale() { if (root instanceof RootDocImpl) return ((RootDocImpl)root).getLocale(); else return Locale.getDefault(); } /** * {@inheritDoc} */ @Override public JavaFileManager getFileManager() { if (fileManager == null) { if (root instanceof RootDocImpl) fileManager = ((RootDocImpl) root).getFileManager(); else fileManager = new JavacFileManager(new Context(), false, null); } return fileManager; } private JavaFileManager fileManager; @Override public boolean showMessage(SourcePosition pos, String key) { if (root instanceof RootDocImpl) { return pos == null || ((RootDocImpl) root).showTagMessages(); } return true; } @Override public Content newContent() { return new ContentBuilder(); } } ././@LongLink0000000000000000000000000000016400000000000011216 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/ConstantsSummaryWriterImpl.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/ConstantsSummary0000644000000000000000000002525712214026367032314 0ustar 00000000000000/* * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html; import java.io.*; import java.util.*; import com.sun.javadoc.*; import com.sun.tools.doclets.formats.html.markup.*; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.*; /** * Write the Constants Summary Page in HTML format. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Jamie Ho * @author Bhavesh Patel (Modified) * @since 1.4 */ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter implements ConstantsSummaryWriter { /** * The configuration used in this run of the standard doclet. */ ConfigurationImpl configuration; /** * The current class being documented. */ private ClassDoc currentClassDoc; private final String constantsTableSummary; private final String[] constantsTableHeader; /** * Construct a ConstantsSummaryWriter. * @param configuration the configuration used in this run * of the standard doclet. */ public ConstantsSummaryWriterImpl(ConfigurationImpl configuration) throws IOException { super(configuration, DocPaths.CONSTANT_VALUES); this.configuration = configuration; constantsTableSummary = configuration.getText("doclet.Constants_Table_Summary", configuration.getText("doclet.Constants_Summary")); constantsTableHeader = new String[] { getModifierTypeHeader(), configuration.getText("doclet.ConstantField"), configuration.getText("doclet.Value") }; } /** * {@inheritDoc} */ public Content getHeader() { String label = configuration.getText("doclet.Constants_Summary"); Content bodyTree = getBody(true, getWindowTitle(label)); addTop(bodyTree); addNavLinks(true, bodyTree); return bodyTree; } /** * {@inheritDoc} */ public Content getContentsHeader() { return new HtmlTree(HtmlTag.UL); } /** * {@inheritDoc} */ public void addLinkToPackageContent(PackageDoc pkg, String parsedPackageName, Set printedPackageHeaders, Content contentListTree) { String packageName = pkg.name(); //add link to summary Content link; if (packageName.length() == 0) { link = getHyperLink(DocLink.fragment(DocletConstants.UNNAMED_PACKAGE_ANCHOR), defaultPackageLabel, "", ""); } else { Content packageNameContent = getPackageLabel(parsedPackageName); packageNameContent.addContent(".*"); link = getHyperLink(DocLink.fragment(parsedPackageName), packageNameContent, "", ""); printedPackageHeaders.add(parsedPackageName); } contentListTree.addContent(HtmlTree.LI(link)); } /** * {@inheritDoc} */ public Content getContentsList(Content contentListTree) { Content titleContent = getResource( "doclet.Constants_Summary"); Content pHeading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, true, HtmlStyle.title, titleContent); Content div = HtmlTree.DIV(HtmlStyle.header, pHeading); Content headingContent = getResource( "doclet.Contents"); div.addContent(HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, true, headingContent)); div.addContent(contentListTree); return div; } /** * {@inheritDoc} */ public Content getConstantSummaries() { HtmlTree summariesDiv = new HtmlTree(HtmlTag.DIV); summariesDiv.addStyle(HtmlStyle.constantValuesContainer); return summariesDiv; } /** * {@inheritDoc} */ public void addPackageName(PackageDoc pkg, String parsedPackageName, Content summariesTree) { Content pkgNameContent; if (parsedPackageName.length() == 0) { summariesTree.addContent(getMarkerAnchor( DocletConstants.UNNAMED_PACKAGE_ANCHOR)); pkgNameContent = defaultPackageLabel; } else { summariesTree.addContent(getMarkerAnchor( parsedPackageName)); pkgNameContent = getPackageLabel(parsedPackageName); } Content headingContent = new StringContent(".*"); Content heading = HtmlTree.HEADING(HtmlConstants.PACKAGE_HEADING, true, pkgNameContent); heading.addContent(headingContent); summariesTree.addContent(heading); } /** * {@inheritDoc} */ public Content getClassConstantHeader() { HtmlTree ul = new HtmlTree(HtmlTag.UL); ul.addStyle(HtmlStyle.blockList); return ul; } /** * Get the table caption and header for the constant summary table * * @param cd classdoc to be documented * @return constant members header content */ public Content getConstantMembersHeader(ClassDoc cd) { //generate links backward only to public classes. Content classlink = (cd.isPublic() || cd.isProtected()) ? getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.CONSTANT_SUMMARY, cd)) : new StringContent(cd.qualifiedName()); String name = cd.containingPackage().name(); if (name.length() > 0) { Content cb = new ContentBuilder(); cb.addContent(name); cb.addContent("."); cb.addContent(classlink); return getClassName(cb); } else { return getClassName(classlink); } } /** * Get the class name in the table caption and the table header. * * @param classStr the class name to print. * @return the table caption and header */ protected Content getClassName(Content classStr) { Content table = HtmlTree.TABLE(0, 3, 0, constantsTableSummary, getTableCaption(classStr)); table.addContent(getSummaryTableHeader(constantsTableHeader, "col")); return table; } /** * {@inheritDoc} */ public void addConstantMembers(ClassDoc cd, List fields, Content classConstantTree) { currentClassDoc = cd; Content tbody = new HtmlTree(HtmlTag.TBODY); for (int i = 0; i < fields.size(); ++i) { HtmlTree tr = new HtmlTree(HtmlTag.TR); if (i%2 == 0) tr.addStyle(HtmlStyle.altColor); else tr.addStyle(HtmlStyle.rowColor); addConstantMember(fields.get(i), tr); tbody.addContent(tr); } Content table = getConstantMembersHeader(cd); table.addContent(tbody); Content li = HtmlTree.LI(HtmlStyle.blockList, table); classConstantTree.addContent(li); } /** * Add the row for the constant summary table. * * @param member the field to be documented. * @param trTree an htmltree object for the table row */ private void addConstantMember(FieldDoc member, HtmlTree trTree) { trTree.addContent(getTypeColumn(member)); trTree.addContent(getNameColumn(member)); trTree.addContent(getValue(member)); } /** * Get the type column for the constant summary table row. * * @param member the field to be documented. * @return the type column of the constant table row */ private Content getTypeColumn(FieldDoc member) { Content anchor = getMarkerAnchor(currentClassDoc.qualifiedName() + "." + member.name()); Content tdType = HtmlTree.TD(HtmlStyle.colFirst, anchor); Content code = new HtmlTree(HtmlTag.CODE); StringTokenizer mods = new StringTokenizer(member.modifiers()); while(mods.hasMoreTokens()) { Content modifier = new StringContent(mods.nextToken()); code.addContent(modifier); code.addContent(getSpace()); } Content type = getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.CONSTANT_SUMMARY, member.type())); code.addContent(type); tdType.addContent(code); return tdType; } /** * Get the name column for the constant summary table row. * * @param member the field to be documented. * @return the name column of the constant table row */ private Content getNameColumn(FieldDoc member) { Content nameContent = getDocLink( LinkInfoImpl.Kind.CONSTANT_SUMMARY, member, member.name(), false); Content code = HtmlTree.CODE(nameContent); return HtmlTree.TD(code); } /** * Get the value column for the constant summary table row. * * @param member the field to be documented. * @return the value column of the constant table row */ private Content getValue(FieldDoc member) { Content valueContent = new StringContent(member.constantValueExpression()); Content code = HtmlTree.CODE(valueContent); return HtmlTree.TD(HtmlStyle.colLast, code); } /** * {@inheritDoc} */ public void addFooter(Content contentTree) { addNavLinks(false, contentTree); addBottom(contentTree); } /** * {@inheritDoc} */ public void printDocument(Content contentTree) throws IOException { printHtmlDocument(null, true, contentTree); } } ././@LongLink0000000000000000000000000000015700000000000011220 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/ConstructorWriterImpl.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/ConstructorWrite0000644000000000000000000002446612214026367032323 0ustar 00000000000000/* * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html; import java.io.*; import java.util.*; import com.sun.javadoc.*; import com.sun.tools.doclets.formats.html.markup.*; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.*; /** * Writes constructor documentation. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Robert Field * @author Atul M Dambalkar * @author Bhavesh Patel (Modified) */ public class ConstructorWriterImpl extends AbstractExecutableMemberWriter implements ConstructorWriter, MemberSummaryWriter { private boolean foundNonPubConstructor = false; /** * Construct a new ConstructorWriterImpl. * * @param writer The writer for the class that the constructors belong to. * @param classDoc the class being documented. */ public ConstructorWriterImpl(SubWriterHolderWriter writer, ClassDoc classDoc) { super(writer, classDoc); VisibleMemberMap visibleMemberMap = new VisibleMemberMap(classDoc, VisibleMemberMap.CONSTRUCTORS, configuration); List constructors = new ArrayList(visibleMemberMap.getMembersFor(classDoc)); for (int i = 0; i < constructors.size(); i++) { if ((constructors.get(i)).isProtected() || (constructors.get(i)).isPrivate()) { setFoundNonPubConstructor(true); } } } /** * Construct a new ConstructorWriterImpl. * * @param writer The writer for the class that the constructors belong to. */ public ConstructorWriterImpl(SubWriterHolderWriter writer) { super(writer); } /** * {@inheritDoc} */ public Content getMemberSummaryHeader(ClassDoc classDoc, Content memberSummaryTree) { memberSummaryTree.addContent(HtmlConstants.START_OF_CONSTRUCTOR_SUMMARY); Content memberTree = writer.getMemberTreeHeader(); writer.addSummaryHeader(this, classDoc, memberTree); return memberTree; } /** * {@inheritDoc} */ public Content getConstructorDetailsTreeHeader(ClassDoc classDoc, Content memberDetailsTree) { memberDetailsTree.addContent(HtmlConstants.START_OF_CONSTRUCTOR_DETAILS); Content constructorDetailsTree = writer.getMemberTreeHeader(); constructorDetailsTree.addContent(writer.getMarkerAnchor("constructor_detail")); Content heading = HtmlTree.HEADING(HtmlConstants.DETAILS_HEADING, writer.constructorDetailsLabel); constructorDetailsTree.addContent(heading); return constructorDetailsTree; } /** * {@inheritDoc} */ public Content getConstructorDocTreeHeader(ConstructorDoc constructor, Content constructorDetailsTree) { String erasureAnchor; if ((erasureAnchor = getErasureAnchor(constructor)) != null) { constructorDetailsTree.addContent(writer.getMarkerAnchor((erasureAnchor))); } constructorDetailsTree.addContent( writer.getMarkerAnchor(writer.getAnchor(constructor))); Content constructorDocTree = writer.getMemberTreeHeader(); Content heading = new HtmlTree(HtmlConstants.MEMBER_HEADING); heading.addContent(constructor.name()); constructorDocTree.addContent(heading); return constructorDocTree; } /** * {@inheritDoc} */ public Content getSignature(ConstructorDoc constructor) { Content pre = new HtmlTree(HtmlTag.PRE); writer.addAnnotationInfo(constructor, pre); addModifiers(constructor, pre); if (configuration.linksource) { Content constructorName = new StringContent(constructor.name()); writer.addSrcLink(constructor, constructorName, pre); } else { addName(constructor.name(), pre); } int indent = pre.charCount(); addParameters(constructor, pre, indent); addExceptions(constructor, pre, indent); return pre; } /** * {@inheritDoc} */ @Override public void setSummaryColumnStyle(HtmlTree tdTree) { if (foundNonPubConstructor) tdTree.addStyle(HtmlStyle.colLast); else tdTree.addStyle(HtmlStyle.colOne); } /** * {@inheritDoc} */ public void addDeprecated(ConstructorDoc constructor, Content constructorDocTree) { addDeprecatedInfo(constructor, constructorDocTree); } /** * {@inheritDoc} */ public void addComments(ConstructorDoc constructor, Content constructorDocTree) { addComment(constructor, constructorDocTree); } /** * {@inheritDoc} */ public void addTags(ConstructorDoc constructor, Content constructorDocTree) { writer.addTagsInfo(constructor, constructorDocTree); } /** * {@inheritDoc} */ public Content getConstructorDetails(Content constructorDetailsTree) { return getMemberTree(constructorDetailsTree); } /** * {@inheritDoc} */ public Content getConstructorDoc(Content constructorDocTree, boolean isLastContent) { return getMemberTree(constructorDocTree, isLastContent); } /** * Close the writer. */ public void close() throws IOException { writer.close(); } /** * Let the writer know whether a non public constructor was found. * * @param foundNonPubConstructor true if we found a non public constructor. */ public void setFoundNonPubConstructor(boolean foundNonPubConstructor) { this.foundNonPubConstructor = foundNonPubConstructor; } /** * {@inheritDoc} */ public void addSummaryLabel(Content memberTree) { Content label = HtmlTree.HEADING(HtmlConstants.SUMMARY_HEADING, writer.getResource("doclet.Constructor_Summary")); memberTree.addContent(label); } /** * {@inheritDoc} */ public String getTableSummary() { return configuration.getText("doclet.Member_Table_Summary", configuration.getText("doclet.Constructor_Summary"), configuration.getText("doclet.constructors")); } /** * {@inheritDoc} */ public Content getCaption() { return configuration.getResource("doclet.Constructors"); } /** * {@inheritDoc} */ public String[] getSummaryTableHeader(ProgramElementDoc member) { String[] header; if (foundNonPubConstructor) { header = new String[] { configuration.getText("doclet.Modifier"), configuration.getText("doclet.0_and_1", configuration.getText("doclet.Constructor"), configuration.getText("doclet.Description")) }; } else { header = new String[] { configuration.getText("doclet.0_and_1", configuration.getText("doclet.Constructor"), configuration.getText("doclet.Description")) }; } return header; } /** * {@inheritDoc} */ public void addSummaryAnchor(ClassDoc cd, Content memberTree) { memberTree.addContent(writer.getMarkerAnchor("constructor_summary")); } /** * {@inheritDoc} */ public void addInheritedSummaryAnchor(ClassDoc cd, Content inheritedTree) { } /** * {@inheritDoc} */ public void addInheritedSummaryLabel(ClassDoc cd, Content inheritedTree) { } public int getMemberKind() { return VisibleMemberMap.CONSTRUCTORS; } /** * {@inheritDoc} */ protected Content getNavSummaryLink(ClassDoc cd, boolean link) { if (link) { return writer.getHyperLink("constructor_summary", writer.getResource("doclet.navConstructor")); } else { return writer.getResource("doclet.navConstructor"); } } /** * {@inheritDoc} */ protected void addNavDetailLink(boolean link, Content liNav) { if (link) { liNav.addContent(writer.getHyperLink("constructor_detail", writer.getResource("doclet.navConstructor"))); } else { liNav.addContent(writer.getResource("doclet.navConstructor")); } } /** * {@inheritDoc} */ protected void addSummaryType(ProgramElementDoc member, Content tdSummaryType) { if (foundNonPubConstructor) { Content code = new HtmlTree(HtmlTag.CODE); if (member.isProtected()) { code.addContent("protected "); } else if (member.isPrivate()) { code.addContent("private "); } else if (member.isPublic()) { code.addContent(writer.getSpace()); } else { code.addContent( configuration.getText("doclet.Package_private")); } tdSummaryType.addContent(code); } } } ././@LongLink0000000000000000000000000000015600000000000011217 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/DeprecatedListWriter.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/DeprecatedListWr0000644000000000000000000002271612214026367032164 0ustar 00000000000000/* * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html; import java.io.*; import com.sun.tools.doclets.formats.html.markup.*; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.*; /** * Generate File to list all the deprecated classes and class members with the * appropriate links. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @see java.util.List * @author Atul M Dambalkar * @author Bhavesh Patel (Modified) */ public class DeprecatedListWriter extends SubWriterHolderWriter { private static final String[] ANCHORS = new String[] { "package", "interface", "class", "enum", "exception", "error", "annotation_type", "field", "method", "constructor", "enum_constant", "annotation_type_member" }; private static final String[] HEADING_KEYS = new String[] { "doclet.Deprecated_Packages", "doclet.Deprecated_Interfaces", "doclet.Deprecated_Classes", "doclet.Deprecated_Enums", "doclet.Deprecated_Exceptions", "doclet.Deprecated_Errors", "doclet.Deprecated_Annotation_Types", "doclet.Deprecated_Fields", "doclet.Deprecated_Methods", "doclet.Deprecated_Constructors", "doclet.Deprecated_Enum_Constants", "doclet.Deprecated_Annotation_Type_Members" }; private static final String[] SUMMARY_KEYS = new String[] { "doclet.deprecated_packages", "doclet.deprecated_interfaces", "doclet.deprecated_classes", "doclet.deprecated_enums", "doclet.deprecated_exceptions", "doclet.deprecated_errors", "doclet.deprecated_annotation_types", "doclet.deprecated_fields", "doclet.deprecated_methods", "doclet.deprecated_constructors", "doclet.deprecated_enum_constants", "doclet.deprecated_annotation_type_members" }; private static final String[] HEADER_KEYS = new String[] { "doclet.Package", "doclet.Interface", "doclet.Class", "doclet.Enum", "doclet.Exceptions", "doclet.Errors", "doclet.AnnotationType", "doclet.Field", "doclet.Method", "doclet.Constructor", "doclet.Enum_Constant", "doclet.Annotation_Type_Member" }; private AbstractMemberWriter[] writers; private ConfigurationImpl configuration; /** * Constructor. * * @param filename the file to be generated. */ public DeprecatedListWriter(ConfigurationImpl configuration, DocPath filename) throws IOException { super(configuration, filename); this.configuration = configuration; NestedClassWriterImpl classW = new NestedClassWriterImpl(this); writers = new AbstractMemberWriter[] {classW, classW, classW, classW, classW, classW, new FieldWriterImpl(this), new MethodWriterImpl(this), new ConstructorWriterImpl(this), new EnumConstantWriterImpl(this), new AnnotationTypeOptionalMemberWriterImpl(this, null)}; } /** * Get list of all the deprecated classes and members in all the Packages * specified on the Command Line. * Then instantiate DeprecatedListWriter and generate File. * * @param configuration the current configuration of the doclet. */ public static void generate(ConfigurationImpl configuration) { DocPath filename = DocPaths.DEPRECATED_LIST; try { DeprecatedListWriter depr = new DeprecatedListWriter(configuration, filename); depr.generateDeprecatedListFile( new DeprecatedAPIListBuilder(configuration)); depr.close(); } catch (IOException exc) { configuration.standardmessage.error( "doclet.exception_encountered", exc.toString(), filename); throw new DocletAbortException(); } } /** * Generate the deprecated API list. * * @param deprapi list of deprecated API built already. */ protected void generateDeprecatedListFile(DeprecatedAPIListBuilder deprapi) throws IOException { Content body = getHeader(); body.addContent(getContentsList(deprapi)); String memberTableSummary; String[] memberTableHeader = new String[1]; HtmlTree div = new HtmlTree(HtmlTag.DIV); div.addStyle(HtmlStyle.contentContainer); for (int i = 0; i < DeprecatedAPIListBuilder.NUM_TYPES; i++) { if (deprapi.hasDocumentation(i)) { addAnchor(deprapi, i, div); memberTableSummary = configuration.getText("doclet.Member_Table_Summary", configuration.getText(HEADING_KEYS[i]), configuration.getText(SUMMARY_KEYS[i])); memberTableHeader[0] = configuration.getText("doclet.0_and_1", configuration.getText(HEADER_KEYS[i]), configuration.getText("doclet.Description")); // DeprecatedAPIListBuilder.PACKAGE == 0, so if i == 0, it is // a PackageDoc. if (i == DeprecatedAPIListBuilder.PACKAGE) addPackageDeprecatedAPI(deprapi.getList(i), HEADING_KEYS[i], memberTableSummary, memberTableHeader, div); else writers[i - 1].addDeprecatedAPI(deprapi.getList(i), HEADING_KEYS[i], memberTableSummary, memberTableHeader, div); } } body.addContent(div); addNavLinks(false, body); addBottom(body); printHtmlDocument(null, true, body); } /** * Add the index link. * * @param builder the deprecated list builder * @param type the type of list being documented * @param contentTree the content tree to which the index link will be added */ private void addIndexLink(DeprecatedAPIListBuilder builder, int type, Content contentTree) { if (builder.hasDocumentation(type)) { Content li = HtmlTree.LI(getHyperLink(ANCHORS[type], getResource(HEADING_KEYS[type]))); contentTree.addContent(li); } } /** * Get the contents list. * * @param deprapi the deprecated list builder * @return a content tree for the contents list */ public Content getContentsList(DeprecatedAPIListBuilder deprapi) { Content headContent = getResource("doclet.Deprecated_API"); Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, true, HtmlStyle.title, headContent); Content div = HtmlTree.DIV(HtmlStyle.header, heading); Content headingContent = getResource("doclet.Contents"); div.addContent(HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, true, headingContent)); Content ul = new HtmlTree(HtmlTag.UL); for (int i = 0; i < DeprecatedAPIListBuilder.NUM_TYPES; i++) { addIndexLink(deprapi, i, ul); } div.addContent(ul); return div; } /** * Add the anchor. * * @param builder the deprecated list builder * @param type the type of list being documented * @param htmlTree the content tree to which the anchor will be added */ private void addAnchor(DeprecatedAPIListBuilder builder, int type, Content htmlTree) { if (builder.hasDocumentation(type)) { htmlTree.addContent(getMarkerAnchor(ANCHORS[type])); } } /** * Get the header for the deprecated API Listing. * * @return a content tree for the header */ public Content getHeader() { String title = configuration.getText("doclet.Window_Deprecated_List"); Content bodyTree = getBody(true, getWindowTitle(title)); addTop(bodyTree); addNavLinks(true, bodyTree); return bodyTree; } /** * Get the deprecated label. * * @return a content tree for the deprecated label */ protected Content getNavLinkDeprecated() { Content li = HtmlTree.LI(HtmlStyle.navBarCell1Rev, deprecatedLabel); return li; } } ././@LongLink0000000000000000000000000000016000000000000011212 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/EnumConstantWriterImpl.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/EnumConstantWrit0000644000000000000000000002150212214026367032233 0ustar 00000000000000/* * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html; import java.io.*; import com.sun.javadoc.*; import com.sun.tools.doclets.formats.html.markup.*; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.*; /** * Writes enum constant documentation in HTML format. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Jamie Ho * @author Bhavesh Patel (Modified) */ public class EnumConstantWriterImpl extends AbstractMemberWriter implements EnumConstantWriter, MemberSummaryWriter { public EnumConstantWriterImpl(SubWriterHolderWriter writer, ClassDoc classdoc) { super(writer, classdoc); } public EnumConstantWriterImpl(SubWriterHolderWriter writer) { super(writer); } /** * {@inheritDoc} */ public Content getMemberSummaryHeader(ClassDoc classDoc, Content memberSummaryTree) { memberSummaryTree.addContent(HtmlConstants.START_OF_ENUM_CONSTANT_SUMMARY); Content memberTree = writer.getMemberTreeHeader(); writer.addSummaryHeader(this, classDoc, memberTree); return memberTree; } /** * {@inheritDoc} */ public Content getEnumConstantsDetailsTreeHeader(ClassDoc classDoc, Content memberDetailsTree) { memberDetailsTree.addContent(HtmlConstants.START_OF_ENUM_CONSTANT_DETAILS); Content enumConstantsDetailsTree = writer.getMemberTreeHeader(); enumConstantsDetailsTree.addContent(writer.getMarkerAnchor("enum_constant_detail")); Content heading = HtmlTree.HEADING(HtmlConstants.DETAILS_HEADING, writer.enumConstantsDetailsLabel); enumConstantsDetailsTree.addContent(heading); return enumConstantsDetailsTree; } /** * {@inheritDoc} */ public Content getEnumConstantsTreeHeader(FieldDoc enumConstant, Content enumConstantsDetailsTree) { enumConstantsDetailsTree.addContent( writer.getMarkerAnchor(enumConstant.name())); Content enumConstantsTree = writer.getMemberTreeHeader(); Content heading = new HtmlTree(HtmlConstants.MEMBER_HEADING); heading.addContent(enumConstant.name()); enumConstantsTree.addContent(heading); return enumConstantsTree; } /** * {@inheritDoc} */ public Content getSignature(FieldDoc enumConstant) { Content pre = new HtmlTree(HtmlTag.PRE); writer.addAnnotationInfo(enumConstant, pre); addModifiers(enumConstant, pre); Content enumConstantLink = writer.getLink(new LinkInfoImpl( configuration, LinkInfoImpl.Kind.MEMBER, enumConstant.type())); pre.addContent(enumConstantLink); pre.addContent(" "); if (configuration.linksource) { Content enumConstantName = new StringContent(enumConstant.name()); writer.addSrcLink(enumConstant, enumConstantName, pre); } else { addName(enumConstant.name(), pre); } return pre; } /** * {@inheritDoc} */ public void addDeprecated(FieldDoc enumConstant, Content enumConstantsTree) { addDeprecatedInfo(enumConstant, enumConstantsTree); } /** * {@inheritDoc} */ public void addComments(FieldDoc enumConstant, Content enumConstantsTree) { addComment(enumConstant, enumConstantsTree); } /** * {@inheritDoc} */ public void addTags(FieldDoc enumConstant, Content enumConstantsTree) { writer.addTagsInfo(enumConstant, enumConstantsTree); } /** * {@inheritDoc} */ public Content getEnumConstantsDetails(Content enumConstantsDetailsTree) { return getMemberTree(enumConstantsDetailsTree); } /** * {@inheritDoc} */ public Content getEnumConstants(Content enumConstantsTree, boolean isLastContent) { return getMemberTree(enumConstantsTree, isLastContent); } /** * {@inheritDoc} */ public void close() throws IOException { writer.close(); } public int getMemberKind() { return VisibleMemberMap.ENUM_CONSTANTS; } /** * {@inheritDoc} */ public void addSummaryLabel(Content memberTree) { Content label = HtmlTree.HEADING(HtmlConstants.SUMMARY_HEADING, writer.getResource("doclet.Enum_Constant_Summary")); memberTree.addContent(label); } /** * {@inheritDoc} */ public String getTableSummary() { return configuration.getText("doclet.Member_Table_Summary", configuration.getText("doclet.Enum_Constant_Summary"), configuration.getText("doclet.enum_constants")); } /** * {@inheritDoc} */ public Content getCaption() { return configuration.getResource("doclet.Enum_Constants"); } /** * {@inheritDoc} */ public String[] getSummaryTableHeader(ProgramElementDoc member) { String[] header = new String[] { configuration.getText("doclet.0_and_1", configuration.getText("doclet.Enum_Constant"), configuration.getText("doclet.Description")) }; return header; } /** * {@inheritDoc} */ public void addSummaryAnchor(ClassDoc cd, Content memberTree) { memberTree.addContent(writer.getMarkerAnchor("enum_constant_summary")); } /** * {@inheritDoc} */ public void addInheritedSummaryAnchor(ClassDoc cd, Content inheritedTree) { } /** * {@inheritDoc} */ public void addInheritedSummaryLabel(ClassDoc cd, Content inheritedTree) { } /** * {@inheritDoc} */ protected void addSummaryLink(LinkInfoImpl.Kind context, ClassDoc cd, ProgramElementDoc member, Content tdSummary) { Content strong = HtmlTree.STRONG( writer.getDocLink(context, (MemberDoc) member, member.name(), false)); Content code = HtmlTree.CODE(strong); tdSummary.addContent(code); } /** * {@inheritDoc} */ @Override public void setSummaryColumnStyle(HtmlTree tdTree) { tdTree.addStyle(HtmlStyle.colOne); } /** * {@inheritDoc} */ protected void addInheritedSummaryLink(ClassDoc cd, ProgramElementDoc member, Content linksTree) { } /** * {@inheritDoc} */ protected void addSummaryType(ProgramElementDoc member, Content tdSummaryType) { //Not applicable. } /** * {@inheritDoc} */ protected Content getDeprecatedLink(ProgramElementDoc member) { return writer.getDocLink(LinkInfoImpl.Kind.MEMBER, (MemberDoc) member, ((FieldDoc)member).qualifiedName()); } /** * {@inheritDoc} */ protected Content getNavSummaryLink(ClassDoc cd, boolean link) { if (link) { return writer.getHyperLink((cd == null)? "enum_constant_summary": "enum_constants_inherited_from_class_" + configuration.getClassName(cd), writer.getResource("doclet.navEnum")); } else { return writer.getResource("doclet.navEnum"); } } /** * {@inheritDoc} */ protected void addNavDetailLink(boolean link, Content liNav) { if (link) { liNav.addContent(writer.getHyperLink("enum_constant_detail", writer.getResource("doclet.navEnum"))); } else { liNav.addContent(writer.getResource("doclet.navEnum")); } } } ././@LongLink0000000000000000000000000000015100000000000011212 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/FieldWriterImpl.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/FieldWriterImpl.0000644000000000000000000002445412214026367032100 0ustar 00000000000000/* * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html; import java.io.*; import com.sun.javadoc.*; import com.sun.tools.doclets.formats.html.markup.*; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.*; /** * Writes field documentation in HTML format. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Robert Field * @author Atul M Dambalkar * @author Jamie Ho (rewrite) * @author Bhavesh Patel (Modified) */ public class FieldWriterImpl extends AbstractMemberWriter implements FieldWriter, MemberSummaryWriter { public FieldWriterImpl(SubWriterHolderWriter writer, ClassDoc classdoc) { super(writer, classdoc); } public FieldWriterImpl(SubWriterHolderWriter writer) { super(writer); } /** * {@inheritDoc} */ public Content getMemberSummaryHeader(ClassDoc classDoc, Content memberSummaryTree) { memberSummaryTree.addContent(HtmlConstants.START_OF_FIELD_SUMMARY); Content memberTree = writer.getMemberTreeHeader(); writer.addSummaryHeader(this, classDoc, memberTree); return memberTree; } /** * {@inheritDoc} */ public Content getFieldDetailsTreeHeader(ClassDoc classDoc, Content memberDetailsTree) { memberDetailsTree.addContent(HtmlConstants.START_OF_FIELD_DETAILS); Content fieldDetailsTree = writer.getMemberTreeHeader(); fieldDetailsTree.addContent(writer.getMarkerAnchor("field_detail")); Content heading = HtmlTree.HEADING(HtmlConstants.DETAILS_HEADING, writer.fieldDetailsLabel); fieldDetailsTree.addContent(heading); return fieldDetailsTree; } /** * {@inheritDoc} */ public Content getFieldDocTreeHeader(FieldDoc field, Content fieldDetailsTree) { fieldDetailsTree.addContent( writer.getMarkerAnchor(field.name())); Content fieldDocTree = writer.getMemberTreeHeader(); Content heading = new HtmlTree(HtmlConstants.MEMBER_HEADING); heading.addContent(field.name()); fieldDocTree.addContent(heading); return fieldDocTree; } /** * {@inheritDoc} */ public Content getSignature(FieldDoc field) { Content pre = new HtmlTree(HtmlTag.PRE); writer.addAnnotationInfo(field, pre); addModifiers(field, pre); Content fieldlink = writer.getLink(new LinkInfoImpl( configuration, LinkInfoImpl.Kind.MEMBER, field.type())); pre.addContent(fieldlink); pre.addContent(" "); if (configuration.linksource) { Content fieldName = new StringContent(field.name()); writer.addSrcLink(field, fieldName, pre); } else { addName(field.name(), pre); } return pre; } /** * {@inheritDoc} */ public void addDeprecated(FieldDoc field, Content fieldDocTree) { addDeprecatedInfo(field, fieldDocTree); } /** * {@inheritDoc} */ public void addComments(FieldDoc field, Content fieldDocTree) { ClassDoc holder = field.containingClass(); if (field.inlineTags().length > 0) { if (holder.equals(classdoc) || (! (holder.isPublic() || Util.isLinkable(holder, configuration)))) { writer.addInlineComment(field, fieldDocTree); } else { Content link = writer.getDocLink(LinkInfoImpl.Kind.FIELD_DOC_COPY, holder, field, holder.isIncluded() ? holder.typeName() : holder.qualifiedTypeName(), false); Content codeLink = HtmlTree.CODE(link); Content strong = HtmlTree.STRONG(holder.isClass()? writer.descfrmClassLabel : writer.descfrmInterfaceLabel); strong.addContent(writer.getSpace()); strong.addContent(codeLink); fieldDocTree.addContent(HtmlTree.DIV(HtmlStyle.block, strong)); writer.addInlineComment(field, fieldDocTree); } } } /** * {@inheritDoc} */ public void addTags(FieldDoc field, Content fieldDocTree) { writer.addTagsInfo(field, fieldDocTree); } /** * {@inheritDoc} */ public Content getFieldDetails(Content fieldDetailsTree) { return getMemberTree(fieldDetailsTree); } /** * {@inheritDoc} */ public Content getFieldDoc(Content fieldDocTree, boolean isLastContent) { return getMemberTree(fieldDocTree, isLastContent); } /** * Close the writer. */ public void close() throws IOException { writer.close(); } public int getMemberKind() { return VisibleMemberMap.FIELDS; } /** * {@inheritDoc} */ public void addSummaryLabel(Content memberTree) { Content label = HtmlTree.HEADING(HtmlConstants.SUMMARY_HEADING, writer.getResource("doclet.Field_Summary")); memberTree.addContent(label); } /** * {@inheritDoc} */ public String getTableSummary() { return configuration.getText("doclet.Member_Table_Summary", configuration.getText("doclet.Field_Summary"), configuration.getText("doclet.fields")); } /** * {@inheritDoc} */ public Content getCaption() { return configuration.getResource("doclet.Fields"); } /** * {@inheritDoc} */ public String[] getSummaryTableHeader(ProgramElementDoc member) { String[] header = new String[] { writer.getModifierTypeHeader(), configuration.getText("doclet.0_and_1", configuration.getText("doclet.Field"), configuration.getText("doclet.Description")) }; return header; } /** * {@inheritDoc} */ public void addSummaryAnchor(ClassDoc cd, Content memberTree) { memberTree.addContent(writer.getMarkerAnchor("field_summary")); } /** * {@inheritDoc} */ public void addInheritedSummaryAnchor(ClassDoc cd, Content inheritedTree) { inheritedTree.addContent(writer.getMarkerAnchor( "fields_inherited_from_class_" + configuration.getClassName(cd))); } /** * {@inheritDoc} */ public void addInheritedSummaryLabel(ClassDoc cd, Content inheritedTree) { Content classLink = writer.getPreQualifiedClassLink( LinkInfoImpl.Kind.MEMBER, cd, false); Content label = new StringContent(cd.isClass() ? configuration.getText("doclet.Fields_Inherited_From_Class") : configuration.getText("doclet.Fields_Inherited_From_Interface")); Content labelHeading = HtmlTree.HEADING(HtmlConstants.INHERITED_SUMMARY_HEADING, label); labelHeading.addContent(writer.getSpace()); labelHeading.addContent(classLink); inheritedTree.addContent(labelHeading); } /** * {@inheritDoc} */ protected void addSummaryLink(LinkInfoImpl.Kind context, ClassDoc cd, ProgramElementDoc member, Content tdSummary) { Content strong = HtmlTree.STRONG( writer.getDocLink(context, cd , (MemberDoc) member, member.name(), false)); Content code = HtmlTree.CODE(strong); tdSummary.addContent(code); } /** * {@inheritDoc} */ protected void addInheritedSummaryLink(ClassDoc cd, ProgramElementDoc member, Content linksTree) { linksTree.addContent( writer.getDocLink(LinkInfoImpl.Kind.MEMBER, cd, (MemberDoc)member, member.name(), false)); } /** * {@inheritDoc} */ protected void addSummaryType(ProgramElementDoc member, Content tdSummaryType) { FieldDoc field = (FieldDoc)member; addModifierAndType(field, field.type(), tdSummaryType); } /** * {@inheritDoc} */ protected Content getDeprecatedLink(ProgramElementDoc member) { return writer.getDocLink(LinkInfoImpl.Kind.MEMBER, (MemberDoc) member, ((FieldDoc)member).qualifiedName()); } /** * {@inheritDoc} */ protected Content getNavSummaryLink(ClassDoc cd, boolean link) { if (link) { return writer.getHyperLink((cd == null)? "field_summary": "fields_inherited_from_class_" + configuration.getClassName(cd), writer.getResource("doclet.navField")); } else { return writer.getResource("doclet.navField"); } } /** * {@inheritDoc} */ protected void addNavDetailLink(boolean link, Content liNav) { if (link) { liNav.addContent(writer.getHyperLink("field_detail", writer.getResource("doclet.navField"))); } else { liNav.addContent(writer.getResource("doclet.navField")); } } } ././@LongLink0000000000000000000000000000015300000000000011214 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/FrameOutputWriter.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/FrameOutputWrite0000644000000000000000000001661512214026367032246 0ustar 00000000000000/* * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html; import java.io.*; import com.sun.tools.doclets.formats.html.markup.*; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.*; /** * Generate the documentation in the Html "frame" format in the browser. The * generated documentation will have two or three frames depending upon the * number of packages on the command line. In general there will be three frames * in the output, a left-hand top frame will have a list of all packages with * links to target left-hand bottom frame. The left-hand bottom frame will have * the particular package contents or the all-classes list, where as the single * right-hand frame will have overview or package summary or class file. Also * take care of browsers which do not support Html frames. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Atul M Dambalkar */ public class FrameOutputWriter extends HtmlDocletWriter { /** * Number of packages specified on the command line. */ int noOfPackages; private final String SCROLL_YES = "yes"; /** * Constructor to construct FrameOutputWriter object. * * @param filename File to be generated. */ public FrameOutputWriter(ConfigurationImpl configuration, DocPath filename) throws IOException { super(configuration, filename); noOfPackages = configuration.packages.length; } /** * Construct FrameOutputWriter object and then use it to generate the Html * file which will have the description of all the frames in the * documentation. The name of the generated file is "index.html" which is * the default first file for Html documents. * @throws DocletAbortException */ public static void generate(ConfigurationImpl configuration) { FrameOutputWriter framegen; DocPath filename = DocPath.empty; try { filename = DocPaths.INDEX; framegen = new FrameOutputWriter(configuration, filename); framegen.generateFrameFile(); framegen.close(); } catch (IOException exc) { configuration.standardmessage.error( "doclet.exception_encountered", exc.toString(), filename); throw new DocletAbortException(); } } /** * Generate the constants in the "index.html" file. Print the frame details * as well as warning if browser is not supporting the Html frames. */ protected void generateFrameFile() throws IOException { Content frameset = getFrameDetails(); if (configuration.windowtitle.length() > 0) { printFramesetDocument(configuration.windowtitle, configuration.notimestamp, frameset); } else { printFramesetDocument(configuration.getText("doclet.Generated_Docs_Untitled"), configuration.notimestamp, frameset); } } /** * Add the code for issueing the warning for a non-frame capable web * client. Also provide links to the non-frame version documentation. * * @param contentTree the content tree to which the non-frames information will be added */ protected void addFrameWarning(Content contentTree) { Content noframes = new HtmlTree(HtmlTag.NOFRAMES); Content noScript = HtmlTree.NOSCRIPT( HtmlTree.DIV(getResource("doclet.No_Script_Message"))); noframes.addContent(noScript); Content noframesHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, getResource("doclet.Frame_Alert")); noframes.addContent(noframesHead); Content p = HtmlTree.P(getResource("doclet.Frame_Warning_Message", getHyperLink(configuration.topFile, configuration.getText("doclet.Non_Frame_Version")))); noframes.addContent(p); contentTree.addContent(noframes); } /** * Get the frame sizes and their contents. * * @return a content tree for the frame details */ protected Content getFrameDetails() { HtmlTree frameset = HtmlTree.FRAMESET("20%,80%", null, "Documentation frame", "top.loadFrames()"); if (noOfPackages <= 1) { addAllClassesFrameTag(frameset); } else if (noOfPackages > 1) { HtmlTree leftFrameset = HtmlTree.FRAMESET(null, "30%,70%", "Left frames", "top.loadFrames()"); addAllPackagesFrameTag(leftFrameset); addAllClassesFrameTag(leftFrameset); frameset.addContent(leftFrameset); } addClassFrameTag(frameset); addFrameWarning(frameset); return frameset; } /** * Add the FRAME tag for the frame that lists all packages. * * @param contentTree the content tree to which the information will be added */ private void addAllPackagesFrameTag(Content contentTree) { HtmlTree frame = HtmlTree.FRAME(DocPaths.OVERVIEW_FRAME.getPath(), "packageListFrame", configuration.getText("doclet.All_Packages")); contentTree.addContent(frame); } /** * Add the FRAME tag for the frame that lists all classes. * * @param contentTree the content tree to which the information will be added */ private void addAllClassesFrameTag(Content contentTree) { HtmlTree frame = HtmlTree.FRAME(DocPaths.ALLCLASSES_FRAME.getPath(), "packageFrame", configuration.getText("doclet.All_classes_and_interfaces")); contentTree.addContent(frame); } /** * Add the FRAME tag for the frame that describes the class in detail. * * @param contentTree the content tree to which the information will be added */ private void addClassFrameTag(Content contentTree) { HtmlTree frame = HtmlTree.FRAME(configuration.topFile.getPath(), "classFrame", configuration.getText("doclet.Package_class_and_interface_descriptions"), SCROLL_YES); contentTree.addContent(frame); } } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/HelpWriter.java0000644000000000000000000003630612214026367031764 0ustar 00000000000000/* * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html; import java.io.*; import com.sun.tools.doclets.formats.html.markup.*; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.*; /** * Generate the Help File for the generated API documentation. The help file * contents are helpful for browsing the generated documentation. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Atul M Dambalkar */ public class HelpWriter extends HtmlDocletWriter { /** * Constructor to construct HelpWriter object. * @param filename File to be generated. */ public HelpWriter(ConfigurationImpl configuration, DocPath filename) throws IOException { super(configuration, filename); } /** * Construct the HelpWriter object and then use it to generate the help * file. The name of the generated file is "help-doc.html". The help file * will get generated if and only if "-helpfile" and "-nohelp" is not used * on the command line. * @throws DocletAbortException */ public static void generate(ConfigurationImpl configuration) { HelpWriter helpgen; DocPath filename = DocPath.empty; try { filename = DocPaths.HELP_DOC; helpgen = new HelpWriter(configuration, filename); helpgen.generateHelpFile(); helpgen.close(); } catch (IOException exc) { configuration.standardmessage.error( "doclet.exception_encountered", exc.toString(), filename); throw new DocletAbortException(); } } /** * Generate the help file contents. */ protected void generateHelpFile() throws IOException { String title = configuration.getText("doclet.Window_Help_title"); Content body = getBody(true, getWindowTitle(title)); addTop(body); addNavLinks(true, body); addHelpFileContents(body); addNavLinks(false, body); addBottom(body); printHtmlDocument(null, true, body); } /** * Add the help file contents from the resource file to the content tree. While adding the * help file contents it also keeps track of user options. If "-notree" * is used, then the "overview-tree.html" will not get added and hence * help information also will not get added. * * @param contentTree the content tree to which the help file contents will be added */ protected void addHelpFileContents(Content contentTree) { Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, false, HtmlStyle.title, getResource("doclet.Help_line_1")); Content div = HtmlTree.DIV(HtmlStyle.header, heading); Content line2 = HtmlTree.DIV(HtmlStyle.subTitle, getResource("doclet.Help_line_2")); div.addContent(line2); contentTree.addContent(div); HtmlTree ul = new HtmlTree(HtmlTag.UL); ul.addStyle(HtmlStyle.blockList); if (configuration.createoverview) { Content overviewHeading = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, getResource("doclet.Overview")); Content liOverview = HtmlTree.LI(HtmlStyle.blockList, overviewHeading); Content line3 = getResource("doclet.Help_line_3", getHyperLink(DocPaths.OVERVIEW_SUMMARY, configuration.getText("doclet.Overview"))); Content overviewPara = HtmlTree.P(line3); liOverview.addContent(overviewPara); ul.addContent(liOverview); } Content packageHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, getResource("doclet.Package")); Content liPackage = HtmlTree.LI(HtmlStyle.blockList, packageHead); Content line4 = getResource("doclet.Help_line_4"); Content packagePara = HtmlTree.P(line4); liPackage.addContent(packagePara); HtmlTree ulPackage = new HtmlTree(HtmlTag.UL); ulPackage.addContent(HtmlTree.LI( getResource("doclet.Interfaces_Italic"))); ulPackage.addContent(HtmlTree.LI( getResource("doclet.Classes"))); ulPackage.addContent(HtmlTree.LI( getResource("doclet.Enums"))); ulPackage.addContent(HtmlTree.LI( getResource("doclet.Exceptions"))); ulPackage.addContent(HtmlTree.LI( getResource("doclet.Errors"))); ulPackage.addContent(HtmlTree.LI( getResource("doclet.AnnotationTypes"))); liPackage.addContent(ulPackage); ul.addContent(liPackage); Content classHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, getResource("doclet.Help_line_5")); Content liClass = HtmlTree.LI(HtmlStyle.blockList, classHead); Content line6 = getResource("doclet.Help_line_6"); Content classPara = HtmlTree.P(line6); liClass.addContent(classPara); HtmlTree ul1 = new HtmlTree(HtmlTag.UL); ul1.addContent(HtmlTree.LI( getResource("doclet.Help_line_7"))); ul1.addContent(HtmlTree.LI( getResource("doclet.Help_line_8"))); ul1.addContent(HtmlTree.LI( getResource("doclet.Help_line_9"))); ul1.addContent(HtmlTree.LI( getResource("doclet.Help_line_10"))); ul1.addContent(HtmlTree.LI( getResource("doclet.Help_line_11"))); ul1.addContent(HtmlTree.LI( getResource("doclet.Help_line_12"))); liClass.addContent(ul1); HtmlTree ul2 = new HtmlTree(HtmlTag.UL); ul2.addContent(HtmlTree.LI( getResource("doclet.Nested_Class_Summary"))); ul2.addContent(HtmlTree.LI( getResource("doclet.Field_Summary"))); ul2.addContent(HtmlTree.LI( getResource("doclet.Constructor_Summary"))); ul2.addContent(HtmlTree.LI( getResource("doclet.Method_Summary"))); liClass.addContent(ul2); HtmlTree ul3 = new HtmlTree(HtmlTag.UL); ul3.addContent(HtmlTree.LI( getResource("doclet.Field_Detail"))); ul3.addContent(HtmlTree.LI( getResource("doclet.Constructor_Detail"))); ul3.addContent(HtmlTree.LI( getResource("doclet.Method_Detail"))); liClass.addContent(ul3); Content line13 = getResource("doclet.Help_line_13"); Content para = HtmlTree.P(line13); liClass.addContent(para); ul.addContent(liClass); //Annotation Types Content aHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, getResource("doclet.AnnotationType")); Content liAnnotation = HtmlTree.LI(HtmlStyle.blockList, aHead); Content aline1 = getResource("doclet.Help_annotation_type_line_1"); Content aPara = HtmlTree.P(aline1); liAnnotation.addContent(aPara); HtmlTree aul = new HtmlTree(HtmlTag.UL); aul.addContent(HtmlTree.LI( getResource("doclet.Help_annotation_type_line_2"))); aul.addContent(HtmlTree.LI( getResource("doclet.Help_annotation_type_line_3"))); aul.addContent(HtmlTree.LI( getResource("doclet.Annotation_Type_Required_Member_Summary"))); aul.addContent(HtmlTree.LI( getResource("doclet.Annotation_Type_Optional_Member_Summary"))); aul.addContent(HtmlTree.LI( getResource("doclet.Annotation_Type_Member_Detail"))); liAnnotation.addContent(aul); ul.addContent(liAnnotation); //Enums Content enumHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, getResource("doclet.Enum")); Content liEnum = HtmlTree.LI(HtmlStyle.blockList, enumHead); Content eline1 = getResource("doclet.Help_enum_line_1"); Content enumPara = HtmlTree.P(eline1); liEnum.addContent(enumPara); HtmlTree eul = new HtmlTree(HtmlTag.UL); eul.addContent(HtmlTree.LI( getResource("doclet.Help_enum_line_2"))); eul.addContent(HtmlTree.LI( getResource("doclet.Help_enum_line_3"))); eul.addContent(HtmlTree.LI( getResource("doclet.Enum_Constant_Summary"))); eul.addContent(HtmlTree.LI( getResource("doclet.Enum_Constant_Detail"))); liEnum.addContent(eul); ul.addContent(liEnum); if (configuration.classuse) { Content useHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, getResource("doclet.Help_line_14")); Content liUse = HtmlTree.LI(HtmlStyle.blockList, useHead); Content line15 = getResource("doclet.Help_line_15"); Content usePara = HtmlTree.P(line15); liUse.addContent(usePara); ul.addContent(liUse); } if (configuration.createtree) { Content treeHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, getResource("doclet.Help_line_16")); Content liTree = HtmlTree.LI(HtmlStyle.blockList, treeHead); Content line17 = getResource("doclet.Help_line_17_with_tree_link", getHyperLink(DocPaths.OVERVIEW_TREE, configuration.getText("doclet.Class_Hierarchy")), HtmlTree.CODE(new StringContent("java.lang.Object"))); Content treePara = HtmlTree.P(line17); liTree.addContent(treePara); HtmlTree tul = new HtmlTree(HtmlTag.UL); tul.addContent(HtmlTree.LI( getResource("doclet.Help_line_18"))); tul.addContent(HtmlTree.LI( getResource("doclet.Help_line_19"))); liTree.addContent(tul); ul.addContent(liTree); } if (!(configuration.nodeprecatedlist || configuration.nodeprecated)) { Content dHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, getResource("doclet.Deprecated_API")); Content liDeprecated = HtmlTree.LI(HtmlStyle.blockList, dHead); Content line20 = getResource("doclet.Help_line_20_with_deprecated_api_link", getHyperLink(DocPaths.DEPRECATED_LIST, configuration.getText("doclet.Deprecated_API"))); Content dPara = HtmlTree.P(line20); liDeprecated.addContent(dPara); ul.addContent(liDeprecated); } if (configuration.createindex) { Content indexlink; if (configuration.splitindex) { indexlink = getHyperLink(DocPaths.INDEX_FILES.resolve(DocPaths.indexN(1)), configuration.getText("doclet.Index")); } else { indexlink = getHyperLink(DocPaths.INDEX_ALL, configuration.getText("doclet.Index")); } Content indexHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, getResource("doclet.Help_line_21")); Content liIndex = HtmlTree.LI(HtmlStyle.blockList, indexHead); Content line22 = getResource("doclet.Help_line_22", indexlink); Content indexPara = HtmlTree.P(line22); liIndex.addContent(indexPara); ul.addContent(liIndex); } Content prevHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, getResource("doclet.Help_line_23")); Content liPrev = HtmlTree.LI(HtmlStyle.blockList, prevHead); Content line24 = getResource("doclet.Help_line_24"); Content prevPara = HtmlTree.P(line24); liPrev.addContent(prevPara); ul.addContent(liPrev); Content frameHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, getResource("doclet.Help_line_25")); Content liFrame = HtmlTree.LI(HtmlStyle.blockList, frameHead); Content line26 = getResource("doclet.Help_line_26"); Content framePara = HtmlTree.P(line26); liFrame.addContent(framePara); ul.addContent(liFrame); Content allclassesHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, getResource("doclet.All_Classes")); Content liAllClasses = HtmlTree.LI(HtmlStyle.blockList, allclassesHead); Content line27 = getResource("doclet.Help_line_27", getHyperLink(DocPaths.ALLCLASSES_NOFRAME, configuration.getText("doclet.All_Classes"))); Content allclassesPara = HtmlTree.P(line27); liAllClasses.addContent(allclassesPara); ul.addContent(liAllClasses); Content sHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, getResource("doclet.Serialized_Form")); Content liSerial = HtmlTree.LI(HtmlStyle.blockList, sHead); Content line28 = getResource("doclet.Help_line_28"); Content serialPara = HtmlTree.P(line28); liSerial.addContent(serialPara); ul.addContent(liSerial); Content constHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, getResource("doclet.Constants_Summary")); Content liConst = HtmlTree.LI(HtmlStyle.blockList, constHead); Content line29 = getResource("doclet.Help_line_29", getHyperLink(DocPaths.CONSTANT_VALUES, configuration.getText("doclet.Constants_Summary"))); Content constPara = HtmlTree.P(line29); liConst.addContent(constPara); ul.addContent(liConst); Content divContent = HtmlTree.DIV(HtmlStyle.contentContainer, ul); Content line30 = HtmlTree.EM(getResource("doclet.Help_line_30")); divContent.addContent(line30); contentTree.addContent(divContent); } /** * Get the help label. * * @return a content tree for the help label */ @Override protected Content getNavLinkHelp() { Content li = HtmlTree.LI(HtmlStyle.navBarCell1Rev, helpLabel); return li; } } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDoclet.java0000644000000000000000000003250212214026367031730 0ustar 00000000000000/* * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html; import java.io.*; import java.util.*; import com.sun.javadoc.*; import com.sun.tools.javac.sym.Profiles; import com.sun.tools.javac.jvm.Profile; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.builders.*; import com.sun.tools.doclets.internal.toolkit.util.*; /** * The class with "start" method, calls individual Writers. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Atul M Dambalkar * @author Robert Field * @author Jamie Ho * */ public class HtmlDoclet extends AbstractDoclet { // An instance will be created by validOptions, and used by start. private static HtmlDoclet docletToStart = null; public HtmlDoclet() { configuration = new ConfigurationImpl(); } /** * The global configuration information for this run. */ public final ConfigurationImpl configuration; /** * The "start" method as required by Javadoc. * * @param root the root of the documentation tree. * @see com.sun.javadoc.RootDoc * @return true if the doclet ran without encountering any errors. */ public static boolean start(RootDoc root) { // In typical use, options will have been set up by calling validOptions, // which will create an HtmlDoclet for use here. HtmlDoclet doclet; if (docletToStart != null) { doclet = docletToStart; docletToStart = null; } else { doclet = new HtmlDoclet(); } return doclet.start(doclet, root); } /** * Create the configuration instance. * Override this method to use a different * configuration. */ public Configuration configuration() { return configuration; } /** * Start the generation of files. Call generate methods in the individual * writers, which will in turn genrate the documentation files. Call the * TreeWriter generation first to ensure the Class Hierarchy is built * first and then can be used in the later generation. * * For new format. * * @see com.sun.javadoc.RootDoc */ protected void generateOtherFiles(RootDoc root, ClassTree classtree) throws Exception { super.generateOtherFiles(root, classtree); if (configuration.linksource) { SourceToHTMLConverter.convertRoot(configuration, root, DocPaths.SOURCE_OUTPUT); } if (configuration.topFile.isEmpty()) { configuration.standardmessage. error("doclet.No_Non_Deprecated_Classes_To_Document"); return; } boolean nodeprecated = configuration.nodeprecated; performCopy(configuration.helpfile); performCopy(configuration.stylesheetfile); copyResourceFile("background.gif"); copyResourceFile("tab.gif"); copyResourceFile("titlebar.gif"); copyResourceFile("titlebar_end.gif"); copyResourceFile("activetitlebar.gif"); copyResourceFile("activetitlebar_end.gif"); // do early to reduce memory footprint if (configuration.classuse) { ClassUseWriter.generate(configuration, classtree); } IndexBuilder indexbuilder = new IndexBuilder(configuration, nodeprecated); if (configuration.createtree) { TreeWriter.generate(configuration, classtree); } if (configuration.createindex) { if (configuration.splitindex) { SplitIndexWriter.generate(configuration, indexbuilder); } else { SingleIndexWriter.generate(configuration, indexbuilder); } } if (!(configuration.nodeprecatedlist || nodeprecated)) { DeprecatedListWriter.generate(configuration); } AllClassesFrameWriter.generate(configuration, new IndexBuilder(configuration, nodeprecated, true)); FrameOutputWriter.generate(configuration); if (configuration.createoverview) { PackageIndexWriter.generate(configuration); } if (configuration.helpfile.length() == 0 && !configuration.nohelp) { HelpWriter.generate(configuration); } // If a stylesheet file is not specified, copy the default stylesheet // and replace newline with platform-specific newline. DocFile f; if (configuration.stylesheetfile.length() == 0) { f = DocFile.createFileForOutput(configuration, DocPaths.STYLESHEET); f.copyResource(DocPaths.RESOURCES.resolve(DocPaths.STYLESHEET), false, true); } f = DocFile.createFileForOutput(configuration, DocPaths.JAVASCRIPT); f.copyResource(DocPaths.RESOURCES.resolve(DocPaths.JAVASCRIPT), true, true); } /** * {@inheritDoc} */ protected void generateClassFiles(ClassDoc[] arr, ClassTree classtree) { Arrays.sort(arr); for(int i = 0; i < arr.length; i++) { if (!(configuration.isGeneratedDoc(arr[i]) && arr[i].isIncluded())) { continue; } ClassDoc prev = (i == 0)? null: arr[i-1]; ClassDoc curr = arr[i]; ClassDoc next = (i+1 == arr.length)? null: arr[i+1]; try { if (curr.isAnnotationType()) { AbstractBuilder annotationTypeBuilder = configuration.getBuilderFactory() .getAnnotationTypeBuilder((AnnotationTypeDoc) curr, prev, next); annotationTypeBuilder.build(); } else { AbstractBuilder classBuilder = configuration.getBuilderFactory() .getClassBuilder(curr, prev, next, classtree); classBuilder.build(); } } catch (Exception e) { e.printStackTrace(); throw new DocletAbortException(); } } } /** * {@inheritDoc} */ protected void generateProfileFiles() throws Exception { if (configuration.showProfiles) { ProfileIndexFrameWriter.generate(configuration); Profile prevProfile = null, nextProfile; for (int i = 1; i < configuration.profiles.getProfileCount(); i++) { ProfilePackageIndexFrameWriter.generate(configuration, Profile.lookup(i).name); PackageDoc[] packages = configuration.profilePackages.get( Profile.lookup(i).name); PackageDoc prev = null, next; for (int j = 0; j < packages.length; j++) { // if -nodeprecated option is set and the package is marked as // deprecated, do not generate the profilename-package-summary.html // and profilename-package-frame.html pages for that package. if (!(configuration.nodeprecated && Util.isDeprecated(packages[j]))) { ProfilePackageFrameWriter.generate(configuration, packages[j], i); next = (j + 1 < packages.length && packages[j + 1].name().length() > 0) ? packages[j + 1] : null; AbstractBuilder profilePackageSummaryBuilder = configuration.getBuilderFactory().getProfilePackageSummaryBuilder( packages[j], prev, next, Profile.lookup(i)); profilePackageSummaryBuilder.build(); prev = packages[j]; } } nextProfile = (i + 1 < configuration.profiles.getProfileCount()) ? Profile.lookup(i + 1) : null; AbstractBuilder profileSummaryBuilder = configuration.getBuilderFactory().getProfileSummaryBuilder( Profile.lookup(i), prevProfile, nextProfile); profileSummaryBuilder.build(); prevProfile = Profile.lookup(i); } } } /** * {@inheritDoc} */ protected void generatePackageFiles(ClassTree classtree) throws Exception { PackageDoc[] packages = configuration.packages; if (packages.length > 1) { PackageIndexFrameWriter.generate(configuration); } PackageDoc prev = null, next; for (int i = 0; i < packages.length; i++) { // if -nodeprecated option is set and the package is marked as // deprecated, do not generate the package-summary.html, package-frame.html // and package-tree.html pages for that package. if (!(configuration.nodeprecated && Util.isDeprecated(packages[i]))) { PackageFrameWriter.generate(configuration, packages[i]); next = (i + 1 < packages.length && packages[i + 1].name().length() > 0) ? packages[i + 1] : null; //If the next package is unnamed package, skip 2 ahead if possible next = (i + 2 < packages.length && next == null) ? packages[i + 2] : next; AbstractBuilder packageSummaryBuilder = configuration.getBuilderFactory().getPackageSummaryBuilder( packages[i], prev, next); packageSummaryBuilder.build(); if (configuration.createtree) { PackageTreeWriter.generate(configuration, packages[i], prev, next, configuration.nodeprecated); } prev = packages[i]; } } } public static final ConfigurationImpl sharedInstanceForOptions = new ConfigurationImpl(); /** * Check for doclet added options here. * * @return number of arguments to option. Zero return means * option not known. Negative value means error occurred. */ public static int optionLength(String option) { // Construct temporary configuration for check return sharedInstanceForOptions.optionLength(option); } /** * Check that options have the correct arguments here. *

* This method is not required and will default gracefully * (to true) if absent. *

* Printing option related error messages (using the provided * DocErrorReporter) is the responsibility of this method. * * @return true if the options are valid. */ public static boolean validOptions(String options[][], DocErrorReporter reporter) { docletToStart = new HtmlDoclet(); return docletToStart.configuration.validOptions(options, reporter); } /** * Copy a file in the resources directory to the destination directory. * @param resource The name of the resource file to copy */ private void copyResourceFile(String resource) { DocPath p = DocPaths.RESOURCES.resolve(resource); DocFile f = DocFile.createFileForOutput(configuration, p); f.copyResource(p, false, false); } private void performCopy(String filename) { if (filename.isEmpty()) return; try { DocFile fromfile = DocFile.createFileForInput(configuration, filename); DocPath path = DocPath.create(fromfile.getName()); DocFile toFile = DocFile.createFileForOutput(configuration, path); if (toFile.isSameFile(fromfile)) return; configuration.message.notice((SourcePosition) null, "doclet.Copying_File_0_To_File_1", fromfile.toString(), path.getPath()); toFile.copyFile(fromfile); } catch (IOException exc) { configuration.message.error((SourcePosition) null, "doclet.perform_copy_exception_encountered", exc.toString()); throw new DocletAbortException(); } } } ././@LongLink0000000000000000000000000000015200000000000011213 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter0000644000000000000000000025211712214026367032213 0ustar 00000000000000/* * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html; import java.io.*; import java.text.SimpleDateFormat; import java.util.*; import com.sun.javadoc.*; import com.sun.tools.doclets.formats.html.markup.*; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.taglets.*; import com.sun.tools.doclets.internal.toolkit.util.*; /** * Class for the Html Format Code Generation specific to JavaDoc. * This Class contains methods related to the Html Code Generation which * are used extensively while generating the entire documentation. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @since 1.2 * @author Atul M Dambalkar * @author Robert Field * @author Bhavesh Patel (Modified) */ public class HtmlDocletWriter extends HtmlDocWriter { /** * Relative path from the file getting generated to the destination * directory. For example, if the file getting generated is * "java/lang/Object.html", then the path to the root is "../..". * This string can be empty if the file getting generated is in * the destination directory. */ public final DocPath pathToRoot; /** * Platform-independent path from the current or the * destination directory to the file getting generated. * Used when creating the file. */ public final DocPath path; /** * Name of the file getting generated. If the file getting generated is * "java/lang/Object.html", then the filename is "Object.html". */ public final DocPath filename; /** * The global configuration information for this run. */ public final ConfigurationImpl configuration; /** * To check whether annotation heading is printed or not. */ protected boolean printedAnnotationHeading = false; /** * To check whether the repeated annotations is documented or not. */ private boolean isAnnotationDocumented = false; /** * To check whether the container annotations is documented or not. */ private boolean isContainerDocumented = false; /** * Constructor to construct the HtmlStandardWriter object. * * @param path File to be generated. */ public HtmlDocletWriter(ConfigurationImpl configuration, DocPath path) throws IOException { super(configuration, path); this.configuration = configuration; this.path = path; this.pathToRoot = path.parent().invert(); this.filename = path.basename(); } /** * Replace {@docRoot} tag used in options that accept HTML text, such * as -header, -footer, -top and -bottom, and when converting a relative * HREF where commentTagsToString inserts a {@docRoot} where one was * missing. (Also see DocRootTaglet for {@docRoot} tags in doc * comments.) *

* Replace {@docRoot} tag in htmlstr with the relative path to the * destination directory from the directory where the file is being * written, looping to handle all such tags in htmlstr. *

* For example, for "-d docs" and -header containing {@docRoot}, when * the HTML page for source file p/C1.java is being generated, the * {@docRoot} tag would be inserted into the header as "../", * the relative path from docs/p/ to docs/ (the document root). *

* Note: This doc comment was written with '&#064;' representing '@' * to prevent the inline tag from being interpreted. */ public String replaceDocRootDir(String htmlstr) { // Return if no inline tags exist int index = htmlstr.indexOf("{@"); if (index < 0) { return htmlstr; } String lowerHtml = htmlstr.toLowerCase(); // Return index of first occurrence of {@docroot} // Note: {@docRoot} is not case sensitive when passed in w/command line option index = lowerHtml.indexOf("{@docroot}", index); if (index < 0) { return htmlstr; } StringBuilder buf = new StringBuilder(); int previndex = 0; while (true) { if (configuration.docrootparent.length() > 0) { final String docroot_parent = "{@docroot}/.."; // Search for lowercase version of {@docRoot}/.. index = lowerHtml.indexOf(docroot_parent, previndex); // If next {@docRoot}/.. pattern not found, append rest of htmlstr and exit loop if (index < 0) { buf.append(htmlstr.substring(previndex)); break; } // If next {@docroot}/.. pattern found, append htmlstr up to start of tag buf.append(htmlstr.substring(previndex, index)); previndex = index + docroot_parent.length(); // Insert docrootparent absolute path where {@docRoot}/.. was located buf.append(configuration.docrootparent); // Append slash if next character is not a slash if (previndex < htmlstr.length() && htmlstr.charAt(previndex) != '/') { buf.append('/'); } } else { final String docroot = "{@docroot}"; // Search for lowercase version of {@docRoot} index = lowerHtml.indexOf(docroot, previndex); // If next {@docRoot} tag not found, append rest of htmlstr and exit loop if (index < 0) { buf.append(htmlstr.substring(previndex)); break; } // If next {@docroot} tag found, append htmlstr up to start of tag buf.append(htmlstr.substring(previndex, index)); previndex = index + docroot.length(); // Insert relative path where {@docRoot} was located buf.append(pathToRoot.isEmpty() ? "." : pathToRoot.getPath()); // Append slash if next character is not a slash if (previndex < htmlstr.length() && htmlstr.charAt(previndex) != '/') { buf.append('/'); } } } return buf.toString(); } /** * Get the script to show or hide the All classes link. * * @param id id of the element to show or hide * @return a content tree for the script */ public Content getAllClassesLinkScript(String id) { HtmlTree script = new HtmlTree(HtmlTag.SCRIPT); script.addAttr(HtmlAttr.TYPE, "text/javascript"); String scriptCode = "" + DocletConstants.NL; Content scriptContent = new RawHtml(scriptCode); script.addContent(scriptContent); Content div = HtmlTree.DIV(script); return div; } /** * Add method information. * * @param method the method to be documented * @param dl the content tree to which the method information will be added */ private void addMethodInfo(MethodDoc method, Content dl) { ClassDoc[] intfacs = method.containingClass().interfaces(); MethodDoc overriddenMethod = method.overriddenMethod(); // Check whether there is any implementation or overridden info to be // printed. If no overridden or implementation info needs to be // printed, do not print this section. if ((intfacs.length > 0 && new ImplementedMethods(method, this.configuration).build().length > 0) || overriddenMethod != null) { MethodWriterImpl.addImplementsInfo(this, method, dl); if (overriddenMethod != null) { MethodWriterImpl.addOverridden(this, method.overriddenType(), overriddenMethod, dl); } } } /** * Adds the tags information. * * @param doc the doc for which the tags will be generated * @param htmltree the documentation tree to which the tags will be added */ protected void addTagsInfo(Doc doc, Content htmltree) { if (configuration.nocomment) { return; } Content dl = new HtmlTree(HtmlTag.DL); if (doc instanceof MethodDoc) { addMethodInfo((MethodDoc) doc, dl); } Content output = new ContentBuilder(); TagletWriter.genTagOuput(configuration.tagletManager, doc, configuration.tagletManager.getCustomTaglets(doc), getTagletWriterInstance(false), output); dl.addContent(output); htmltree.addContent(dl); } /** * Check whether there are any tags for Serialization Overview * section to be printed. * * @param field the FieldDoc object to check for tags. * @return true if there are tags to be printed else return false. */ protected boolean hasSerializationOverviewTags(FieldDoc field) { Content output = new ContentBuilder(); TagletWriter.genTagOuput(configuration.tagletManager, field, configuration.tagletManager.getCustomTaglets(field), getTagletWriterInstance(false), output); return !output.isEmpty(); } /** * Returns a TagletWriter that knows how to write HTML. * * @return a TagletWriter that knows how to write HTML. */ public TagletWriter getTagletWriterInstance(boolean isFirstSentence) { return new TagletWriterImpl(this, isFirstSentence); } /** * Get Package link, with target frame. * * @param pd The link will be to the "package-summary.html" page for this package * @param target name of the target frame * @param label tag for the link * @return a content for the target package link */ public Content getTargetPackageLink(PackageDoc pd, String target, Content label) { return getHyperLink(pathString(pd, DocPaths.PACKAGE_SUMMARY), label, "", target); } /** * Get Profile Package link, with target frame. * * @param pd the packageDoc object * @param target name of the target frame * @param label tag for the link * @param profileName the name of the profile being documented * @return a content for the target profile packages link */ public Content getTargetProfilePackageLink(PackageDoc pd, String target, Content label, String profileName) { return getHyperLink(pathString(pd, DocPaths.profilePackageSummary(profileName)), label, "", target); } /** * Get Profile link, with target frame. * * @param target name of the target frame * @param label tag for the link * @param profileName the name of the profile being documented * @return a content for the target profile link */ public Content getTargetProfileLink(String target, Content label, String profileName) { return getHyperLink(pathToRoot.resolve( DocPaths.profileSummary(profileName)), label, "", target); } /** * Get the type name for profile search. * * @param cd the classDoc object for which the type name conversion is needed * @return a type name string for the type */ public String getTypeNameForProfile(ClassDoc cd) { StringBuilder typeName = new StringBuilder((cd.containingPackage()).name().replace(".", "/")); typeName.append("/") .append(cd.name().replace(".", "$")); return typeName.toString(); } /** * Check if a type belongs to a profile. * * @param cd the classDoc object that needs to be checked * @param profileValue the profile in which the type needs to be checked * @return true if the type is in the profile */ public boolean isTypeInProfile(ClassDoc cd, int profileValue) { return (configuration.profiles.getProfile(getTypeNameForProfile(cd)) <= profileValue); } public void addClassesSummary(ClassDoc[] classes, String label, String tableSummary, String[] tableHeader, Content summaryContentTree, int profileValue) { if(classes.length > 0) { Arrays.sort(classes); Content caption = getTableCaption(new RawHtml(label)); Content table = HtmlTree.TABLE(HtmlStyle.packageSummary, 0, 3, 0, tableSummary, caption); table.addContent(getSummaryTableHeader(tableHeader, "col")); Content tbody = new HtmlTree(HtmlTag.TBODY); for (int i = 0; i < classes.length; i++) { if (!isTypeInProfile(classes[i], profileValue)) { continue; } if (!Util.isCoreClass(classes[i]) || !configuration.isGeneratedDoc(classes[i])) { continue; } Content classContent = getLink(new LinkInfoImpl( configuration, LinkInfoImpl.Kind.PACKAGE, classes[i])); Content tdClass = HtmlTree.TD(HtmlStyle.colFirst, classContent); HtmlTree tr = HtmlTree.TR(tdClass); if (i%2 == 0) tr.addStyle(HtmlStyle.altColor); else tr.addStyle(HtmlStyle.rowColor); HtmlTree tdClassDescription = new HtmlTree(HtmlTag.TD); tdClassDescription.addStyle(HtmlStyle.colLast); if (Util.isDeprecated(classes[i])) { tdClassDescription.addContent(deprecatedLabel); if (classes[i].tags("deprecated").length > 0) { addSummaryDeprecatedComment(classes[i], classes[i].tags("deprecated")[0], tdClassDescription); } } else addSummaryComment(classes[i], tdClassDescription); tr.addContent(tdClassDescription); tbody.addContent(tr); } table.addContent(tbody); Content li = HtmlTree.LI(HtmlStyle.blockList, table); summaryContentTree.addContent(li); } } /** * Generates the HTML document tree and prints it out. * * @param metakeywords Array of String keywords for META tag. Each element * of the array is assigned to a separate META tag. * Pass in null for no array * @param includeScript true if printing windowtitle script * false for files that appear in the left-hand frames * @param body the body htmltree to be included in the document */ public void printHtmlDocument(String[] metakeywords, boolean includeScript, Content body) throws IOException { Content htmlDocType = DocType.TRANSITIONAL; Content htmlComment = new Comment(configuration.getText("doclet.New_Page")); Content head = new HtmlTree(HtmlTag.HEAD); if (!configuration.notimestamp) { Content headComment = new Comment(getGeneratedByString()); head.addContent(headComment); } if (configuration.charset.length() > 0) { Content meta = HtmlTree.META("Content-Type", "text/html", configuration.charset); head.addContent(meta); } head.addContent(getTitle()); if (!configuration.notimestamp) { SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); Content meta = HtmlTree.META("date", dateFormat.format(new Date())); head.addContent(meta); } if (metakeywords != null) { for (int i=0; i < metakeywords.length; i++) { Content meta = HtmlTree.META("keywords", metakeywords[i]); head.addContent(meta); } } head.addContent(getStyleSheetProperties()); head.addContent(getScriptProperties()); Content htmlTree = HtmlTree.HTML(configuration.getLocale().getLanguage(), head, body); Content htmlDocument = new HtmlDocument(htmlDocType, htmlComment, htmlTree); write(htmlDocument); } /** * Get the window title. * * @param title the title string to construct the complete window title * @return the window title string */ public String getWindowTitle(String title) { if (configuration.windowtitle.length() > 0) { title += " (" + configuration.windowtitle + ")"; } return title; } /** * Get user specified header and the footer. * * @param header if true print the user provided header else print the * user provided footer. */ public Content getUserHeaderFooter(boolean header) { String content; if (header) { content = replaceDocRootDir(configuration.header); } else { if (configuration.footer.length() != 0) { content = replaceDocRootDir(configuration.footer); } else { content = replaceDocRootDir(configuration.header); } } Content rawContent = new RawHtml(content); Content em = HtmlTree.EM(rawContent); return em; } /** * Adds the user specified top. * * @param body the content tree to which user specified top will be added */ public void addTop(Content body) { Content top = new RawHtml(replaceDocRootDir(configuration.top)); body.addContent(top); } /** * Adds the user specified bottom. * * @param body the content tree to which user specified bottom will be added */ public void addBottom(Content body) { Content bottom = new RawHtml(replaceDocRootDir(configuration.bottom)); Content small = HtmlTree.SMALL(bottom); Content p = HtmlTree.P(HtmlStyle.legalCopy, small); body.addContent(p); } /** * Adds the navigation bar for the Html page at the top and and the bottom. * * @param header If true print navigation bar at the top of the page else * @param body the HtmlTree to which the nav links will be added */ protected void addNavLinks(boolean header, Content body) { if (!configuration.nonavbar) { String allClassesId = "allclasses_"; HtmlTree navDiv = new HtmlTree(HtmlTag.DIV); if (header) { body.addContent(HtmlConstants.START_OF_TOP_NAVBAR); navDiv.addStyle(HtmlStyle.topNav); allClassesId += "navbar_top"; Content a = getMarkerAnchor("navbar_top"); navDiv.addContent(a); Content skipLinkContent = getHyperLink(DocLink.fragment("skip-navbar_top"), HtmlTree.EMPTY, configuration.getText("doclet.Skip_navigation_links"), ""); navDiv.addContent(skipLinkContent); } else { body.addContent(HtmlConstants.START_OF_BOTTOM_NAVBAR); navDiv.addStyle(HtmlStyle.bottomNav); allClassesId += "navbar_bottom"; Content a = getMarkerAnchor("navbar_bottom"); navDiv.addContent(a); Content skipLinkContent = getHyperLink(DocLink.fragment("skip-navbar_bottom"), HtmlTree.EMPTY, configuration.getText("doclet.Skip_navigation_links"), ""); navDiv.addContent(skipLinkContent); } if (header) { navDiv.addContent(getMarkerAnchor("navbar_top_firstrow")); } else { navDiv.addContent(getMarkerAnchor("navbar_bottom_firstrow")); } HtmlTree navList = new HtmlTree(HtmlTag.UL); navList.addStyle(HtmlStyle.navList); navList.addAttr(HtmlAttr.TITLE, configuration.getText("doclet.Navigation")); if (configuration.createoverview) { navList.addContent(getNavLinkContents()); } if (configuration.packages.length == 1) { navList.addContent(getNavLinkPackage(configuration.packages[0])); } else if (configuration.packages.length > 1) { navList.addContent(getNavLinkPackage()); } navList.addContent(getNavLinkClass()); if(configuration.classuse) { navList.addContent(getNavLinkClassUse()); } if(configuration.createtree) { navList.addContent(getNavLinkTree()); } if(!(configuration.nodeprecated || configuration.nodeprecatedlist)) { navList.addContent(getNavLinkDeprecated()); } if(configuration.createindex) { navList.addContent(getNavLinkIndex()); } if (!configuration.nohelp) { navList.addContent(getNavLinkHelp()); } navDiv.addContent(navList); Content aboutDiv = HtmlTree.DIV(HtmlStyle.aboutLanguage, getUserHeaderFooter(header)); navDiv.addContent(aboutDiv); body.addContent(navDiv); Content ulNav = HtmlTree.UL(HtmlStyle.navList, getNavLinkPrevious()); ulNav.addContent(getNavLinkNext()); Content subDiv = HtmlTree.DIV(HtmlStyle.subNav, ulNav); Content ulFrames = HtmlTree.UL(HtmlStyle.navList, getNavShowLists()); ulFrames.addContent(getNavHideLists(filename)); subDiv.addContent(ulFrames); HtmlTree ulAllClasses = HtmlTree.UL(HtmlStyle.navList, getNavLinkClassIndex()); ulAllClasses.addAttr(HtmlAttr.ID, allClassesId.toString()); subDiv.addContent(ulAllClasses); subDiv.addContent(getAllClassesLinkScript(allClassesId.toString())); addSummaryDetailLinks(subDiv); if (header) { subDiv.addContent(getMarkerAnchor("skip-navbar_top")); body.addContent(subDiv); body.addContent(HtmlConstants.END_OF_TOP_NAVBAR); } else { subDiv.addContent(getMarkerAnchor("skip-navbar_bottom")); body.addContent(subDiv); body.addContent(HtmlConstants.END_OF_BOTTOM_NAVBAR); } } } /** * Get the word "NEXT" to indicate that no link is available. Override * this method to customize next link. * * @return a content tree for the link */ protected Content getNavLinkNext() { return getNavLinkNext(null); } /** * Get the word "PREV" to indicate that no link is available. Override * this method to customize prev link. * * @return a content tree for the link */ protected Content getNavLinkPrevious() { return getNavLinkPrevious(null); } /** * Do nothing. This is the default method. */ protected void addSummaryDetailLinks(Content navDiv) { } /** * Get link to the "overview-summary.html" page. * * @return a content tree for the link */ protected Content getNavLinkContents() { Content linkContent = getHyperLink(pathToRoot.resolve(DocPaths.OVERVIEW_SUMMARY), overviewLabel, "", ""); Content li = HtmlTree.LI(linkContent); return li; } /** * Get link to the "package-summary.html" page for the package passed. * * @param pkg Package to which link will be generated * @return a content tree for the link */ protected Content getNavLinkPackage(PackageDoc pkg) { Content linkContent = getPackageLink(pkg, packageLabel); Content li = HtmlTree.LI(linkContent); return li; } /** * Get the word "Package" , to indicate that link is not available here. * * @return a content tree for the link */ protected Content getNavLinkPackage() { Content li = HtmlTree.LI(packageLabel); return li; } /** * Get the word "Use", to indicate that link is not available. * * @return a content tree for the link */ protected Content getNavLinkClassUse() { Content li = HtmlTree.LI(useLabel); return li; } /** * Get link for previous file. * * @param prev File name for the prev link * @return a content tree for the link */ public Content getNavLinkPrevious(DocPath prev) { Content li; if (prev != null) { li = HtmlTree.LI(getHyperLink(prev, prevLabel, "", "")); } else li = HtmlTree.LI(prevLabel); return li; } /** * Get link for next file. If next is null, just print the label * without linking it anywhere. * * @param next File name for the next link * @return a content tree for the link */ public Content getNavLinkNext(DocPath next) { Content li; if (next != null) { li = HtmlTree.LI(getHyperLink(next, nextLabel, "", "")); } else li = HtmlTree.LI(nextLabel); return li; } /** * Get "FRAMES" link, to switch to the frame version of the output. * * @param link File to be linked, "index.html" * @return a content tree for the link */ protected Content getNavShowLists(DocPath link) { DocLink dl = new DocLink(link, path.getPath(), null); Content framesContent = getHyperLink(dl, framesLabel, "", "_top"); Content li = HtmlTree.LI(framesContent); return li; } /** * Get "FRAMES" link, to switch to the frame version of the output. * * @return a content tree for the link */ protected Content getNavShowLists() { return getNavShowLists(pathToRoot.resolve(DocPaths.INDEX)); } /** * Get "NO FRAMES" link, to switch to the non-frame version of the output. * * @param link File to be linked * @return a content tree for the link */ protected Content getNavHideLists(DocPath link) { Content noFramesContent = getHyperLink(link, noframesLabel, "", "_top"); Content li = HtmlTree.LI(noFramesContent); return li; } /** * Get "Tree" link in the navigation bar. If there is only one package * specified on the command line, then the "Tree" link will be to the * only "package-tree.html" file otherwise it will be to the * "overview-tree.html" file. * * @return a content tree for the link */ protected Content getNavLinkTree() { Content treeLinkContent; PackageDoc[] packages = configuration.root.specifiedPackages(); if (packages.length == 1 && configuration.root.specifiedClasses().length == 0) { treeLinkContent = getHyperLink(pathString(packages[0], DocPaths.PACKAGE_TREE), treeLabel, "", ""); } else { treeLinkContent = getHyperLink(pathToRoot.resolve(DocPaths.OVERVIEW_TREE), treeLabel, "", ""); } Content li = HtmlTree.LI(treeLinkContent); return li; } /** * Get the overview tree link for the main tree. * * @param label the label for the link * @return a content tree for the link */ protected Content getNavLinkMainTree(String label) { Content mainTreeContent = getHyperLink(pathToRoot.resolve(DocPaths.OVERVIEW_TREE), new StringContent(label)); Content li = HtmlTree.LI(mainTreeContent); return li; } /** * Get the word "Class", to indicate that class link is not available. * * @return a content tree for the link */ protected Content getNavLinkClass() { Content li = HtmlTree.LI(classLabel); return li; } /** * Get "Deprecated" API link in the navigation bar. * * @return a content tree for the link */ protected Content getNavLinkDeprecated() { Content linkContent = getHyperLink(pathToRoot.resolve(DocPaths.DEPRECATED_LIST), deprecatedLabel, "", ""); Content li = HtmlTree.LI(linkContent); return li; } /** * Get link for generated index. If the user has used "-splitindex" * command line option, then link to file "index-files/index-1.html" is * generated otherwise link to file "index-all.html" is generated. * * @return a content tree for the link */ protected Content getNavLinkClassIndex() { Content allClassesContent = getHyperLink(pathToRoot.resolve( DocPaths.ALLCLASSES_NOFRAME), allclassesLabel, "", ""); Content li = HtmlTree.LI(allClassesContent); return li; } /** * Get link for generated class index. * * @return a content tree for the link */ protected Content getNavLinkIndex() { Content linkContent = getHyperLink(pathToRoot.resolve( (configuration.splitindex ? DocPaths.INDEX_FILES.resolve(DocPaths.indexN(1)) : DocPaths.INDEX_ALL)), indexLabel, "", ""); Content li = HtmlTree.LI(linkContent); return li; } /** * Get help file link. If user has provided a help file, then generate a * link to the user given file, which is already copied to current or * destination directory. * * @return a content tree for the link */ protected Content getNavLinkHelp() { String helpfile = configuration.helpfile; DocPath helpfilenm; if (helpfile.isEmpty()) { helpfilenm = DocPaths.HELP_DOC; } else { DocFile file = DocFile.createFileForInput(configuration, helpfile); helpfilenm = DocPath.create(file.getName()); } Content linkContent = getHyperLink(pathToRoot.resolve(helpfilenm), helpLabel, "", ""); Content li = HtmlTree.LI(linkContent); return li; } /** * Get summary table header. * * @param header the header for the table * @param scope the scope of the headers * @return a content tree for the header */ public Content getSummaryTableHeader(String[] header, String scope) { Content tr = new HtmlTree(HtmlTag.TR); int size = header.length; Content tableHeader; if (size == 1) { tableHeader = new StringContent(header[0]); tr.addContent(HtmlTree.TH(HtmlStyle.colOne, scope, tableHeader)); return tr; } for (int i = 0; i < size; i++) { tableHeader = new StringContent(header[i]); if(i == 0) tr.addContent(HtmlTree.TH(HtmlStyle.colFirst, scope, tableHeader)); else if(i == (size - 1)) tr.addContent(HtmlTree.TH(HtmlStyle.colLast, scope, tableHeader)); else tr.addContent(HtmlTree.TH(scope, tableHeader)); } return tr; } /** * Get table caption. * * @param rawText the caption for the table which could be raw Html * @return a content tree for the caption */ public Content getTableCaption(Content title) { Content captionSpan = HtmlTree.SPAN(title); Content space = getSpace(); Content tabSpan = HtmlTree.SPAN(HtmlStyle.tabEnd, space); Content caption = HtmlTree.CAPTION(captionSpan); caption.addContent(tabSpan); return caption; } /** * Get the marker anchor which will be added to the documentation tree. * * @param anchorName the anchor name attribute * @return a content tree for the marker anchor */ public Content getMarkerAnchor(String anchorName) { return getMarkerAnchor(anchorName, null); } /** * Get the marker anchor which will be added to the documentation tree. * * @param anchorName the anchor name attribute * @param anchorContent the content that should be added to the anchor * @return a content tree for the marker anchor */ public Content getMarkerAnchor(String anchorName, Content anchorContent) { if (anchorContent == null) anchorContent = new Comment(" "); Content markerAnchor = HtmlTree.A_NAME(anchorName, anchorContent); return markerAnchor; } /** * Returns a packagename content. * * @param packageDoc the package to check * @return package name content */ public Content getPackageName(PackageDoc packageDoc) { return packageDoc == null || packageDoc.name().length() == 0 ? defaultPackageLabel : getPackageLabel(packageDoc.name()); } /** * Returns a package name label. * * @param packageName the package name * @return the package name content */ public Content getPackageLabel(String packageName) { return new StringContent(packageName); } /** * Add package deprecation information to the documentation tree * * @param deprPkgs list of deprecated packages * @param headingKey the caption for the deprecated package table * @param tableSummary the summary for the deprecated package table * @param tableHeader table headers for the deprecated package table * @param contentTree the content tree to which the deprecated package table will be added */ protected void addPackageDeprecatedAPI(List deprPkgs, String headingKey, String tableSummary, String[] tableHeader, Content contentTree) { if (deprPkgs.size() > 0) { Content table = HtmlTree.TABLE(0, 3, 0, tableSummary, getTableCaption(configuration.getResource(headingKey))); table.addContent(getSummaryTableHeader(tableHeader, "col")); Content tbody = new HtmlTree(HtmlTag.TBODY); for (int i = 0; i < deprPkgs.size(); i++) { PackageDoc pkg = (PackageDoc) deprPkgs.get(i); HtmlTree td = HtmlTree.TD(HtmlStyle.colOne, getPackageLink(pkg, getPackageName(pkg))); if (pkg.tags("deprecated").length > 0) { addInlineDeprecatedComment(pkg, pkg.tags("deprecated")[0], td); } HtmlTree tr = HtmlTree.TR(td); if (i % 2 == 0) { tr.addStyle(HtmlStyle.altColor); } else { tr.addStyle(HtmlStyle.rowColor); } tbody.addContent(tr); } table.addContent(tbody); Content li = HtmlTree.LI(HtmlStyle.blockList, table); Content ul = HtmlTree.UL(HtmlStyle.blockList, li); contentTree.addContent(ul); } } /** * Return the path to the class page for a classdoc. * * @param cd Class to which the path is requested. * @param name Name of the file(doesn't include path). */ protected DocPath pathString(ClassDoc cd, DocPath name) { return pathString(cd.containingPackage(), name); } /** * Return path to the given file name in the given package. So if the name * passed is "Object.html" and the name of the package is "java.lang", and * if the relative path is "../.." then returned string will be * "../../java/lang/Object.html" * * @param pd Package in which the file name is assumed to be. * @param name File name, to which path string is. */ protected DocPath pathString(PackageDoc pd, DocPath name) { return pathToRoot.resolve(DocPath.forPackage(pd).resolve(name)); } /** * Return the link to the given package. * * @param pkg the package to link to. * @param label the label for the link. * @return a content tree for the package link. */ public Content getPackageLink(PackageDoc pkg, String label) { return getPackageLink(pkg, new StringContent(label)); } /** * Return the link to the given package. * * @param pkg the package to link to. * @param label the label for the link. * @return a content tree for the package link. */ public Content getPackageLink(PackageDoc pkg, Content label) { boolean included = pkg != null && pkg.isIncluded(); if (! included) { PackageDoc[] packages = configuration.packages; for (int i = 0; i < packages.length; i++) { if (packages[i].equals(pkg)) { included = true; break; } } } if (included || pkg == null) { return getHyperLink(pathString(pkg, DocPaths.PACKAGE_SUMMARY), label); } else { DocLink crossPkgLink = getCrossPackageLink(Util.getPackageName(pkg)); if (crossPkgLink != null) { return getHyperLink(crossPkgLink, label); } else { return label; } } } public Content italicsClassName(ClassDoc cd, boolean qual) { Content name = new StringContent((qual)? cd.qualifiedName(): cd.name()); return (cd.isInterface())? HtmlTree.I(name): name; } /** * Add the link to the content tree. * * @param doc program element doc for which the link will be added * @param label label for the link * @param htmltree the content tree to which the link will be added */ public void addSrcLink(ProgramElementDoc doc, Content label, Content htmltree) { if (doc == null) { return; } ClassDoc cd = doc.containingClass(); if (cd == null) { //d must be a class doc since in has no containing class. cd = (ClassDoc) doc; } DocPath href = pathToRoot .resolve(DocPaths.SOURCE_OUTPUT) .resolve(DocPath.forClass(cd)); Content linkContent = getHyperLink(href.fragment(SourceToHTMLConverter.getAnchorName(doc)), label, "", ""); htmltree.addContent(linkContent); } /** * Return the link to the given class. * * @param linkInfo the information about the link. * * @return the link for the given class. */ public Content getLink(LinkInfoImpl linkInfo) { LinkFactoryImpl factory = new LinkFactoryImpl(this); return factory.getLink(linkInfo); } /** * Return the type parameters for the given class. * * @param linkInfo the information about the link. * @return the type for the given class. */ public Content getTypeParameterLinks(LinkInfoImpl linkInfo) { LinkFactoryImpl factory = new LinkFactoryImpl(this); return factory.getTypeParameterLinks(linkInfo, false); } /************************************************************* * Return a class cross link to external class documentation. * The name must be fully qualified to determine which package * the class is in. The -link option does not allow users to * link to external classes in the "default" package. * * @param qualifiedClassName the qualified name of the external class. * @param refMemName the name of the member being referenced. This should * be null or empty string if no member is being referenced. * @param label the label for the external link. * @param strong true if the link should be strong. * @param style the style of the link. * @param code true if the label should be code font. */ public Content getCrossClassLink(String qualifiedClassName, String refMemName, Content label, boolean strong, String style, boolean code) { String className = ""; String packageName = qualifiedClassName == null ? "" : qualifiedClassName; int periodIndex; while ((periodIndex = packageName.lastIndexOf('.')) != -1) { className = packageName.substring(periodIndex + 1, packageName.length()) + (className.length() > 0 ? "." + className : ""); Content defaultLabel = new StringContent(className); if (code) defaultLabel = HtmlTree.CODE(defaultLabel); packageName = packageName.substring(0, periodIndex); if (getCrossPackageLink(packageName) != null) { //The package exists in external documentation, so link to the external //class (assuming that it exists). This is definitely a limitation of //the -link option. There are ways to determine if an external package //exists, but no way to determine if the external class exists. We just //have to assume that it does. DocLink link = configuration.extern.getExternalLink(packageName, pathToRoot, className + ".html", refMemName); return getHyperLink(link, (label == null) || label.isEmpty() ? defaultLabel : label, strong, style, configuration.getText("doclet.Href_Class_Or_Interface_Title", packageName), ""); } } return null; } public boolean isClassLinkable(ClassDoc cd) { if (cd.isIncluded()) { return configuration.isGeneratedDoc(cd); } return configuration.extern.isExternal(cd); } public DocLink getCrossPackageLink(String pkgName) { return configuration.extern.getExternalLink(pkgName, pathToRoot, DocPaths.PACKAGE_SUMMARY.getPath()); } /** * Get the class link. * * @param context the id of the context where the link will be added * @param cd the class doc to link to * @return a content tree for the link */ public Content getQualifiedClassLink(LinkInfoImpl.Kind context, ClassDoc cd) { return getLink(new LinkInfoImpl(configuration, context, cd) .label(configuration.getClassName(cd))); } /** * Add the class link. * * @param context the id of the context where the link will be added * @param cd the class doc to link to * @param contentTree the content tree to which the link will be added */ public void addPreQualifiedClassLink(LinkInfoImpl.Kind context, ClassDoc cd, Content contentTree) { addPreQualifiedClassLink(context, cd, false, contentTree); } /** * Retrieve the class link with the package portion of the label in * plain text. If the qualifier is excluded, it will not be included in the * link label. * * @param cd the class to link to. * @param isStrong true if the link should be strong. * @return the link with the package portion of the label in plain text. */ public Content getPreQualifiedClassLink(LinkInfoImpl.Kind context, ClassDoc cd, boolean isStrong) { ContentBuilder classlink = new ContentBuilder(); PackageDoc pd = cd.containingPackage(); if (pd != null && ! configuration.shouldExcludeQualifier(pd.name())) { classlink.addContent(getPkgName(cd)); } classlink.addContent(getLink(new LinkInfoImpl(configuration, context, cd).label(cd.name()).strong(isStrong))); return classlink; } /** * Add the class link with the package portion of the label in * plain text. If the qualifier is excluded, it will not be included in the * link label. * * @param context the id of the context where the link will be added * @param cd the class to link to * @param isStrong true if the link should be strong * @param contentTree the content tree to which the link with be added */ public void addPreQualifiedClassLink(LinkInfoImpl.Kind context, ClassDoc cd, boolean isStrong, Content contentTree) { PackageDoc pd = cd.containingPackage(); if(pd != null && ! configuration.shouldExcludeQualifier(pd.name())) { contentTree.addContent(getPkgName(cd)); } contentTree.addContent(getLink(new LinkInfoImpl(configuration, context, cd).label(cd.name()).strong(isStrong))); } /** * Add the class link, with only class name as the strong link and prefixing * plain package name. * * @param context the id of the context where the link will be added * @param cd the class to link to * @param contentTree the content tree to which the link with be added */ public void addPreQualifiedStrongClassLink(LinkInfoImpl.Kind context, ClassDoc cd, Content contentTree) { addPreQualifiedClassLink(context, cd, true, contentTree); } /** * Get the link for the given member. * * @param context the id of the context where the link will be added * @param doc the member being linked to * @param label the label for the link * @return a content tree for the doc link */ public Content getDocLink(LinkInfoImpl.Kind context, MemberDoc doc, String label) { return getDocLink(context, doc.containingClass(), doc, new StringContent(label)); } /** * Return the link for the given member. * * @param context the id of the context where the link will be printed. * @param doc the member being linked to. * @param label the label for the link. * @param strong true if the link should be strong. * @return the link for the given member. */ public Content getDocLink(LinkInfoImpl.Kind context, MemberDoc doc, String label, boolean strong) { return getDocLink(context, doc.containingClass(), doc, label, strong); } /** * Return the link for the given member. * * @param context the id of the context where the link will be printed. * @param classDoc the classDoc that we should link to. This is not * necessarily equal to doc.containingClass(). We may be * inheriting comments. * @param doc the member being linked to. * @param label the label for the link. * @param strong true if the link should be strong. * @return the link for the given member. */ public Content getDocLink(LinkInfoImpl.Kind context, ClassDoc classDoc, MemberDoc doc, String label, boolean strong) { return getDocLink(context, classDoc, doc, label, strong, false); } public Content getDocLink(LinkInfoImpl.Kind context, ClassDoc classDoc, MemberDoc doc, Content label, boolean strong) { return getDocLink(context, classDoc, doc, label, strong, false); } /** * Return the link for the given member. * * @param context the id of the context where the link will be printed. * @param classDoc the classDoc that we should link to. This is not * necessarily equal to doc.containingClass(). We may be * inheriting comments. * @param doc the member being linked to. * @param label the label for the link. * @param strong true if the link should be strong. * @param isProperty true if the doc parameter is a JavaFX property. * @return the link for the given member. */ public Content getDocLink(LinkInfoImpl.Kind context, ClassDoc classDoc, MemberDoc doc, String label, boolean strong, boolean isProperty) { return getDocLink(context, classDoc, doc, new StringContent(check(label)), strong, isProperty); } String check(String s) { if (s.matches(".*[&<>].*"))throw new IllegalArgumentException(s); return s; } public Content getDocLink(LinkInfoImpl.Kind context, ClassDoc classDoc, MemberDoc doc, Content label, boolean strong, boolean isProperty) { if (! (doc.isIncluded() || Util.isLinkable(classDoc, configuration))) { return label; } else if (doc instanceof ExecutableMemberDoc) { ExecutableMemberDoc emd = (ExecutableMemberDoc)doc; return getLink(new LinkInfoImpl(configuration, context, classDoc) .label(label).where(getAnchor(emd, isProperty)).strong(strong)); } else if (doc instanceof MemberDoc) { return getLink(new LinkInfoImpl(configuration, context, classDoc) .label(label).where(doc.name()).strong(strong)); } else { return label; } } /** * Return the link for the given member. * * @param context the id of the context where the link will be added * @param classDoc the classDoc that we should link to. This is not * necessarily equal to doc.containingClass(). We may be * inheriting comments * @param doc the member being linked to * @param label the label for the link * @return the link for the given member */ public Content getDocLink(LinkInfoImpl.Kind context, ClassDoc classDoc, MemberDoc doc, Content label) { if (! (doc.isIncluded() || Util.isLinkable(classDoc, configuration))) { return label; } else if (doc instanceof ExecutableMemberDoc) { ExecutableMemberDoc emd = (ExecutableMemberDoc) doc; return getLink(new LinkInfoImpl(configuration, context, classDoc) .label(label).where(getAnchor(emd))); } else if (doc instanceof MemberDoc) { return getLink(new LinkInfoImpl(configuration, context, classDoc) .label(label).where(doc.name())); } else { return label; } } public String getAnchor(ExecutableMemberDoc emd) { return getAnchor(emd, false); } public String getAnchor(ExecutableMemberDoc emd, boolean isProperty) { if (isProperty) { return emd.name(); } StringBuilder signature = new StringBuilder(emd.signature()); StringBuilder signatureParsed = new StringBuilder(); int counter = 0; for (int i = 0; i < signature.length(); i++) { char c = signature.charAt(i); if (c == '<') { counter++; } else if (c == '>') { counter--; } else if (counter == 0) { signatureParsed.append(c); } } return emd.name() + signatureParsed.toString(); } public Content seeTagToContent(SeeTag see) { String tagName = see.name(); if (! (tagName.startsWith("@link") || tagName.equals("@see"))) { return new ContentBuilder(); } String seetext = replaceDocRootDir(see.text()); //Check if @see is an href or "string" if (seetext.startsWith("<") || seetext.startsWith("\"")) { return new RawHtml(seetext); } boolean plain = tagName.equalsIgnoreCase("@linkplain"); Content label = plainOrCode(plain, new RawHtml(see.label())); //The text from the @see tag. We will output this text when a label is not specified. Content text = plainOrCode(plain, new RawHtml(seetext)); ClassDoc refClass = see.referencedClass(); String refClassName = see.referencedClassName(); MemberDoc refMem = see.referencedMember(); String refMemName = see.referencedMemberName(); if (refClass == null) { //@see is not referencing an included class PackageDoc refPackage = see.referencedPackage(); if (refPackage != null && refPackage.isIncluded()) { //@see is referencing an included package if (label.isEmpty()) label = plainOrCode(plain, new StringContent(refPackage.name())); return getPackageLink(refPackage, label); } else { //@see is not referencing an included class or package. Check for cross links. Content classCrossLink; DocLink packageCrossLink = getCrossPackageLink(refClassName); if (packageCrossLink != null) { //Package cross link found return getHyperLink(packageCrossLink, (label.isEmpty() ? text : label)); } else if ((classCrossLink = getCrossClassLink(refClassName, refMemName, label, false, "", !plain)) != null) { //Class cross link found (possibly to a member in the class) return classCrossLink; } else { //No cross link found so print warning configuration.getDocletSpecificMsg().warning(see.position(), "doclet.see.class_or_package_not_found", tagName, seetext); return (label.isEmpty() ? text: label); } } } else if (refMemName == null) { // Must be a class reference since refClass is not null and refMemName is null. if (label.isEmpty()) { label = plainOrCode(plain, new StringContent(refClass.name())); } return getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.DEFAULT, refClass) .label(label)); } else if (refMem == null) { // Must be a member reference since refClass is not null and refMemName is not null. // However, refMem is null, so this referenced member does not exist. return (label.isEmpty() ? text: label); } else { // Must be a member reference since refClass is not null and refMemName is not null. // refMem is not null, so this @see tag must be referencing a valid member. ClassDoc containing = refMem.containingClass(); if (see.text().trim().startsWith("#") && ! (containing.isPublic() || Util.isLinkable(containing, configuration))) { // Since the link is relative and the holder is not even being // documented, this must be an inherited link. Redirect it. // The current class either overrides the referenced member or // inherits it automatically. if (this instanceof ClassWriterImpl) { containing = ((ClassWriterImpl) this).getClassDoc(); } else if (!containing.isPublic()){ configuration.getDocletSpecificMsg().warning( see.position(), "doclet.see.class_or_package_not_accessible", tagName, containing.qualifiedName()); } else { configuration.getDocletSpecificMsg().warning( see.position(), "doclet.see.class_or_package_not_found", tagName, seetext); } } if (configuration.currentcd != containing) { refMemName = containing.name() + "." + refMemName; } if (refMem instanceof ExecutableMemberDoc) { if (refMemName.indexOf('(') < 0) { refMemName += ((ExecutableMemberDoc)refMem).signature(); } } text = plainOrCode(plain, new StringContent(refMemName)); return getDocLink(LinkInfoImpl.Kind.SEE_TAG, containing, refMem, (label.isEmpty() ? text: label), false); } } private Content plainOrCode(boolean plain, Content body) { return (plain || body.isEmpty()) ? body : HtmlTree.CODE(body); } /** * Add the inline comment. * * @param doc the doc for which the inline comment will be added * @param tag the inline tag to be added * @param htmltree the content tree to which the comment will be added */ public void addInlineComment(Doc doc, Tag tag, Content htmltree) { addCommentTags(doc, tag, tag.inlineTags(), false, false, htmltree); } /** * Add the inline deprecated comment. * * @param doc the doc for which the inline deprecated comment will be added * @param tag the inline tag to be added * @param htmltree the content tree to which the comment will be added */ public void addInlineDeprecatedComment(Doc doc, Tag tag, Content htmltree) { addCommentTags(doc, tag.inlineTags(), true, false, htmltree); } /** * Adds the summary content. * * @param doc the doc for which the summary will be generated * @param htmltree the documentation tree to which the summary will be added */ public void addSummaryComment(Doc doc, Content htmltree) { addSummaryComment(doc, doc.firstSentenceTags(), htmltree); } /** * Adds the summary content. * * @param doc the doc for which the summary will be generated * @param firstSentenceTags the first sentence tags for the doc * @param htmltree the documentation tree to which the summary will be added */ public void addSummaryComment(Doc doc, Tag[] firstSentenceTags, Content htmltree) { addCommentTags(doc, firstSentenceTags, false, true, htmltree); } public void addSummaryDeprecatedComment(Doc doc, Tag tag, Content htmltree) { addCommentTags(doc, tag.firstSentenceTags(), true, true, htmltree); } /** * Adds the inline comment. * * @param doc the doc for which the inline comments will be generated * @param htmltree the documentation tree to which the inline comments will be added */ public void addInlineComment(Doc doc, Content htmltree) { addCommentTags(doc, doc.inlineTags(), false, false, htmltree); } /** * Adds the comment tags. * * @param doc the doc for which the comment tags will be generated * @param tags the first sentence tags for the doc * @param depr true if it is deprecated * @param first true if the first sentence tags should be added * @param htmltree the documentation tree to which the comment tags will be added */ private void addCommentTags(Doc doc, Tag[] tags, boolean depr, boolean first, Content htmltree) { addCommentTags(doc, null, tags, depr, first, htmltree); } /** * Adds the comment tags. * * @param doc the doc for which the comment tags will be generated * @param holderTag the block tag context for the inline tags * @param tags the first sentence tags for the doc * @param depr true if it is deprecated * @param first true if the first sentence tags should be added * @param htmltree the documentation tree to which the comment tags will be added */ private void addCommentTags(Doc doc, Tag holderTag, Tag[] tags, boolean depr, boolean first, Content htmltree) { if(configuration.nocomment){ return; } Content div; Content result = commentTagsToContent(null, doc, tags, first); if (depr) { Content italic = HtmlTree.I(result); div = HtmlTree.DIV(HtmlStyle.block, italic); htmltree.addContent(div); } else { div = HtmlTree.DIV(HtmlStyle.block, result); htmltree.addContent(div); } if (tags.length == 0) { htmltree.addContent(getSpace()); } } /** * Converts inline tags and text to text strings, expanding the * inline tags along the way. Called wherever text can contain * an inline tag, such as in comments or in free-form text arguments * to non-inline tags. * * @param holderTag specific tag where comment resides * @param doc specific doc where comment resides * @param tags array of text tags and inline tags (often alternating) * present in the text of interest for this doc * @param isFirstSentence true if text is first sentence */ public Content commentTagsToContent(Tag holderTag, Doc doc, Tag[] tags, boolean isFirstSentence) { Content result = new ContentBuilder(); boolean textTagChange = false; // Array of all possible inline tags for this javadoc run configuration.tagletManager.checkTags(doc, tags, true); for (int i = 0; i < tags.length; i++) { Tag tagelem = tags[i]; String tagName = tagelem.name(); if (tagelem instanceof SeeTag) { result.addContent(seeTagToContent((SeeTag) tagelem)); } else if (! tagName.equals("Text")) { boolean wasEmpty = result.isEmpty(); Content output = TagletWriter.getInlineTagOuput( configuration.tagletManager, holderTag, tagelem, getTagletWriterInstance(isFirstSentence)); if (output != null) result.addContent(output); if (wasEmpty && isFirstSentence && tagelem.name().equals("@inheritDoc") && !result.isEmpty()) { break; } else if (configuration.docrootparent.length() > 0 && tagelem.name().equals("@docRoot") && ((tags[i + 1]).text()).startsWith("/..")) { //If Xdocrootparent switch ON, set the flag to remove the /.. occurance after //{@docRoot} tag in the very next Text tag. textTagChange = true; continue; } else { continue; } } else { String text = tagelem.text(); //If Xdocrootparent switch ON, remove the /.. occurance after {@docRoot} tag. if (textTagChange) { text = text.replaceFirst("/..", ""); textTagChange = false; } //This is just a regular text tag. The text may contain html links () //or inline tag {@docRoot}, which will be handled as special cases. text = redirectRelativeLinks(tagelem.holder(), text); // Replace @docRoot only if not represented by an instance of DocRootTaglet, // that is, only if it was not present in a source file doc comment. // This happens when inserted by the doclet (a few lines // above in this method). [It might also happen when passed in on the command // line as a text argument to an option (like -header).] text = replaceDocRootDir(text); if (isFirstSentence) { text = removeNonInlineHtmlTags(text); } text = Util.replaceTabs(configuration, text); result.addContent(new RawHtml(text)); } } return result; } /** * Return true if relative links should not be redirected. * * @return Return true if a relative link should not be redirected. */ private boolean shouldNotRedirectRelativeLinks() { return this instanceof AnnotationTypeWriter || this instanceof ClassWriter || this instanceof PackageSummaryWriter; } /** * Suppose a piece of documentation has a relative link. When you copy * that documentation to another place such as the index or class-use page, * that relative link will no longer work. We should redirect those links * so that they will work again. *

* Here is the algorithm used to fix the link: *

* {@literal => docRoot + + } *

* For example, suppose com.sun.javadoc.RootDoc has this link: * {@literal The package Page } *

* If this link appeared in the index, we would redirect * the link like this: * * {@literal The package Page} * * @param doc the Doc object whose documentation is being written. * @param text the text being written. * * @return the text, with all the relative links redirected to work. */ private String redirectRelativeLinks(Doc doc, String text) { if (doc == null || shouldNotRedirectRelativeLinks()) { return text; } DocPath redirectPathFromRoot; if (doc instanceof ClassDoc) { redirectPathFromRoot = DocPath.forPackage(((ClassDoc) doc).containingPackage()); } else if (doc instanceof MemberDoc) { redirectPathFromRoot = DocPath.forPackage(((MemberDoc) doc).containingPackage()); } else if (doc instanceof PackageDoc) { redirectPathFromRoot = DocPath.forPackage((PackageDoc) doc); } else { return text; } //Redirect all relative links. int end, begin = text.toLowerCase().indexOf("= 0){ StringBuilder textBuff = new StringBuilder(text); while(begin >=0){ if (textBuff.length() > begin + 2 && ! Character.isWhitespace(textBuff.charAt(begin+2))) { begin = textBuff.toString().toLowerCase().indexOf("", begin +1); if(begin == 0){ //Link has no equal symbol. configuration.root.printWarning( doc.position(), configuration.getText("doclet.malformed_html_link_tag", text)); break; } if (end == -1) { //Break without warning. This tag is not necessarily malformed. The text //might be missing '>' character because the href has an inline tag. break; } if (textBuff.substring(begin, end).indexOf("\"") != -1){ begin = textBuff.indexOf("\"", begin) + 1; end = textBuff.indexOf("\"", begin +1); if (begin == 0 || end == -1){ //Link is missing a quote. break; } } String relativeLink = textBuff.substring(begin, end); if (!(relativeLink.toLowerCase().startsWith("mailto:") || relativeLink.toLowerCase().startsWith("http:") || relativeLink.toLowerCase().startsWith("https:") || relativeLink.toLowerCase().startsWith("file:"))) { relativeLink = "{@"+(new DocRootTaglet()).getName() + "}/" + redirectPathFromRoot.resolve(relativeLink).getPath(); textBuff.replace(begin, end, relativeLink); } begin = textBuff.toString().toLowerCase().indexOf(" blockTags = new HashSet(); static { for (HtmlTag t: HtmlTag.values()) { if (t.blockType == HtmlTag.BlockType.BLOCK) blockTags.add(t.value); } } public static String removeNonInlineHtmlTags(String text) { final int len = text.length(); int startPos = 0; // start of text to copy int lessThanPos = text.indexOf('<'); // position of latest '<' if (lessThanPos < 0) { return text; } StringBuilder result = new StringBuilder(); main: while (lessThanPos != -1) { int currPos = lessThanPos + 1; if (currPos == len) break; char ch = text.charAt(currPos); if (ch == '/') { if (++currPos == len) break; ch = text.charAt(currPos); } int tagPos = currPos; while (isHtmlTagLetterOrDigit(ch)) { if (++currPos == len) break main; ch = text.charAt(currPos); } if (ch == '>' && blockTags.contains(text.substring(tagPos, currPos).toLowerCase())) { result.append(text, startPos, lessThanPos); startPos = currPos + 1; } lessThanPos = text.indexOf('<', currPos); } result.append(text.substring(startPos)); return result.toString(); } private static boolean isHtmlTagLetterOrDigit(char ch) { return ('a' <= ch && ch <= 'z') || ('A' <= ch && ch <= 'Z') || ('1' <= ch && ch <= '6'); } /** * Returns a link to the stylesheet file. * * @return an HtmlTree for the lINK tag which provides the stylesheet location */ public HtmlTree getStyleSheetProperties() { String stylesheetfile = configuration.stylesheetfile; DocPath stylesheet; if (stylesheetfile.isEmpty()) { stylesheet = DocPaths.STYLESHEET; } else { DocFile file = DocFile.createFileForInput(configuration, stylesheetfile); stylesheet = DocPath.create(file.getName()); } HtmlTree link = HtmlTree.LINK("stylesheet", "text/css", pathToRoot.resolve(stylesheet).getPath(), "Style"); return link; } /** * Returns a link to the JavaScript file. * * @return an HtmlTree for the Script tag which provides the JavaScript location */ public HtmlTree getScriptProperties() { HtmlTree script = HtmlTree.SCRIPT("text/javascript", pathToRoot.resolve(DocPaths.JAVASCRIPT).getPath()); return script; } /** * According to * The Java™ Language Specification, * all the outer classes and static nested classes are core classes. */ public boolean isCoreClass(ClassDoc cd) { return cd.containingClass() == null || cd.isStatic(); } /** * Adds the annotatation types for the given packageDoc. * * @param packageDoc the package to write annotations for. * @param htmltree the documentation tree to which the annotation info will be * added */ public void addAnnotationInfo(PackageDoc packageDoc, Content htmltree) { addAnnotationInfo(packageDoc, packageDoc.annotations(), htmltree); } /** * Add the annotation types of the executable receiver. * * @param method the executable to write the receiver annotations for. * @param descList list of annotation description. * @param htmltree the documentation tree to which the annotation info will be * added */ public void addReceiverAnnotationInfo(ExecutableMemberDoc method, AnnotationDesc[] descList, Content htmltree) { addAnnotationInfo(0, method, descList, false, htmltree); } /** * Adds the annotatation types for the given doc. * * @param doc the package to write annotations for * @param htmltree the content tree to which the annotation types will be added */ public void addAnnotationInfo(ProgramElementDoc doc, Content htmltree) { addAnnotationInfo(doc, doc.annotations(), htmltree); } /** * Add the annotatation types for the given doc and parameter. * * @param indent the number of spaces to indent the parameters. * @param doc the doc to write annotations for. * @param param the parameter to write annotations for. * @param tree the content tree to which the annotation types will be added */ public boolean addAnnotationInfo(int indent, Doc doc, Parameter param, Content tree) { return addAnnotationInfo(indent, doc, param.annotations(), false, tree); } /** * Adds the annotatation types for the given doc. * * @param doc the doc to write annotations for. * @param descList the array of {@link AnnotationDesc}. * @param htmltree the documentation tree to which the annotation info will be * added */ private void addAnnotationInfo(Doc doc, AnnotationDesc[] descList, Content htmltree) { addAnnotationInfo(0, doc, descList, true, htmltree); } /** * Adds the annotation types for the given doc. * * @param indent the number of extra spaces to indent the annotations. * @param doc the doc to write annotations for. * @param descList the array of {@link AnnotationDesc}. * @param htmltree the documentation tree to which the annotation info will be * added */ private boolean addAnnotationInfo(int indent, Doc doc, AnnotationDesc[] descList, boolean lineBreak, Content htmltree) { List annotations = getAnnotations(indent, descList, lineBreak); String sep =""; if (annotations.isEmpty()) { return false; } for (Content annotation: annotations) { htmltree.addContent(sep); htmltree.addContent(annotation); sep = " "; } return true; } /** * Return the string representations of the annotation types for * the given doc. * * @param indent the number of extra spaces to indent the annotations. * @param descList the array of {@link AnnotationDesc}. * @param linkBreak if true, add new line between each member value. * @return an array of strings representing the annotations being * documented. */ private List getAnnotations(int indent, AnnotationDesc[] descList, boolean linkBreak) { return getAnnotations(indent, descList, linkBreak, true); } /** * Return the string representations of the annotation types for * the given doc. * * A {@code null} {@code elementType} indicates that all the * annotations should be returned without any filtering. * * @param indent the number of extra spaces to indent the annotations. * @param descList the array of {@link AnnotationDesc}. * @param linkBreak if true, add new line between each member value. * @param elementType the type of targeted element (used for filtering * type annotations from declaration annotations) * @return an array of strings representing the annotations being * documented. */ public List getAnnotations(int indent, AnnotationDesc[] descList, boolean linkBreak, boolean isJava5DeclarationLocation) { List results = new ArrayList(); ContentBuilder annotation; for (int i = 0; i < descList.length; i++) { AnnotationTypeDoc annotationDoc = descList[i].annotationType(); // If an annotation is not documented, do not add it to the list. If // the annotation is of a repeatable type, and if it is not documented // and also if its container annotation is not documented, do not add it // to the list. If an annotation of a repeatable type is not documented // but its container is documented, it will be added to the list. if (! Util.isDocumentedAnnotation(annotationDoc) && (!isAnnotationDocumented && !isContainerDocumented)) { continue; } /* TODO: check logic here to correctly handle declaration * and type annotations. if (Util.isDeclarationAnnotation(annotationDoc, isJava5DeclarationLocation)) { continue; }*/ annotation = new ContentBuilder(); isAnnotationDocumented = false; LinkInfoImpl linkInfo = new LinkInfoImpl(configuration, LinkInfoImpl.Kind.ANNOTATION, annotationDoc); AnnotationDesc.ElementValuePair[] pairs = descList[i].elementValues(); // If the annotation is synthesized, do not print the container. if (descList[i].isSynthesized()) { for (int j = 0; j < pairs.length; j++) { AnnotationValue annotationValue = pairs[j].value(); List annotationTypeValues = new ArrayList(); if (annotationValue.value() instanceof AnnotationValue[]) { AnnotationValue[] annotationArray = (AnnotationValue[]) annotationValue.value(); annotationTypeValues.addAll(Arrays.asList(annotationArray)); } else { annotationTypeValues.add(annotationValue); } String sep = ""; for (AnnotationValue av : annotationTypeValues) { annotation.addContent(sep); annotation.addContent(annotationValueToContent(av)); sep = " "; } } } else if (isAnnotationArray(pairs)) { // If the container has 1 or more value defined and if the // repeatable type annotation is not documented, do not print // the container. if (pairs.length == 1 && isAnnotationDocumented) { AnnotationValue[] annotationArray = (AnnotationValue[]) (pairs[0].value()).value(); List annotationTypeValues = new ArrayList(); annotationTypeValues.addAll(Arrays.asList(annotationArray)); String sep = ""; for (AnnotationValue av : annotationTypeValues) { annotation.addContent(sep); annotation.addContent(annotationValueToContent(av)); sep = " "; } } // If the container has 1 or more value defined and if the // repeatable type annotation is not documented, print the container. else { addAnnotations(annotationDoc, linkInfo, annotation, pairs, indent, false); } } else { addAnnotations(annotationDoc, linkInfo, annotation, pairs, indent, linkBreak); } annotation.addContent(linkBreak ? DocletConstants.NL : ""); results.add(annotation); } return results; } /** * Add annotation to the annotation string. * * @param annotationDoc the annotation being documented * @param linkInfo the information about the link * @param annotation the annotation string to which the annotation will be added * @param pairs annotation type element and value pairs * @param indent the number of extra spaces to indent the annotations. * @param linkBreak if true, add new line between each member value */ private void addAnnotations(AnnotationTypeDoc annotationDoc, LinkInfoImpl linkInfo, ContentBuilder annotation, AnnotationDesc.ElementValuePair[] pairs, int indent, boolean linkBreak) { linkInfo.label = new StringContent("@" + annotationDoc.name()); annotation.addContent(getLink(linkInfo)); if (pairs.length > 0) { annotation.addContent("("); for (int j = 0; j < pairs.length; j++) { if (j > 0) { annotation.addContent(","); if (linkBreak) { annotation.addContent(DocletConstants.NL); int spaces = annotationDoc.name().length() + 2; for (int k = 0; k < (spaces + indent); k++) { annotation.addContent(" "); } } } annotation.addContent(getDocLink(LinkInfoImpl.Kind.ANNOTATION, pairs[j].element(), pairs[j].element().name(), false)); annotation.addContent("="); AnnotationValue annotationValue = pairs[j].value(); List annotationTypeValues = new ArrayList(); if (annotationValue.value() instanceof AnnotationValue[]) { AnnotationValue[] annotationArray = (AnnotationValue[]) annotationValue.value(); annotationTypeValues.addAll(Arrays.asList(annotationArray)); } else { annotationTypeValues.add(annotationValue); } annotation.addContent(annotationTypeValues.size() == 1 ? "" : "{"); String sep = ""; for (AnnotationValue av : annotationTypeValues) { annotation.addContent(sep); annotation.addContent(annotationValueToContent(av)); sep = ","; } annotation.addContent(annotationTypeValues.size() == 1 ? "" : "}"); isContainerDocumented = false; } annotation.addContent(")"); } } /** * Check if the annotation contains an array of annotation as a value. This * check is to verify if a repeatable type annotation is present or not. * * @param pairs annotation type element and value pairs * * @return true if the annotation contains an array of annotation as a value. */ private boolean isAnnotationArray(AnnotationDesc.ElementValuePair[] pairs) { AnnotationValue annotationValue; for (int j = 0; j < pairs.length; j++) { annotationValue = pairs[j].value(); if (annotationValue.value() instanceof AnnotationValue[]) { AnnotationValue[] annotationArray = (AnnotationValue[]) annotationValue.value(); if (annotationArray.length > 1) { if (annotationArray[0].value() instanceof AnnotationDesc) { AnnotationTypeDoc annotationDoc = ((AnnotationDesc) annotationArray[0].value()).annotationType(); isContainerDocumented = true; if (Util.isDocumentedAnnotation(annotationDoc)) { isAnnotationDocumented = true; } return true; } } } } return false; } private Content annotationValueToContent(AnnotationValue annotationValue) { if (annotationValue.value() instanceof Type) { Type type = (Type) annotationValue.value(); if (type.asClassDoc() != null) { LinkInfoImpl linkInfo = new LinkInfoImpl(configuration, LinkInfoImpl.Kind.ANNOTATION, type); linkInfo.label = new StringContent((type.asClassDoc().isIncluded() ? type.typeName() : type.qualifiedTypeName()) + type.dimension() + ".class"); return getLink(linkInfo); } else { return new StringContent(type.typeName() + type.dimension() + ".class"); } } else if (annotationValue.value() instanceof AnnotationDesc) { List list = getAnnotations(0, new AnnotationDesc[]{(AnnotationDesc) annotationValue.value()}, false); ContentBuilder buf = new ContentBuilder(); for (Content c: list) { buf.addContent(c); } return buf; } else if (annotationValue.value() instanceof MemberDoc) { return getDocLink(LinkInfoImpl.Kind.ANNOTATION, (MemberDoc) annotationValue.value(), ((MemberDoc) annotationValue.value()).name(), false); } else { return new StringContent(annotationValue.toString()); } } /** * Return the configuation for this doclet. * * @return the configuration for this doclet. */ public Configuration configuration() { return configuration; } } ././@LongLink0000000000000000000000000000015700000000000011220 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialFieldWriter.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialFieldW0000644000000000000000000002016312214026367032110 0ustar 00000000000000/* * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html; import java.util.*; import com.sun.javadoc.*; import com.sun.tools.doclets.formats.html.markup.*; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.taglets.*; /** * Generate serialized form for serializable fields. * Documentation denoted by the tags serial and * serialField is processed. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Joe Fialli * @author Bhavesh Patel (Modified) */ public class HtmlSerialFieldWriter extends FieldWriterImpl implements SerializedFormWriter.SerialFieldWriter { ProgramElementDoc[] members = null; private boolean printedOverallAnchor = false; public HtmlSerialFieldWriter(SubWriterHolderWriter writer, ClassDoc classdoc) { super(writer, classdoc); } public List members(ClassDoc cd) { return Arrays.asList(cd.serializableFields()); } /** * Return the header for serializable fields section. * * @return a content tree for the header */ public Content getSerializableFieldsHeader() { HtmlTree ul = new HtmlTree(HtmlTag.UL); ul.addStyle(HtmlStyle.blockList); return ul; } /** * Return the header for serializable fields content section. * * @param isLastContent true if the cotent being documented is the last content. * @return a content tree for the header */ public Content getFieldsContentHeader(boolean isLastContent) { HtmlTree li = new HtmlTree(HtmlTag.LI); if (isLastContent) li.addStyle(HtmlStyle.blockListLast); else li.addStyle(HtmlStyle.blockList); return li; } /** * Add serializable fields. * * @param heading the heading for the section * @param serializableFieldsTree the tree to be added to the serializable fileds * content tree * @return a content tree for the serializable fields content */ public Content getSerializableFields(String heading, Content serializableFieldsTree) { HtmlTree li = new HtmlTree(HtmlTag.LI); li.addStyle(HtmlStyle.blockList); if (serializableFieldsTree.isValid()) { if (!printedOverallAnchor) { li.addContent(writer.getMarkerAnchor("serializedForm")); printedOverallAnchor = true; } Content headingContent = new StringContent(heading); Content serialHeading = HtmlTree.HEADING(HtmlConstants.SERIALIZED_MEMBER_HEADING, headingContent); li.addContent(serialHeading); li.addContent(serializableFieldsTree); } return li; } /** * Add the member header. * * @param fieldType the class document to be listed * @param fieldTypeStr the string for the field type to be documented * @param fieldDimensions the dimensions of the field string to be added * @param fieldName name of the field to be added * @param contentTree the content tree to which the member header will be added */ public void addMemberHeader(ClassDoc fieldType, String fieldTypeStr, String fieldDimensions, String fieldName, Content contentTree) { Content nameContent = new RawHtml(fieldName); Content heading = HtmlTree.HEADING(HtmlConstants.MEMBER_HEADING, nameContent); contentTree.addContent(heading); Content pre = new HtmlTree(HtmlTag.PRE); if (fieldType == null) { pre.addContent(fieldTypeStr); } else { Content fieldContent = writer.getLink(new LinkInfoImpl( configuration, LinkInfoImpl.Kind.SERIAL_MEMBER, fieldType)); pre.addContent(fieldContent); } pre.addContent(fieldDimensions + " "); pre.addContent(fieldName); contentTree.addContent(pre); } /** * Add the deprecated information for this member. * * @param field the field to document. * @param contentTree the tree to which the deprecated info will be added */ public void addMemberDeprecatedInfo(FieldDoc field, Content contentTree) { addDeprecatedInfo(field, contentTree); } /** * Add the description text for this member. * * @param field the field to document. * @param contentTree the tree to which the deprecated info will be added */ public void addMemberDescription(FieldDoc field, Content contentTree) { if (field.inlineTags().length > 0) { writer.addInlineComment(field, contentTree); } Tag[] tags = field.tags("serial"); if (tags.length > 0) { writer.addInlineComment(field, tags[0], contentTree); } } /** * Add the description text for this member represented by the tag. * * @param serialFieldTag the field to document (represented by tag) * @param contentTree the tree to which the deprecated info will be added */ public void addMemberDescription(SerialFieldTag serialFieldTag, Content contentTree) { String serialFieldTagDesc = serialFieldTag.description().trim(); if (!serialFieldTagDesc.isEmpty()) { Content serialFieldContent = new RawHtml(serialFieldTagDesc); Content div = HtmlTree.DIV(HtmlStyle.block, serialFieldContent); contentTree.addContent(div); } } /** * Add the tag information for this member. * * @param field the field to document. * @param contentTree the tree to which the member tags info will be added */ public void addMemberTags(FieldDoc field, Content contentTree) { Content tagContent = new ContentBuilder(); TagletWriter.genTagOuput(configuration.tagletManager, field, configuration.tagletManager.getCustomTaglets(field), writer.getTagletWriterInstance(false), tagContent); Content dlTags = new HtmlTree(HtmlTag.DL); dlTags.addContent(tagContent); contentTree.addContent(dlTags); // TODO: what if empty? } /** * Check to see if overview details should be printed. If * nocomment option set or if there is no text to be printed * for deprecation info, comment or tags, do not print overview details. * * @param field the field to check overview details for. * @return true if overview details need to be printed */ public boolean shouldPrintOverview(FieldDoc field) { if (!configuration.nocomment) { if(!field.commentText().isEmpty() || writer.hasSerializationOverviewTags(field)) return true; } if (field.tags("deprecated").length > 0) return true; return false; } } ././@LongLink0000000000000000000000000000016000000000000011212 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialMethodWriter.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialMethod0000644000000000000000000001426612214026367032165 0ustar 00000000000000/* * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html; import com.sun.javadoc.*; import com.sun.tools.doclets.formats.html.markup.*; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.taglets.*; /** * Generate serialized form for Serializable/Externalizable methods. * Documentation denoted by the serialData tag is processed. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Joe Fialli * @author Bhavesh Patel (Modified) */ public class HtmlSerialMethodWriter extends MethodWriterImpl implements SerializedFormWriter.SerialMethodWriter{ public HtmlSerialMethodWriter(SubWriterHolderWriter writer, ClassDoc classdoc) { super(writer, classdoc); } /** * Return the header for serializable methods section. * * @return a content tree for the header */ public Content getSerializableMethodsHeader() { HtmlTree ul = new HtmlTree(HtmlTag.UL); ul.addStyle(HtmlStyle.blockList); return ul; } /** * Return the header for serializable methods content section. * * @param isLastContent true if the cotent being documented is the last content. * @return a content tree for the header */ public Content getMethodsContentHeader(boolean isLastContent) { HtmlTree li = new HtmlTree(HtmlTag.LI); if (isLastContent) li.addStyle(HtmlStyle.blockListLast); else li.addStyle(HtmlStyle.blockList); return li; } /** * Add serializable methods. * * @param heading the heading for the section * @param serializableMethodContent the tree to be added to the serializable methods * content tree * @return a content tree for the serializable methods content */ public Content getSerializableMethods(String heading, Content serializableMethodContent) { Content li = HtmlTree.LI(HtmlStyle.blockList, writer.getMarkerAnchor( "serialized_methods")); Content headingContent = new StringContent(heading); Content serialHeading = HtmlTree.HEADING(HtmlConstants.SERIALIZED_MEMBER_HEADING, headingContent); li.addContent(serialHeading); li.addContent(serializableMethodContent); return li; } /** * Return the no customization message. * * @param msg the message to be displayed * @return no customization message content */ public Content getNoCustomizationMsg(String msg) { Content noCustomizationMsg = new StringContent(msg); return noCustomizationMsg; } /** * Add the member header. * * @param member the method document to be listed * @param methodsContentTree the content tree to which the member header will be added */ public void addMemberHeader(MethodDoc member, Content methodsContentTree) { methodsContentTree.addContent(writer.getMarkerAnchor( writer.getAnchor(member))); methodsContentTree.addContent(getHead(member)); methodsContentTree.addContent(getSignature(member)); } /** * Add the deprecated information for this member. * * @param member the method to document. * @param methodsContentTree the tree to which the deprecated info will be added */ public void addDeprecatedMemberInfo(MethodDoc member, Content methodsContentTree) { addDeprecatedInfo(member, methodsContentTree); } /** * Add the description text for this member. * * @param member the method to document. * @param methodsContentTree the tree to which the deprecated info will be added */ public void addMemberDescription(MethodDoc member, Content methodsContentTree) { addComment(member, methodsContentTree); } /** * Add the tag information for this member. * * @param member the method to document. * @param methodsContentTree the tree to which the member tags info will be added */ public void addMemberTags(MethodDoc member, Content methodsContentTree) { Content tagContent = new ContentBuilder(); TagletManager tagletManager = configuration.tagletManager; TagletWriter.genTagOuput(tagletManager, member, tagletManager.getSerializedFormTaglets(), writer.getTagletWriterInstance(false), tagContent); Content dlTags = new HtmlTree(HtmlTag.DL); dlTags.addContent(tagContent); methodsContentTree.addContent(dlTags); // TODO: what if empty? MethodDoc method = member; if (method.name().compareTo("writeExternal") == 0 && method.tags("serialData").length == 0) { serialWarning(member.position(), "doclet.MissingSerialDataTag", method.containingClass().qualifiedName(), method.name()); } } } ././@LongLink0000000000000000000000000000015100000000000011212 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/LinkFactoryImpl.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/LinkFactoryImpl.0000644000000000000000000002043512214026367032100 0ustar 00000000000000/* * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html; import java.util.List; import com.sun.javadoc.*; import com.sun.tools.doclets.formats.html.markup.ContentBuilder; import com.sun.tools.doclets.formats.html.markup.RawHtml; import com.sun.tools.doclets.formats.html.markup.StringContent; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.*; import com.sun.tools.doclets.internal.toolkit.util.links.*; /** * A factory that returns a link given the information about it. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Jamie Ho * @since 1.5 */ public class LinkFactoryImpl extends LinkFactory { private HtmlDocletWriter m_writer; public LinkFactoryImpl(HtmlDocletWriter writer) { m_writer = writer; } /** * {@inheritDoc} */ protected Content newContent() { return new ContentBuilder(); } /** * {@inheritDoc} */ protected Content getClassLink(LinkInfo linkInfo) { LinkInfoImpl classLinkInfo = (LinkInfoImpl) linkInfo; boolean noLabel = linkInfo.label == null || linkInfo.label.isEmpty(); ClassDoc classDoc = classLinkInfo.classDoc; //Create a tool tip if we are linking to a class or interface. Don't //create one if we are linking to a member. String title = (classLinkInfo.where == null || classLinkInfo.where.length() == 0) ? getClassToolTip(classDoc, classLinkInfo.type != null && !classDoc.qualifiedTypeName().equals(classLinkInfo.type.qualifiedTypeName())) : ""; Content label = classLinkInfo.getClassLinkLabel(m_writer.configuration); Configuration configuration = m_writer.configuration; Content link = new ContentBuilder(); if (classDoc.isIncluded()) { if (configuration.isGeneratedDoc(classDoc)) { DocPath filename = getPath(classLinkInfo); if (linkInfo.linkToSelf || !(DocPath.forName(classDoc)).equals(m_writer.filename)) { link.addContent(m_writer.getHyperLink( filename.fragment(classLinkInfo.where), label, classLinkInfo.isStrong, classLinkInfo.styleName, title, classLinkInfo.target)); if (noLabel && !classLinkInfo.excludeTypeParameterLinks) { link.addContent(getTypeParameterLinks(linkInfo)); } return link; } } } else { Content crossLink = m_writer.getCrossClassLink( classDoc.qualifiedName(), classLinkInfo.where, label, classLinkInfo.isStrong, classLinkInfo.styleName, true); if (crossLink != null) { link.addContent(crossLink); if (noLabel && !classLinkInfo.excludeTypeParameterLinks) { link.addContent(getTypeParameterLinks(linkInfo)); } return link; } } // Can't link so just write label. link.addContent(label.toString()); if (noLabel && !classLinkInfo.excludeTypeParameterLinks) { link.addContent(getTypeParameterLinks(linkInfo)); } return link; } /** * {@inheritDoc} */ protected Content getTypeParameterLink(LinkInfo linkInfo, Type typeParam) { LinkInfoImpl typeLinkInfo = new LinkInfoImpl(m_writer.configuration, ((LinkInfoImpl) linkInfo).getContext(), typeParam); typeLinkInfo.excludeTypeBounds = linkInfo.excludeTypeBounds; typeLinkInfo.excludeTypeParameterLinks = linkInfo.excludeTypeParameterLinks; typeLinkInfo.linkToSelf = linkInfo.linkToSelf; typeLinkInfo.isJava5DeclarationLocation = false; return getLink(typeLinkInfo); } protected Content getTypeAnnotationLink(LinkInfo linkInfo, AnnotationDesc annotation) { throw new RuntimeException("Not implemented yet!"); } public Content getTypeAnnotationLinks(LinkInfo linkInfo) { ContentBuilder links = new ContentBuilder(); AnnotationDesc[] annotations; if (linkInfo.type instanceof AnnotatedType) { annotations = linkInfo.type.asAnnotatedType().annotations(); } else if (linkInfo.type instanceof TypeVariable) { annotations = linkInfo.type.asTypeVariable().annotations(); } else { return links; } if (annotations.length == 0) return links; List annos = m_writer.getAnnotations(0, annotations, false, linkInfo.isJava5DeclarationLocation); boolean isFirst = true; for (Content anno : annos) { if (!isFirst) { links.addContent(" "); } links.addContent(anno); isFirst = false; } if (!annos.isEmpty()) { links.addContent(" "); } return links; } /** * Given a class, return the appropriate tool tip. * * @param classDoc the class to get the tool tip for. * @return the tool tip for the appropriate class. */ private String getClassToolTip(ClassDoc classDoc, boolean isTypeLink) { Configuration configuration = m_writer.configuration; if (isTypeLink) { return configuration.getText("doclet.Href_Type_Param_Title", classDoc.name()); } else if (classDoc.isInterface()){ return configuration.getText("doclet.Href_Interface_Title", Util.getPackageName(classDoc.containingPackage())); } else if (classDoc.isAnnotationType()) { return configuration.getText("doclet.Href_Annotation_Title", Util.getPackageName(classDoc.containingPackage())); } else if (classDoc.isEnum()) { return configuration.getText("doclet.Href_Enum_Title", Util.getPackageName(classDoc.containingPackage())); } else { return configuration.getText("doclet.Href_Class_Title", Util.getPackageName(classDoc.containingPackage())); } } /** * Return path to the given file name in the given package. So if the name * passed is "Object.html" and the name of the package is "java.lang", and * if the relative path is "../.." then returned string will be * "../../java/lang/Object.html" * * @param linkInfo the information about the link. */ private DocPath getPath(LinkInfoImpl linkInfo) { if (linkInfo.context == LinkInfoImpl.Kind.PACKAGE_FRAME) { //Not really necessary to do this but we want to be consistent //with 1.4.2 output. return DocPath.forName(linkInfo.classDoc); } return m_writer.pathToRoot.resolve(DocPath.forClass(linkInfo.classDoc)); } } ././@LongLink0000000000000000000000000000014600000000000011216 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/LinkInfoImpl.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/LinkInfoImpl.jav0000644000000000000000000002606512214026367032072 0ustar 00000000000000/* * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html; import com.sun.javadoc.*; import com.sun.tools.doclets.formats.html.markup.ContentBuilder; import com.sun.tools.doclets.formats.html.markup.StringContent; import com.sun.tools.doclets.internal.toolkit.Content; import com.sun.tools.doclets.internal.toolkit.util.*; import com.sun.tools.doclets.internal.toolkit.util.links.*; /** *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. */ public class LinkInfoImpl extends LinkInfo { public enum Kind { DEFAULT, /** * Indicate that the link appears in a class list. */ ALL_CLASSES_FRAME, /** * Indicate that the link appears in a class documentation. */ CLASS, /** * Indicate that the link appears in member documentation. */ MEMBER, /** * Indicate that the link appears in class use documentation. */ CLASS_USE, /** * Indicate that the link appears in index documentation. */ INDEX, /** * Indicate that the link appears in constant value summary. */ CONSTANT_SUMMARY, /** * Indicate that the link appears in serialized form documentation. */ SERIALIZED_FORM, /** * Indicate that the link appears in serial member documentation. */ SERIAL_MEMBER, /** * Indicate that the link appears in package documentation. */ PACKAGE, /** * Indicate that the link appears in see tag documentation. */ SEE_TAG, /** * Indicate that the link appears in value tag documentation. */ VALUE_TAG, /** * Indicate that the link appears in tree documentation. */ TREE, /** * Indicate that the link appears in a class list. */ PACKAGE_FRAME, /** * The header in the class documentation. */ CLASS_HEADER, /** * The signature in the class documentation. */ CLASS_SIGNATURE, /** * The return type of a method. */ RETURN_TYPE, /** * The return type of a method in a member summary. */ SUMMARY_RETURN_TYPE, /** * The type of a method/constructor parameter. */ EXECUTABLE_MEMBER_PARAM, /** * Super interface links. */ SUPER_INTERFACES, /** * Implemented interface links. */ IMPLEMENTED_INTERFACES, /** * Implemented class links. */ IMPLEMENTED_CLASSES, /** * Subinterface links. */ SUBINTERFACES, /** * Subclasses links. */ SUBCLASSES, /** * The signature in the class documentation (implements/extends portion). */ CLASS_SIGNATURE_PARENT_NAME, /** * The header for method documentation copied from parent. */ METHOD_DOC_COPY, /** * Method "specified by" link. */ METHOD_SPECIFIED_BY, /** * Method "overrides" link. */ METHOD_OVERRIDES, /** * Annotation link. */ ANNOTATION, /** * The header for field documentation copied from parent. */ FIELD_DOC_COPY, /** * The parent nodes in the class tree. */ CLASS_TREE_PARENT, /** * The type parameters of a method or constructor. */ MEMBER_TYPE_PARAMS, /** * Indicate that the link appears in class use documentation. */ CLASS_USE_HEADER, /** * The header for property documentation copied from parent. */ PROPERTY_DOC_COPY } public final ConfigurationImpl configuration; /** * The location of the link. */ public Kind context = Kind.DEFAULT; /** * The value of the marker #. */ public String where = ""; /** * String style of text defined in style sheet. */ public String styleName = ""; /** * The value of the target. */ public String target = ""; /** * Construct a LinkInfo object. * * @param configuration the configuration data for the doclet * @param context the context of the link. * @param context the context of the link. * @param executableMemberDoc the member to link to. */ public LinkInfoImpl(ConfigurationImpl configuration, Kind context, ExecutableMemberDoc executableMemberDoc) { this.configuration = configuration; this.executableMemberDoc = executableMemberDoc; setContext(context); } /** * {@inherotDoc} */ protected Content newContent() { return new ContentBuilder(); } /** * Construct a LinkInfo object. * * @param configuration the configuration data for the doclet * @param context the context of the link. * @param classDoc the class to link to. */ public LinkInfoImpl(ConfigurationImpl configuration, Kind context, ClassDoc classDoc) { this.configuration = configuration; this.classDoc = classDoc; setContext(context); } /** * Construct a LinkInfo object. * * @param configuration the configuration data for the doclet * @param context the context of the link. * @param type the class to link to. */ public LinkInfoImpl(ConfigurationImpl configuration, Kind context, Type type) { this.configuration = configuration; this.type = type; setContext(context); } /** * Set the label for the link. * @param label plain-text label for the link */ public LinkInfoImpl label(String label) { this.label = new StringContent(label); return this; } /** * Set the label for the link. */ public LinkInfoImpl label(Content label) { this.label = label; return this; } /** * Set whether or not the link should be strong. */ public LinkInfoImpl strong(boolean strong) { this.isStrong = strong; return this; } /** * Set the style to be used for the link. * @param styleName String style of text defined in style sheet. */ public LinkInfoImpl styleName(String styleName) { this.styleName = styleName; return this; } /** * Set the target to be used for the link. * @param styleName String style of text defined in style sheet. */ public LinkInfoImpl target(String target) { this.target = target; return this; } /** * Set whether or not this is a link to a varargs parameter. */ public LinkInfoImpl varargs(boolean varargs) { this.isVarArg = varargs; return this; } /** * Set the fragment specifier for the link. */ public LinkInfoImpl where(String where) { this.where = where; return this; } /** * {@inheritDoc} */ public Kind getContext() { return context; } /** * {@inheritDoc} * * This method sets the link attributes to the appropriate values * based on the context. * * @param c the context id to set. */ public final void setContext(Kind c) { //NOTE: Put context specific link code here. switch (c) { case ALL_CLASSES_FRAME: case PACKAGE_FRAME: case IMPLEMENTED_CLASSES: case SUBCLASSES: case METHOD_DOC_COPY: case FIELD_DOC_COPY: case PROPERTY_DOC_COPY: case CLASS_USE_HEADER: includeTypeInClassLinkLabel = false; break; case ANNOTATION: excludeTypeParameterLinks = true; excludeTypeBounds = true; break; case IMPLEMENTED_INTERFACES: case SUPER_INTERFACES: case SUBINTERFACES: case CLASS_TREE_PARENT: case TREE: case CLASS_SIGNATURE_PARENT_NAME: excludeTypeParameterLinks = true; excludeTypeBounds = true; includeTypeInClassLinkLabel = false; includeTypeAsSepLink = true; break; case PACKAGE: case CLASS_USE: case CLASS_HEADER: case CLASS_SIGNATURE: excludeTypeParameterLinks = true; includeTypeAsSepLink = true; includeTypeInClassLinkLabel = false; break; case MEMBER_TYPE_PARAMS: includeTypeAsSepLink = true; includeTypeInClassLinkLabel = false; break; case RETURN_TYPE: case SUMMARY_RETURN_TYPE: excludeTypeBounds = true; break; case EXECUTABLE_MEMBER_PARAM: excludeTypeBounds = true; break; } context = c; if (type != null && type.asTypeVariable()!= null && type.asTypeVariable().owner() instanceof ExecutableMemberDoc) { excludeTypeParameterLinks = true; } } /** * Return true if this link is linkable and false if we can't link to the * desired place. * * @return true if this link is linkable and false if we can't link to the * desired place. */ public boolean isLinkable() { return Util.isLinkable(classDoc, configuration); } } ././@LongLink0000000000000000000000000000015000000000000011211 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/LinkOutputImpl.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/LinkOutputImpl.j0000644000000000000000000000440512214026367032142 0ustar 00000000000000/* * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html; import com.sun.tools.doclets.internal.toolkit.util.links.*; /** * Stores output of a link. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Jamie Ho * @since 1.5 */ public class LinkOutputImpl implements LinkOutput { /** * The output of the link. */ public StringBuilder output; /** * Construct a new LinkOutputImpl. */ public LinkOutputImpl() { output = new StringBuilder(); } /** * {@inheritDoc} */ public void append(Object o) { output.append(o instanceof String ? (String) o : ((LinkOutputImpl)o).toString()); } /** * {@inheritDoc} */ public void insert(int offset, Object o) { output.insert(offset, o.toString()); } /** * {@inheritDoc} */ public String toString() { return output.toString(); } } ././@LongLink0000000000000000000000000000015200000000000011213 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/MethodWriterImpl.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/MethodWriterImpl0000644000000000000000000003555412214026367032222 0ustar 00000000000000/* * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html; import java.io.*; import com.sun.javadoc.*; import com.sun.tools.doclets.formats.html.markup.*; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.*; /** * Writes method documentation in HTML format. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Robert Field * @author Atul M Dambalkar * @author Jamie Ho (rewrite) * @author Bhavesh Patel (Modified) */ public class MethodWriterImpl extends AbstractExecutableMemberWriter implements MethodWriter, MemberSummaryWriter { /** * Construct a new MethodWriterImpl. * * @param writer the writer for the class that the methods belong to. * @param classDoc the class being documented. */ public MethodWriterImpl(SubWriterHolderWriter writer, ClassDoc classDoc) { super(writer, classDoc); } /** * Construct a new MethodWriterImpl. * * @param writer The writer for the class that the methods belong to. */ public MethodWriterImpl(SubWriterHolderWriter writer) { super(writer); } /** * {@inheritDoc} */ public Content getMemberSummaryHeader(ClassDoc classDoc, Content memberSummaryTree) { memberSummaryTree.addContent(HtmlConstants.START_OF_METHOD_SUMMARY); Content memberTree = writer.getMemberTreeHeader(); writer.addSummaryHeader(this, classDoc, memberTree); return memberTree; } /** * {@inheritDoc} */ public Content getMethodDetailsTreeHeader(ClassDoc classDoc, Content memberDetailsTree) { memberDetailsTree.addContent(HtmlConstants.START_OF_METHOD_DETAILS); Content methodDetailsTree = writer.getMemberTreeHeader(); methodDetailsTree.addContent(writer.getMarkerAnchor("method_detail")); Content heading = HtmlTree.HEADING(HtmlConstants.DETAILS_HEADING, writer.methodDetailsLabel); methodDetailsTree.addContent(heading); return methodDetailsTree; } /** * {@inheritDoc} */ public Content getMethodDocTreeHeader(MethodDoc method, Content methodDetailsTree) { String erasureAnchor; if ((erasureAnchor = getErasureAnchor(method)) != null) { methodDetailsTree.addContent(writer.getMarkerAnchor((erasureAnchor))); } methodDetailsTree.addContent( writer.getMarkerAnchor(writer.getAnchor(method))); Content methodDocTree = writer.getMemberTreeHeader(); Content heading = new HtmlTree(HtmlConstants.MEMBER_HEADING); heading.addContent(method.name()); methodDocTree.addContent(heading); return methodDocTree; } /** * Get the signature for the given method. * * @param method the method being documented. * @return a content object for the signature */ public Content getSignature(MethodDoc method) { Content pre = new HtmlTree(HtmlTag.PRE); writer.addAnnotationInfo(method, pre); addModifiers(method, pre); addTypeParameters(method, pre); addReturnType(method, pre); if (configuration.linksource) { Content methodName = new StringContent(method.name()); writer.addSrcLink(method, methodName, pre); } else { addName(method.name(), pre); } int indent = pre.charCount(); addParameters(method, pre, indent); addExceptions(method, pre, indent); return pre; } /** * {@inheritDoc} */ public void addDeprecated(MethodDoc method, Content methodDocTree) { addDeprecatedInfo(method, methodDocTree); } /** * {@inheritDoc} */ public void addComments(Type holder, MethodDoc method, Content methodDocTree) { ClassDoc holderClassDoc = holder.asClassDoc(); if (method.inlineTags().length > 0) { if (holder.asClassDoc().equals(classdoc) || (! (holderClassDoc.isPublic() || Util.isLinkable(holderClassDoc, configuration)))) { writer.addInlineComment(method, methodDocTree); } else { Content link = writer.getDocLink(LinkInfoImpl.Kind.METHOD_DOC_COPY, holder.asClassDoc(), method, holder.asClassDoc().isIncluded() ? holder.typeName() : holder.qualifiedTypeName(), false); Content codelLink = HtmlTree.CODE(link); Content strong = HtmlTree.STRONG(holder.asClassDoc().isClass()? writer.descfrmClassLabel : writer.descfrmInterfaceLabel); strong.addContent(writer.getSpace()); strong.addContent(codelLink); methodDocTree.addContent(HtmlTree.DIV(HtmlStyle.block, strong)); writer.addInlineComment(method, methodDocTree); } } } /** * {@inheritDoc} */ public void addTags(MethodDoc method, Content methodDocTree) { writer.addTagsInfo(method, methodDocTree); } /** * {@inheritDoc} */ public Content getMethodDetails(Content methodDetailsTree) { return getMemberTree(methodDetailsTree); } /** * {@inheritDoc} */ public Content getMethodDoc(Content methodDocTree, boolean isLastContent) { return getMemberTree(methodDocTree, isLastContent); } /** * Close the writer. */ public void close() throws IOException { writer.close(); } public int getMemberKind() { return VisibleMemberMap.METHODS; } /** * {@inheritDoc} */ public void addSummaryLabel(Content memberTree) { Content label = HtmlTree.HEADING(HtmlConstants.SUMMARY_HEADING, writer.getResource("doclet.Method_Summary")); memberTree.addContent(label); } /** * {@inheritDoc} */ public String getTableSummary() { return configuration.getText("doclet.Member_Table_Summary", configuration.getText("doclet.Method_Summary"), configuration.getText("doclet.methods")); } /** * {@inheritDoc} */ public Content getCaption() { return configuration.getResource("doclet.Methods"); } /** * {@inheritDoc} */ public String[] getSummaryTableHeader(ProgramElementDoc member) { String[] header = new String[] { writer.getModifierTypeHeader(), configuration.getText("doclet.0_and_1", configuration.getText("doclet.Method"), configuration.getText("doclet.Description")) }; return header; } /** * {@inheritDoc} */ public void addSummaryAnchor(ClassDoc cd, Content memberTree) { memberTree.addContent(writer.getMarkerAnchor("method_summary")); } /** * {@inheritDoc} */ public void addInheritedSummaryAnchor(ClassDoc cd, Content inheritedTree) { inheritedTree.addContent(writer.getMarkerAnchor( "methods_inherited_from_class_" + configuration.getClassName(cd))); } /** * {@inheritDoc} */ public void addInheritedSummaryLabel(ClassDoc cd, Content inheritedTree) { Content classLink = writer.getPreQualifiedClassLink( LinkInfoImpl.Kind.MEMBER, cd, false); Content label = new StringContent(cd.isClass() ? configuration.getText("doclet.Methods_Inherited_From_Class") : configuration.getText("doclet.Methods_Inherited_From_Interface")); Content labelHeading = HtmlTree.HEADING(HtmlConstants.INHERITED_SUMMARY_HEADING, label); labelHeading.addContent(writer.getSpace()); labelHeading.addContent(classLink); inheritedTree.addContent(labelHeading); } /** * {@inheritDoc} */ protected void addSummaryType(ProgramElementDoc member, Content tdSummaryType) { MethodDoc meth = (MethodDoc)member; addModifierAndType(meth, meth.returnType(), tdSummaryType); } /** * {@inheritDoc} */ protected static void addOverridden(HtmlDocletWriter writer, Type overriddenType, MethodDoc method, Content dl) { if (writer.configuration.nocomment) { return; } ClassDoc holderClassDoc = overriddenType.asClassDoc(); if (! (holderClassDoc.isPublic() || Util.isLinkable(holderClassDoc, writer.configuration))) { //This is an implementation detail that should not be documented. return; } if (overriddenType.asClassDoc().isIncluded() && ! method.isIncluded()) { //The class is included but the method is not. That means that it //is not visible so don't document this. return; } Content label = writer.overridesLabel; LinkInfoImpl.Kind context = LinkInfoImpl.Kind.METHOD_OVERRIDES; if (method != null) { if (overriddenType.asClassDoc().isAbstract() && method.isAbstract()){ //Abstract method is implemented from abstract class, //not overridden label = writer.specifiedByLabel; context = LinkInfoImpl.Kind.METHOD_SPECIFIED_BY; } Content dt = HtmlTree.DT(HtmlTree.STRONG(label)); dl.addContent(dt); Content overriddenTypeLink = writer.getLink(new LinkInfoImpl(writer.configuration, context, overriddenType)); Content codeOverridenTypeLink = HtmlTree.CODE(overriddenTypeLink); String name = method.name(); Content methlink = writer.getLink( new LinkInfoImpl(writer.configuration, LinkInfoImpl.Kind.MEMBER, overriddenType.asClassDoc()) .where(writer.getAnchor(method)).label(name)); Content codeMethLink = HtmlTree.CODE(methlink); Content dd = HtmlTree.DD(codeMethLink); dd.addContent(writer.getSpace()); dd.addContent(writer.getResource("doclet.in_class")); dd.addContent(writer.getSpace()); dd.addContent(codeOverridenTypeLink); dl.addContent(dd); } } /** * Parse the <Code> tag and return the text. */ protected String parseCodeTag(String tag){ if(tag == null){ return ""; } String lc = tag.toLowerCase(); int begin = lc.indexOf(""); int end = lc.indexOf(""); if(begin == -1 || end == -1 || end <= begin){ return tag; } else { return tag.substring(begin + 6, end); } } /** * {@inheritDoc} */ protected static void addImplementsInfo(HtmlDocletWriter writer, MethodDoc method, Content dl) { if(writer.configuration.nocomment){ return; } ImplementedMethods implementedMethodsFinder = new ImplementedMethods(method, writer.configuration); MethodDoc[] implementedMethods = implementedMethodsFinder.build(); for (int i = 0; i < implementedMethods.length; i++) { MethodDoc implementedMeth = implementedMethods[i]; Type intfac = implementedMethodsFinder.getMethodHolder(implementedMeth); Content intfaclink = writer.getLink(new LinkInfoImpl( writer.configuration, LinkInfoImpl.Kind.METHOD_SPECIFIED_BY, intfac)); Content codeIntfacLink = HtmlTree.CODE(intfaclink); Content dt = HtmlTree.DT(HtmlTree.STRONG(writer.specifiedByLabel)); dl.addContent(dt); Content methlink = writer.getDocLink( LinkInfoImpl.Kind.MEMBER, implementedMeth, implementedMeth.name(), false); Content codeMethLink = HtmlTree.CODE(methlink); Content dd = HtmlTree.DD(codeMethLink); dd.addContent(writer.getSpace()); dd.addContent(writer.getResource("doclet.in_interface")); dd.addContent(writer.getSpace()); dd.addContent(codeIntfacLink); dl.addContent(dd); } } /** * Add the return type. * * @param method the method being documented. * @param htmltree the content tree to which the return type will be added */ protected void addReturnType(MethodDoc method, Content htmltree) { Type type = method.returnType(); if (type != null) { Content linkContent = writer.getLink( new LinkInfoImpl(configuration, LinkInfoImpl.Kind.RETURN_TYPE, type)); htmltree.addContent(linkContent); htmltree.addContent(writer.getSpace()); } } /** * {@inheritDoc} */ protected Content getNavSummaryLink(ClassDoc cd, boolean link) { if (link) { return writer.getHyperLink((cd == null)? "method_summary": "methods_inherited_from_class_" + configuration.getClassName(cd), writer.getResource("doclet.navMethod")); } else { return writer.getResource("doclet.navMethod"); } } /** * {@inheritDoc} */ protected void addNavDetailLink(boolean link, Content liNav) { if (link) { liNav.addContent(writer.getHyperLink("method_detail", writer.getResource("doclet.navMethod"))); } else { liNav.addContent(writer.getResource("doclet.navMethod")); } } } ././@LongLink0000000000000000000000000000015700000000000011220 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/NestedClassWriterImpl.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/NestedClassWrite0000644000000000000000000001603212214026367032174 0ustar 00000000000000/* * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html; import java.io.*; import com.sun.javadoc.*; import com.sun.tools.doclets.formats.html.markup.*; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.*; /** * Writes nested class documentation in HTML format. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Robert Field * @author Atul M Dambalkar * @author Jamie Ho (rewrite) * @author Bhavesh Patel (Modified) */ public class NestedClassWriterImpl extends AbstractMemberWriter implements MemberSummaryWriter { public NestedClassWriterImpl(SubWriterHolderWriter writer, ClassDoc classdoc) { super(writer, classdoc); } public NestedClassWriterImpl(SubWriterHolderWriter writer) { super(writer); } /** * {@inheritDoc} */ public Content getMemberSummaryHeader(ClassDoc classDoc, Content memberSummaryTree) { memberSummaryTree.addContent(HtmlConstants.START_OF_NESTED_CLASS_SUMMARY); Content memberTree = writer.getMemberTreeHeader(); writer.addSummaryHeader(this, classDoc, memberTree); return memberTree; } /** * Close the writer. */ public void close() throws IOException { writer.close(); } public int getMemberKind() { return VisibleMemberMap.INNERCLASSES; } /** * {@inheritDoc} */ public void addSummaryLabel(Content memberTree) { Content label = HtmlTree.HEADING(HtmlConstants.SUMMARY_HEADING, writer.getResource("doclet.Nested_Class_Summary")); memberTree.addContent(label); } /** * {@inheritDoc} */ public String getTableSummary() { return configuration.getText("doclet.Member_Table_Summary", configuration.getText("doclet.Nested_Class_Summary"), configuration.getText("doclet.nested_classes")); } /** * {@inheritDoc} */ public Content getCaption() { return configuration.getResource("doclet.Nested_Classes"); } /** * {@inheritDoc} */ public String[] getSummaryTableHeader(ProgramElementDoc member) { String[] header; if (member.isInterface()) { header = new String[] { writer.getModifierTypeHeader(), configuration.getText("doclet.0_and_1", configuration.getText("doclet.Interface"), configuration.getText("doclet.Description")) }; } else { header = new String[] { writer.getModifierTypeHeader(), configuration.getText("doclet.0_and_1", configuration.getText("doclet.Class"), configuration.getText("doclet.Description")) }; } return header; } /** * {@inheritDoc} */ public void addSummaryAnchor(ClassDoc cd, Content memberTree) { memberTree.addContent(writer.getMarkerAnchor("nested_class_summary")); } /** * {@inheritDoc} */ public void addInheritedSummaryAnchor(ClassDoc cd, Content inheritedTree) { inheritedTree.addContent(writer.getMarkerAnchor( "nested_classes_inherited_from_class_" + cd.qualifiedName())); } /** * {@inheritDoc} */ public void addInheritedSummaryLabel(ClassDoc cd, Content inheritedTree) { Content classLink = writer.getPreQualifiedClassLink( LinkInfoImpl.Kind.MEMBER, cd, false); Content label = new StringContent(cd.isInterface() ? configuration.getText("doclet.Nested_Classes_Interface_Inherited_From_Interface") : configuration.getText("doclet.Nested_Classes_Interfaces_Inherited_From_Class")); Content labelHeading = HtmlTree.HEADING(HtmlConstants.INHERITED_SUMMARY_HEADING, label); labelHeading.addContent(writer.getSpace()); labelHeading.addContent(classLink); inheritedTree.addContent(labelHeading); } /** * {@inheritDoc} */ protected void addSummaryLink(LinkInfoImpl.Kind context, ClassDoc cd, ProgramElementDoc member, Content tdSummary) { Content strong = HtmlTree.STRONG( writer.getLink(new LinkInfoImpl(configuration, context, (ClassDoc)member))); Content code = HtmlTree.CODE(strong); tdSummary.addContent(code); } /** * {@inheritDoc} */ protected void addInheritedSummaryLink(ClassDoc cd, ProgramElementDoc member, Content linksTree) { linksTree.addContent( writer.getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.MEMBER, (ClassDoc)member))); } /** * {@inheritDoc} */ protected void addSummaryType(ProgramElementDoc member, Content tdSummaryType) { ClassDoc cd = (ClassDoc)member; addModifierAndType(cd, null, tdSummaryType); } /** * {@inheritDoc} */ protected Content getDeprecatedLink(ProgramElementDoc member) { return writer.getQualifiedClassLink(LinkInfoImpl.Kind.MEMBER, (ClassDoc)member); } /** * {@inheritDoc} */ protected Content getNavSummaryLink(ClassDoc cd, boolean link) { if (link) { return writer.getHyperLink((cd == null) ? "nested_class_summary": "nested_classes_inherited_from_class_" + cd.qualifiedName(), writer.getResource("doclet.navNested")); } else { return writer.getResource("doclet.navNested"); } } /** * {@inheritDoc} */ protected void addNavDetailLink(boolean link, Content liNav) { } } ././@LongLink0000000000000000000000000000015400000000000011215 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/PackageFrameWriter.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/PackageFrameWrit0000644000000000000000000002126212214026367032126 0ustar 00000000000000/* * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html; import java.io.*; import java.util.*; import com.sun.javadoc.*; import com.sun.tools.doclets.formats.html.markup.*; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.*; /** * Class to generate file for each package contents in the left-hand bottom * frame. This will list all the Class Kinds in the package. A click on any * class-kind will update the right-hand frame with the clicked class-kind page. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Atul M Dambalkar * @author Bhavesh Patel (Modified) */ public class PackageFrameWriter extends HtmlDocletWriter { /** * The package being documented. */ private PackageDoc packageDoc; /** * The classes to be documented. Use this to filter out classes * that will not be documented. */ private Set documentedClasses; /** * Constructor to construct PackageFrameWriter object and to generate * "package-frame.html" file in the respective package directory. * For example for package "java.lang" this will generate file * "package-frame.html" file in the "java/lang" directory. It will also * create "java/lang" directory in the current or the destination directory * if it doesn't exist. * * @param configuration the configuration of the doclet. * @param packageDoc PackageDoc under consideration. */ public PackageFrameWriter(ConfigurationImpl configuration, PackageDoc packageDoc) throws IOException { super(configuration, DocPath.forPackage(packageDoc).resolve(DocPaths.PACKAGE_FRAME)); this.packageDoc = packageDoc; if (configuration.root.specifiedPackages().length == 0) { documentedClasses = new HashSet(Arrays.asList(configuration.root.classes())); } } /** * Generate a package summary page for the left-hand bottom frame. Construct * the PackageFrameWriter object and then uses it generate the file. * * @param configuration the current configuration of the doclet. * @param packageDoc The package for which "pacakge-frame.html" is to be generated. */ public static void generate(ConfigurationImpl configuration, PackageDoc packageDoc) { PackageFrameWriter packgen; try { packgen = new PackageFrameWriter(configuration, packageDoc); String pkgName = Util.getPackageName(packageDoc); Content body = packgen.getBody(false, packgen.getWindowTitle(pkgName)); Content pkgNameContent = new StringContent(pkgName); Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, HtmlStyle.bar, packgen.getTargetPackageLink(packageDoc, "classFrame", pkgNameContent)); body.addContent(heading); HtmlTree div = new HtmlTree(HtmlTag.DIV); div.addStyle(HtmlStyle.indexContainer); packgen.addClassListing(div); body.addContent(div); packgen.printHtmlDocument( configuration.metakeywords.getMetaKeywords(packageDoc), false, body); packgen.close(); } catch (IOException exc) { configuration.standardmessage.error( "doclet.exception_encountered", exc.toString(), DocPaths.PACKAGE_FRAME.getPath()); throw new DocletAbortException(); } } /** * Add class listing for all the classes in this package. Divide class * listing as per the class kind and generate separate listing for * Classes, Interfaces, Exceptions and Errors. * * @param contentTree the content tree to which the listing will be added */ protected void addClassListing(Content contentTree) { Configuration config = configuration; if (packageDoc.isIncluded()) { addClassKindListing(packageDoc.interfaces(), getResource("doclet.Interfaces"), contentTree); addClassKindListing(packageDoc.ordinaryClasses(), getResource("doclet.Classes"), contentTree); addClassKindListing(packageDoc.enums(), getResource("doclet.Enums"), contentTree); addClassKindListing(packageDoc.exceptions(), getResource("doclet.Exceptions"), contentTree); addClassKindListing(packageDoc.errors(), getResource("doclet.Errors"), contentTree); addClassKindListing(packageDoc.annotationTypes(), getResource("doclet.AnnotationTypes"), contentTree); } else { String name = Util.getPackageName(packageDoc); addClassKindListing(config.classDocCatalog.interfaces(name), getResource("doclet.Interfaces"), contentTree); addClassKindListing(config.classDocCatalog.ordinaryClasses(name), getResource("doclet.Classes"), contentTree); addClassKindListing(config.classDocCatalog.enums(name), getResource("doclet.Enums"), contentTree); addClassKindListing(config.classDocCatalog.exceptions(name), getResource("doclet.Exceptions"), contentTree); addClassKindListing(config.classDocCatalog.errors(name), getResource("doclet.Errors"), contentTree); addClassKindListing(config.classDocCatalog.annotationTypes(name), getResource("doclet.AnnotationTypes"), contentTree); } } /** * Add specific class kind listing. Also add label to the listing. * * @param arr Array of specific class kinds, namely Class or Interface or Exception or Error * @param labelContent content tree of the label to be added * @param contentTree the content tree to which the class kind listing will be added */ protected void addClassKindListing(ClassDoc[] arr, Content labelContent, Content contentTree) { arr = Util.filterOutPrivateClasses(arr, configuration.javafx); if(arr.length > 0) { Arrays.sort(arr); boolean printedHeader = false; HtmlTree ul = new HtmlTree(HtmlTag.UL); ul.setTitle(labelContent); for (int i = 0; i < arr.length; i++) { if (documentedClasses != null && !documentedClasses.contains(arr[i])) { continue; } if (!Util.isCoreClass(arr[i]) || ! configuration.isGeneratedDoc(arr[i])) { continue; } if (!printedHeader) { Content heading = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, true, labelContent); contentTree.addContent(heading); printedHeader = true; } Content arr_i_name = new StringContent(arr[i].name()); if (arr[i].isInterface()) arr_i_name = HtmlTree.I(arr_i_name); Content link = getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.PACKAGE_FRAME, arr[i]).label(arr_i_name).target("classFrame")); Content li = HtmlTree.LI(link); ul.addContent(li); } contentTree.addContent(ul); } } } ././@LongLink0000000000000000000000000000016100000000000011213 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexFrameWriter.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexFram0000644000000000000000000001472712214026367032113 0ustar 00000000000000/* * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html; import java.io.*; import com.sun.javadoc.*; import com.sun.tools.doclets.formats.html.markup.*; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.*; /** * Generate the package index for the left-hand frame in the generated output. * A click on the package name in this frame will update the page in the bottom * left hand frame with the listing of contents of the clicked package. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Atul M Dambalkar */ public class PackageIndexFrameWriter extends AbstractPackageIndexWriter { /** * Construct the PackageIndexFrameWriter object. * * @param filename Name of the package index file to be generated. */ public PackageIndexFrameWriter(ConfigurationImpl configuration, DocPath filename) throws IOException { super(configuration, filename); } /** * Generate the package index file named "overview-frame.html". * @throws DocletAbortException */ public static void generate(ConfigurationImpl configuration) { PackageIndexFrameWriter packgen; DocPath filename = DocPaths.OVERVIEW_FRAME; try { packgen = new PackageIndexFrameWriter(configuration, filename); packgen.buildPackageIndexFile("doclet.Window_Overview", false); packgen.close(); } catch (IOException exc) { configuration.standardmessage.error( "doclet.exception_encountered", exc.toString(), filename); throw new DocletAbortException(); } } /** * {@inheritDoc} */ protected void addPackagesList(PackageDoc[] packages, String text, String tableSummary, Content body) { Content heading = HtmlTree.HEADING(HtmlConstants.PACKAGE_HEADING, true, packagesLabel); Content div = HtmlTree.DIV(HtmlStyle.indexContainer, heading); HtmlTree ul = new HtmlTree(HtmlTag.UL); ul.setTitle(packagesLabel); for(int i = 0; i < packages.length; i++) { // Do not list the package if -nodeprecated option is set and the // package is marked as deprecated. if (packages[i] != null && (!(configuration.nodeprecated && Util.isDeprecated(packages[i])))) { ul.addContent(getPackage(packages[i])); } } div.addContent(ul); body.addContent(div); } /** * Gets each package name as a separate link. * * @param pd PackageDoc * @return content for the package link */ protected Content getPackage(PackageDoc pd) { Content packageLinkContent; Content packageLabel; if (pd.name().length() > 0) { packageLabel = getPackageLabel(pd.name()); packageLinkContent = getHyperLink(pathString(pd, DocPaths.PACKAGE_FRAME), packageLabel, "", "packageFrame"); } else { packageLabel = new StringContent(""); packageLinkContent = getHyperLink(DocPaths.PACKAGE_FRAME, packageLabel, "", "packageFrame"); } Content li = HtmlTree.LI(packageLinkContent); return li; } /** * {@inheritDoc} */ protected void addNavigationBarHeader(Content body) { Content headerContent; if (configuration.packagesheader.length() > 0) { headerContent = new RawHtml(replaceDocRootDir(configuration.packagesheader)); } else { headerContent = new RawHtml(replaceDocRootDir(configuration.header)); } Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, true, HtmlStyle.bar, headerContent); body.addContent(heading); } /** * Do nothing as there is no overview information in this page. */ protected void addOverviewHeader(Content body) { } /** * Adds "All Classes" link for the top of the left-hand frame page to the * documentation tree. * * @param div the Content object to which the all classes link should be added */ protected void addAllClassesLink(Content div) { Content linkContent = getHyperLink(DocPaths.ALLCLASSES_FRAME, allclassesLabel, "", "packageFrame"); Content span = HtmlTree.SPAN(linkContent); div.addContent(span); } /** * Adds "All Profiles" link for the top of the left-hand frame page to the * documentation tree. * * @param div the Content object to which the all profiles link should be added */ protected void addAllProfilesLink(Content div) { Content linkContent = getHyperLink(DocPaths.PROFILE_OVERVIEW_FRAME, allprofilesLabel, "", "packageListFrame"); Content span = HtmlTree.SPAN(linkContent); div.addContent(span); } /** * {@inheritDoc} */ protected void addNavigationBarFooter(Content body) { Content p = HtmlTree.P(getSpace()); body.addContent(p); } } ././@LongLink0000000000000000000000000000015400000000000011215 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexWriter.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexWrit0000644000000000000000000002534012214026367032144 0ustar 00000000000000/* * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html; import java.io.*; import java.util.*; import com.sun.javadoc.*; import com.sun.tools.javac.jvm.Profile; import com.sun.tools.doclets.formats.html.markup.*; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.*; /** * Generate the package index page "overview-summary.html" for the right-hand * frame. A click on the package name on this page will update the same frame * with the "package-summary.html" file for the clicked package. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Atul M Dambalkar * @author Bhavesh Patel (Modified) */ public class PackageIndexWriter extends AbstractPackageIndexWriter { /** * Root of the program structure. Used for "overview" documentation. */ private RootDoc root; /** * Map representing the group of packages as specified on the command line. * * @see Group */ private Map> groupPackageMap; /** * List to store the order groups as specified on the command line. */ private List groupList; /** * Construct the PackageIndexWriter. Also constructs the grouping * information as provided on the command line by "-group" option. Stores * the order of groups specified by the user. * * @see Group */ public PackageIndexWriter(ConfigurationImpl configuration, DocPath filename) throws IOException { super(configuration, filename); this.root = configuration.root; groupPackageMap = configuration.group.groupPackages(packages); groupList = configuration.group.getGroupList(); } /** * Generate the package index page for the right-hand frame. * * @param configuration the current configuration of the doclet. */ public static void generate(ConfigurationImpl configuration) { PackageIndexWriter packgen; DocPath filename = DocPaths.OVERVIEW_SUMMARY; try { packgen = new PackageIndexWriter(configuration, filename); packgen.buildPackageIndexFile("doclet.Window_Overview_Summary", true); packgen.close(); } catch (IOException exc) { configuration.standardmessage.error( "doclet.exception_encountered", exc.toString(), filename); throw new DocletAbortException(); } } /** * Depending upon the grouping information and their titles, add * separate table indices for each package group. * * @param body the documentation tree to which the index will be added */ protected void addIndex(Content body) { for (int i = 0; i < groupList.size(); i++) { String groupname = groupList.get(i); List list = groupPackageMap.get(groupname); if (list != null && list.size() > 0) { addIndexContents(list.toArray(new PackageDoc[list.size()]), groupname, configuration.getText("doclet.Member_Table_Summary", groupname, configuration.getText("doclet.packages")), body); } } } /** * {@inheritDoc} */ protected void addProfilesList(Content profileSummary, String profilesTableSummary, Content body) { Content table = HtmlTree.TABLE(HtmlStyle.overviewSummary, 0, 3, 0, profilesTableSummary, getTableCaption(profileSummary)); table.addContent(getSummaryTableHeader(profileTableHeader, "col")); Content tbody = new HtmlTree(HtmlTag.TBODY); addProfilesList(tbody); table.addContent(tbody); Content div = HtmlTree.DIV(HtmlStyle.contentContainer, table); body.addContent(div); } /** * {@inheritDoc} */ protected void addPackagesList(PackageDoc[] packages, String text, String tableSummary, Content body) { Content table = HtmlTree.TABLE(HtmlStyle.overviewSummary, 0, 3, 0, tableSummary, getTableCaption(new RawHtml(text))); table.addContent(getSummaryTableHeader(packageTableHeader, "col")); Content tbody = new HtmlTree(HtmlTag.TBODY); addPackagesList(packages, tbody); table.addContent(tbody); Content div = HtmlTree.DIV(HtmlStyle.contentContainer, table); body.addContent(div); } /** * Adds list of profiles in the index table. Generate link to each profile. * * @param tbody the documentation tree to which the list will be added */ protected void addProfilesList(Content tbody) { for (int i = 1; i < configuration.profiles.getProfileCount(); i++) { String profileName = Profile.lookup(i).name; Content profileLinkContent = getTargetProfileLink("classFrame", new StringContent(profileName), profileName); Content tdProfile = HtmlTree.TD(HtmlStyle.colFirst, profileLinkContent); HtmlTree tdSummary = new HtmlTree(HtmlTag.TD); tdSummary.addStyle(HtmlStyle.colLast); tdSummary.addContent(getSpace()); HtmlTree tr = HtmlTree.TR(tdProfile); tr.addContent(tdSummary); if (i % 2 == 0) { tr.addStyle(HtmlStyle.altColor); } else { tr.addStyle(HtmlStyle.rowColor); } tbody.addContent(tr); } } /** * Adds list of packages in the index table. Generate link to each package. * * @param packages Packages to which link is to be generated * @param tbody the documentation tree to which the list will be added */ protected void addPackagesList(PackageDoc[] packages, Content tbody) { for (int i = 0; i < packages.length; i++) { if (packages[i] != null && packages[i].name().length() > 0) { if (configuration.nodeprecated && Util.isDeprecated(packages[i])) continue; Content packageLinkContent = getPackageLink(packages[i], getPackageName(packages[i])); Content tdPackage = HtmlTree.TD(HtmlStyle.colFirst, packageLinkContent); HtmlTree tdSummary = new HtmlTree(HtmlTag.TD); tdSummary.addStyle(HtmlStyle.colLast); addSummaryComment(packages[i], tdSummary); HtmlTree tr = HtmlTree.TR(tdPackage); tr.addContent(tdSummary); if (i%2 == 0) tr.addStyle(HtmlStyle.altColor); else tr.addStyle(HtmlStyle.rowColor); tbody.addContent(tr); } } } /** * Adds the overview summary comment for this documentation. Add one line * summary at the top of the page and generate a link to the description, * which is added at the end of this page. * * @param body the documentation tree to which the overview header will be added */ protected void addOverviewHeader(Content body) { if (root.inlineTags().length > 0) { HtmlTree subTitleDiv = new HtmlTree(HtmlTag.DIV); subTitleDiv.addStyle(HtmlStyle.subTitle); addSummaryComment(root, subTitleDiv); Content div = HtmlTree.DIV(HtmlStyle.header, subTitleDiv); Content see = seeLabel; see.addContent(" "); Content descPara = HtmlTree.P(see); Content descLink = getHyperLink(DocLink.fragment("overview_description"), descriptionLabel, "", ""); descPara.addContent(descLink); div.addContent(descPara); body.addContent(div); } } /** * Adds the overview comment as provided in the file specified by the * "-overview" option on the command line. * * @param htmltree the documentation tree to which the overview comment will * be added */ protected void addOverviewComment(Content htmltree) { if (root.inlineTags().length > 0) { htmltree.addContent(getMarkerAnchor("overview_description")); addInlineComment(root, htmltree); } } /** * Adds the tag information as provided in the file specified by the * "-overview" option on the command line. * * @param body the documentation tree to which the overview will be added */ protected void addOverview(Content body) throws IOException { HtmlTree div = new HtmlTree(HtmlTag.DIV); div.addStyle(HtmlStyle.contentContainer); addOverviewComment(div); addTagsInfo(root, div); body.addContent(div); } /** * Adds the top text (from the -top option), the upper * navigation bar, and then the title (from the"-title" * option), at the top of page. * * @body the documentation tree to which the navigation bar header will be added */ protected void addNavigationBarHeader(Content body) { addTop(body); addNavLinks(true, body); addConfigurationTitle(body); } /** * Adds the lower navigation bar and the bottom text * (from the -bottom option) at the bottom of page. * * @param body the documentation tree to which the navigation bar footer will be added */ protected void addNavigationBarFooter(Content body) { addNavLinks(false, body); addBottom(body); } } ././@LongLink0000000000000000000000000000015300000000000011214 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/PackageTreeWriter.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/PackageTreeWrite0000644000000000000000000001655012214026367032144 0ustar 00000000000000/* * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html; import java.io.*; import com.sun.javadoc.*; import com.sun.tools.doclets.formats.html.markup.*; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.*; /** * Class to generate Tree page for a package. The name of the file generated is * "package-tree.html" and it is generated in the respective package directory. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Atul M Dambalkar * @author Bhavesh Patel (Modified) */ public class PackageTreeWriter extends AbstractTreeWriter { /** * Package for which tree is to be generated. */ protected PackageDoc packagedoc; /** * The previous package name in the alpha-order list. */ protected PackageDoc prev; /** * The next package name in the alpha-order list. */ protected PackageDoc next; /** * Constructor. * @throws IOException * @throws DocletAbortException */ public PackageTreeWriter(ConfigurationImpl configuration, DocPath path, PackageDoc packagedoc, PackageDoc prev, PackageDoc next) throws IOException { super(configuration, path, new ClassTree( configuration.classDocCatalog.allClasses(packagedoc), configuration)); this.packagedoc = packagedoc; this.prev = prev; this.next = next; } /** * Construct a PackageTreeWriter object and then use it to generate the * package tree page. * * @param pkg Package for which tree file is to be generated. * @param prev Previous package in the alpha-ordered list. * @param next Next package in the alpha-ordered list. * @param noDeprecated If true, do not generate any information for * deprecated classe or interfaces. * @throws DocletAbortException */ public static void generate(ConfigurationImpl configuration, PackageDoc pkg, PackageDoc prev, PackageDoc next, boolean noDeprecated) { PackageTreeWriter packgen; DocPath path = DocPath.forPackage(pkg).resolve(DocPaths.PACKAGE_TREE); try { packgen = new PackageTreeWriter(configuration, path, pkg, prev, next); packgen.generatePackageTreeFile(); packgen.close(); } catch (IOException exc) { configuration.standardmessage.error( "doclet.exception_encountered", exc.toString(), path.getPath()); throw new DocletAbortException(); } } /** * Generate a separate tree file for each package. */ protected void generatePackageTreeFile() throws IOException { Content body = getPackageTreeHeader(); Content headContent = getResource("doclet.Hierarchy_For_Package", Util.getPackageName(packagedoc)); Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, false, HtmlStyle.title, headContent); Content div = HtmlTree.DIV(HtmlStyle.header, heading); if (configuration.packages.length > 1) { addLinkToMainTree(div); } body.addContent(div); HtmlTree divTree = new HtmlTree(HtmlTag.DIV); divTree.addStyle(HtmlStyle.contentContainer); addTree(classtree.baseclasses(), "doclet.Class_Hierarchy", divTree); addTree(classtree.baseinterfaces(), "doclet.Interface_Hierarchy", divTree); addTree(classtree.baseAnnotationTypes(), "doclet.Annotation_Type_Hierarchy", divTree); addTree(classtree.baseEnums(), "doclet.Enum_Hierarchy", divTree); body.addContent(divTree); addNavLinks(false, body); addBottom(body); printHtmlDocument(null, true, body); } /** * Get the package tree header. * * @return a content tree for the header */ protected Content getPackageTreeHeader() { String title = packagedoc.name() + " " + configuration.getText("doclet.Window_Class_Hierarchy"); Content bodyTree = getBody(true, getWindowTitle(title)); addTop(bodyTree); addNavLinks(true, bodyTree); return bodyTree; } /** * Add a link to the tree for all the packages. * * @param div the content tree to which the link will be added */ protected void addLinkToMainTree(Content div) { Content span = HtmlTree.SPAN(HtmlStyle.strong, getResource("doclet.Package_Hierarchies")); div.addContent(span); HtmlTree ul = new HtmlTree (HtmlTag.UL); ul.addStyle(HtmlStyle.horizontal); ul.addContent(getNavLinkMainTree(configuration.getText("doclet.All_Packages"))); div.addContent(ul); } /** * Get link for the previous package tree file. * * @return a content tree for the link */ protected Content getNavLinkPrevious() { if (prev == null) { return getNavLinkPrevious(null); } else { DocPath path = DocPath.relativePath(packagedoc, prev); return getNavLinkPrevious(path.resolve(DocPaths.PACKAGE_TREE)); } } /** * Get link for the next package tree file. * * @return a content tree for the link */ protected Content getNavLinkNext() { if (next == null) { return getNavLinkNext(null); } else { DocPath path = DocPath.relativePath(packagedoc, next); return getNavLinkNext(path.resolve(DocPaths.PACKAGE_TREE)); } } /** * Get link to the package summary page for the package of this tree. * * @return a content tree for the package link */ protected Content getNavLinkPackage() { Content linkContent = getHyperLink(DocPaths.PACKAGE_SUMMARY, packageLabel); Content li = HtmlTree.LI(linkContent); return li; } } ././@LongLink0000000000000000000000000000015200000000000011213 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/PackageUseWriter.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/PackageUseWriter0000644000000000000000000003050512214026367032157 0ustar 00000000000000/* * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html; import java.io.*; import java.util.*; import com.sun.javadoc.*; import com.sun.tools.doclets.formats.html.markup.*; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.*; /** * Generate package usage information. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Robert G. Field * @author Bhavesh Patel (Modified) */ public class PackageUseWriter extends SubWriterHolderWriter { final PackageDoc pkgdoc; final SortedMap> usingPackageToUsedClasses = new TreeMap>(); /** * Constructor. * * @param filename the file to be generated. * @throws IOException * @throws DocletAbortException */ public PackageUseWriter(ConfigurationImpl configuration, ClassUseMapper mapper, DocPath filename, PackageDoc pkgdoc) throws IOException { super(configuration, DocPath.forPackage(pkgdoc).resolve(filename)); this.pkgdoc = pkgdoc; // by examining all classes in this package, find what packages // use these classes - produce a map between using package and // used classes. ClassDoc[] content = pkgdoc.allClasses(); for (int i = 0; i < content.length; ++i) { ClassDoc usedClass = content[i]; Set usingClasses = mapper.classToClass.get(usedClass.qualifiedName()); if (usingClasses != null) { for (Iterator it = usingClasses.iterator(); it.hasNext(); ) { ClassDoc usingClass = it.next(); PackageDoc usingPackage = usingClass.containingPackage(); Set usedClasses = usingPackageToUsedClasses .get(usingPackage.name()); if (usedClasses == null) { usedClasses = new TreeSet(); usingPackageToUsedClasses.put(Util.getPackageName(usingPackage), usedClasses); } usedClasses.add(usedClass); } } } } /** * Generate a class page. * * @param configuration the current configuration of the doclet. * @param mapper the mapping of the class usage. * @param pkgdoc the package doc being documented. */ public static void generate(ConfigurationImpl configuration, ClassUseMapper mapper, PackageDoc pkgdoc) { PackageUseWriter pkgusegen; DocPath filename = DocPaths.PACKAGE_USE; try { pkgusegen = new PackageUseWriter(configuration, mapper, filename, pkgdoc); pkgusegen.generatePackageUseFile(); pkgusegen.close(); } catch (IOException exc) { configuration.standardmessage.error( "doclet.exception_encountered", exc.toString(), filename); throw new DocletAbortException(); } } /** * Generate the package use list. */ protected void generatePackageUseFile() throws IOException { Content body = getPackageUseHeader(); HtmlTree div = new HtmlTree(HtmlTag.DIV); div.addStyle(HtmlStyle.contentContainer); if (usingPackageToUsedClasses.isEmpty()) { div.addContent(getResource( "doclet.ClassUse_No.usage.of.0", pkgdoc.name())); } else { addPackageUse(div); } body.addContent(div); addNavLinks(false, body); addBottom(body); printHtmlDocument(null, true, body); } /** * Add the package use information. * * @param contentTree the content tree to which the package use information will be added */ protected void addPackageUse(Content contentTree) throws IOException { HtmlTree ul = new HtmlTree(HtmlTag.UL); ul.addStyle(HtmlStyle.blockList); if (configuration.packages.length > 1) { addPackageList(ul); } addClassList(ul); contentTree.addContent(ul); } /** * Add the list of packages that use the given package. * * @param contentTree the content tree to which the package list will be added */ protected void addPackageList(Content contentTree) throws IOException { Content table = HtmlTree.TABLE(0, 3, 0, useTableSummary, getTableCaption(configuration.getResource( "doclet.ClassUse_Packages.that.use.0", getPackageLink(pkgdoc, Util.getPackageName(pkgdoc))))); table.addContent(getSummaryTableHeader(packageTableHeader, "col")); Content tbody = new HtmlTree(HtmlTag.TBODY); Iterator it = usingPackageToUsedClasses.keySet().iterator(); for (int i = 0; it.hasNext(); i++) { PackageDoc pkg = configuration.root.packageNamed(it.next()); HtmlTree tr = new HtmlTree(HtmlTag.TR); if (i % 2 == 0) { tr.addStyle(HtmlStyle.altColor); } else { tr.addStyle(HtmlStyle.rowColor); } addPackageUse(pkg, tr); tbody.addContent(tr); } table.addContent(tbody); Content li = HtmlTree.LI(HtmlStyle.blockList, table); contentTree.addContent(li); } /** * Add the list of classes that use the given package. * * @param contentTree the content tree to which the class list will be added */ protected void addClassList(Content contentTree) throws IOException { String[] classTableHeader = new String[] { configuration.getText("doclet.0_and_1", configuration.getText("doclet.Class"), configuration.getText("doclet.Description")) }; Iterator itp = usingPackageToUsedClasses.keySet().iterator(); while (itp.hasNext()) { String packageName = itp.next(); PackageDoc usingPackage = configuration.root.packageNamed(packageName); HtmlTree li = new HtmlTree(HtmlTag.LI); li.addStyle(HtmlStyle.blockList); if (usingPackage != null) { li.addContent(getMarkerAnchor(usingPackage.name())); } String tableSummary = configuration.getText("doclet.Use_Table_Summary", configuration.getText("doclet.classes")); Content table = HtmlTree.TABLE(0, 3, 0, tableSummary, getTableCaption(configuration.getResource( "doclet.ClassUse_Classes.in.0.used.by.1", getPackageLink(pkgdoc, Util.getPackageName(pkgdoc)), getPackageLink(usingPackage, Util.getPackageName(usingPackage))))); table.addContent(getSummaryTableHeader(classTableHeader, "col")); Content tbody = new HtmlTree(HtmlTag.TBODY); Iterator itc = usingPackageToUsedClasses.get(packageName).iterator(); for (int i = 0; itc.hasNext(); i++) { HtmlTree tr = new HtmlTree(HtmlTag.TR); if (i % 2 == 0) { tr.addStyle(HtmlStyle.altColor); } else { tr.addStyle(HtmlStyle.rowColor); } addClassRow(itc.next(), packageName, tr); tbody.addContent(tr); } table.addContent(tbody); li.addContent(table); contentTree.addContent(li); } } /** * Add a row for the class that uses the given package. * * @param usedClass the class that uses the given package * @param packageName the name of the package to which the class belongs * @param contentTree the content tree to which the row will be added */ protected void addClassRow(ClassDoc usedClass, String packageName, Content contentTree) { DocPath dp = pathString(usedClass, DocPaths.CLASS_USE.resolve(DocPath.forName(usedClass))); Content td = HtmlTree.TD(HtmlStyle.colOne, getHyperLink(dp.fragment(packageName), new StringContent(usedClass.name()))); addIndexComment(usedClass, td); contentTree.addContent(td); } /** * Add the package use information. * * @param pkg the package that used the given package * @param contentTree the content tree to which the information will be added */ protected void addPackageUse(PackageDoc pkg, Content contentTree) throws IOException { Content tdFirst = HtmlTree.TD(HtmlStyle.colFirst, getHyperLink(Util.getPackageName(pkg), new StringContent(Util.getPackageName(pkg)))); contentTree.addContent(tdFirst); HtmlTree tdLast = new HtmlTree(HtmlTag.TD); tdLast.addStyle(HtmlStyle.colLast); if (pkg != null && pkg.name().length() != 0) { addSummaryComment(pkg, tdLast); } else { tdLast.addContent(getSpace()); } contentTree.addContent(tdLast); } /** * Get the header for the package use listing. * * @return a content tree representing the package use header */ protected Content getPackageUseHeader() { String packageText = configuration.getText("doclet.Package"); String name = pkgdoc.name(); String title = configuration.getText("doclet.Window_ClassUse_Header", packageText, name); Content bodyTree = getBody(true, getWindowTitle(title)); addTop(bodyTree); addNavLinks(true, bodyTree); ContentBuilder headContent = new ContentBuilder(); headContent.addContent(getResource("doclet.ClassUse_Title", packageText)); headContent.addContent(new HtmlTree(HtmlTag.BR)); headContent.addContent(name); Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, true, HtmlStyle.title, headContent); Content div = HtmlTree.DIV(HtmlStyle.header, heading); bodyTree.addContent(div); return bodyTree; } /** * Get this package link. * * @return a content tree for the package link */ protected Content getNavLinkPackage() { Content linkContent = getHyperLink(DocPaths.PACKAGE_SUMMARY, packageLabel); Content li = HtmlTree.LI(linkContent); return li; } /** * Get the use link. * * @return a content tree for the use link */ protected Content getNavLinkClassUse() { Content li = HtmlTree.LI(HtmlStyle.navBarCell1Rev, useLabel); return li; } /** * Get the tree link. * * @return a content tree for the tree link */ protected Content getNavLinkTree() { Content linkContent = getHyperLink(DocPaths.PACKAGE_TREE, treeLabel); Content li = HtmlTree.LI(linkContent); return li; } } ././@LongLink0000000000000000000000000000015300000000000011214 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/PackageWriterImpl.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/PackageWriterImp0000644000000000000000000002641512214026367032155 0ustar 00000000000000/* * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html; import java.io.*; import java.util.*; import com.sun.javadoc.*; import com.sun.tools.doclets.formats.html.markup.*; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.*; /** * Class to generate file for each package contents in the right-hand * frame. This will list all the Class Kinds in the package. A click on any * class-kind will update the frame with the clicked class-kind page. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Atul M Dambalkar * @author Bhavesh Patel (Modified) */ public class PackageWriterImpl extends HtmlDocletWriter implements PackageSummaryWriter { /** * The prev package name in the alpha-order list. */ protected PackageDoc prev; /** * The next package name in the alpha-order list. */ protected PackageDoc next; /** * The package being documented. */ protected PackageDoc packageDoc; /** * Constructor to construct PackageWriter object and to generate * "package-summary.html" file in the respective package directory. * For example for package "java.lang" this will generate file * "package-summary.html" file in the "java/lang" directory. It will also * create "java/lang" directory in the current or the destination directory * if it doesn't exist. * * @param configuration the configuration of the doclet. * @param packageDoc PackageDoc under consideration. * @param prev Previous package in the sorted array. * @param next Next package in the sorted array. */ public PackageWriterImpl(ConfigurationImpl configuration, PackageDoc packageDoc, PackageDoc prev, PackageDoc next) throws IOException { super(configuration, DocPath.forPackage(packageDoc).resolve(DocPaths.PACKAGE_SUMMARY)); this.prev = prev; this.next = next; this.packageDoc = packageDoc; } /** * {@inheritDoc} */ public Content getPackageHeader(String heading) { String pkgName = packageDoc.name(); Content bodyTree = getBody(true, getWindowTitle(pkgName)); addTop(bodyTree); addNavLinks(true, bodyTree); HtmlTree div = new HtmlTree(HtmlTag.DIV); div.addStyle(HtmlStyle.header); Content annotationContent = new HtmlTree(HtmlTag.P); addAnnotationInfo(packageDoc, annotationContent); div.addContent(annotationContent); Content tHeading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, true, HtmlStyle.title, packageLabel); tHeading.addContent(getSpace()); Content packageHead = new StringContent(heading); tHeading.addContent(packageHead); div.addContent(tHeading); addDeprecationInfo(div); if (packageDoc.inlineTags().length > 0 && ! configuration.nocomment) { HtmlTree docSummaryDiv = new HtmlTree(HtmlTag.DIV); docSummaryDiv.addStyle(HtmlStyle.docSummary); addSummaryComment(packageDoc, docSummaryDiv); div.addContent(docSummaryDiv); Content space = getSpace(); Content descLink = getHyperLink(DocLink.fragment("package_description"), descriptionLabel, "", ""); Content descPara = new HtmlTree(HtmlTag.P, seeLabel, space, descLink); div.addContent(descPara); } bodyTree.addContent(div); return bodyTree; } /** * {@inheritDoc} */ public Content getContentHeader() { HtmlTree div = new HtmlTree(HtmlTag.DIV); div.addStyle(HtmlStyle.contentContainer); return div; } /** * Add the package deprecation information to the documentation tree. * * @param div the content tree to which the deprecation information will be added */ public void addDeprecationInfo(Content div) { Tag[] deprs = packageDoc.tags("deprecated"); if (Util.isDeprecated(packageDoc)) { HtmlTree deprDiv = new HtmlTree(HtmlTag.DIV); deprDiv.addStyle(HtmlStyle.deprecatedContent); Content deprPhrase = HtmlTree.SPAN(HtmlStyle.strong, deprecatedPhrase); deprDiv.addContent(deprPhrase); if (deprs.length > 0) { Tag[] commentTags = deprs[0].inlineTags(); if (commentTags.length > 0) { addInlineDeprecatedComment(packageDoc, deprs[0], deprDiv); } } div.addContent(deprDiv); } } /** * {@inheritDoc} */ public Content getSummaryHeader() { HtmlTree ul = new HtmlTree(HtmlTag.UL); ul.addStyle(HtmlStyle.blockList); return ul; } /** * {@inheritDoc} */ public void addClassesSummary(ClassDoc[] classes, String label, String tableSummary, String[] tableHeader, Content summaryContentTree) { if(classes.length > 0) { Arrays.sort(classes); Content caption = getTableCaption(new RawHtml(label)); Content table = HtmlTree.TABLE(HtmlStyle.packageSummary, 0, 3, 0, tableSummary, caption); table.addContent(getSummaryTableHeader(tableHeader, "col")); Content tbody = new HtmlTree(HtmlTag.TBODY); for (int i = 0; i < classes.length; i++) { if (!Util.isCoreClass(classes[i]) || !configuration.isGeneratedDoc(classes[i])) { continue; } Content classContent = getLink(new LinkInfoImpl( configuration, LinkInfoImpl.Kind.PACKAGE, classes[i])); Content tdClass = HtmlTree.TD(HtmlStyle.colFirst, classContent); HtmlTree tr = HtmlTree.TR(tdClass); if (i%2 == 0) tr.addStyle(HtmlStyle.altColor); else tr.addStyle(HtmlStyle.rowColor); HtmlTree tdClassDescription = new HtmlTree(HtmlTag.TD); tdClassDescription.addStyle(HtmlStyle.colLast); if (Util.isDeprecated(classes[i])) { tdClassDescription.addContent(deprecatedLabel); if (classes[i].tags("deprecated").length > 0) { addSummaryDeprecatedComment(classes[i], classes[i].tags("deprecated")[0], tdClassDescription); } } else addSummaryComment(classes[i], tdClassDescription); tr.addContent(tdClassDescription); tbody.addContent(tr); } table.addContent(tbody); Content li = HtmlTree.LI(HtmlStyle.blockList, table); summaryContentTree.addContent(li); } } /** * {@inheritDoc} */ public void addPackageDescription(Content packageContentTree) { if (packageDoc.inlineTags().length > 0) { packageContentTree.addContent(getMarkerAnchor("package_description")); Content h2Content = new StringContent( configuration.getText("doclet.Package_Description", packageDoc.name())); packageContentTree.addContent(HtmlTree.HEADING(HtmlConstants.PACKAGE_HEADING, true, h2Content)); addInlineComment(packageDoc, packageContentTree); } } /** * {@inheritDoc} */ public void addPackageTags(Content packageContentTree) { addTagsInfo(packageDoc, packageContentTree); } /** * {@inheritDoc} */ public void addPackageFooter(Content contentTree) { addNavLinks(false, contentTree); addBottom(contentTree); } /** * {@inheritDoc} */ public void printDocument(Content contentTree) throws IOException { printHtmlDocument(configuration.metakeywords.getMetaKeywords(packageDoc), true, contentTree); } /** * Get "Use" link for this pacakge in the navigation bar. * * @return a content tree for the class use link */ protected Content getNavLinkClassUse() { Content useLink = getHyperLink(DocPaths.PACKAGE_USE, useLabel, "", ""); Content li = HtmlTree.LI(useLink); return li; } /** * Get "PREV PACKAGE" link in the navigation bar. * * @return a content tree for the previous link */ public Content getNavLinkPrevious() { Content li; if (prev == null) { li = HtmlTree.LI(prevpackageLabel); } else { DocPath path = DocPath.relativePath(packageDoc, prev); li = HtmlTree.LI(getHyperLink(path.resolve(DocPaths.PACKAGE_SUMMARY), prevpackageLabel, "", "")); } return li; } /** * Get "NEXT PACKAGE" link in the navigation bar. * * @return a content tree for the next link */ public Content getNavLinkNext() { Content li; if (next == null) { li = HtmlTree.LI(nextpackageLabel); } else { DocPath path = DocPath.relativePath(packageDoc, next); li = HtmlTree.LI(getHyperLink(path.resolve(DocPaths.PACKAGE_SUMMARY), nextpackageLabel, "", "")); } return li; } /** * Get "Tree" link in the navigation bar. This will be link to the package * tree file. * * @return a content tree for the tree link */ protected Content getNavLinkTree() { Content useLink = getHyperLink(DocPaths.PACKAGE_TREE, treeLabel, "", ""); Content li = HtmlTree.LI(useLink); return li; } /** * Highlight "Package" in the navigation bar, as this is the package page. * * @return a content tree for the package link */ protected Content getNavLinkPackage() { Content li = HtmlTree.LI(HtmlStyle.navBarCell1Rev, packageLabel); return li; } } ././@LongLink0000000000000000000000000000016100000000000011213 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/ProfileIndexFrameWriter.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/ProfileIndexFram0000644000000000000000000001447412214026367032157 0ustar 00000000000000/* * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html; import java.io.*; import com.sun.tools.javac.sym.Profiles; import com.sun.tools.doclets.formats.html.markup.*; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.*; import com.sun.tools.javac.jvm.Profile; /** * Generate the profile index for the left-hand frame in the generated output. * A click on the profile name in this frame will update the page in the top * left hand frame with the listing of packages of the clicked profile. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Bhavesh Patel */ public class ProfileIndexFrameWriter extends AbstractProfileIndexWriter { /** * Construct the ProfileIndexFrameWriter object. * * @param configuration the configuration object * @param filename Name of the profile index file to be generated. */ public ProfileIndexFrameWriter(ConfigurationImpl configuration, DocPath filename) throws IOException { super(configuration, filename); } /** * Generate the profile index file named "profile-overview-frame.html". * @throws DocletAbortException * @param configuration the configuration object */ public static void generate(ConfigurationImpl configuration) { ProfileIndexFrameWriter profilegen; DocPath filename = DocPaths.PROFILE_OVERVIEW_FRAME; try { profilegen = new ProfileIndexFrameWriter(configuration, filename); profilegen.buildProfileIndexFile("doclet.Window_Overview", false); profilegen.close(); } catch (IOException exc) { configuration.standardmessage.error( "doclet.exception_encountered", exc.toString(), filename); throw new DocletAbortException(); } } /** * {@inheritDoc} */ protected void addProfilesList(Profiles profiles, String text, String tableSummary, Content body) { Content heading = HtmlTree.HEADING(HtmlConstants.PROFILE_HEADING, true, profilesLabel); Content div = HtmlTree.DIV(HtmlStyle.indexContainer, heading); HtmlTree ul = new HtmlTree(HtmlTag.UL); ul.setTitle(profilesLabel); for (int i = 1; i < profiles.getProfileCount(); i++) { ul.addContent(getProfile(i)); } div.addContent(ul); body.addContent(div); } /** * Gets each profile name as a separate link. * * @param profile the profile being documented * @return content for the profile link */ protected Content getProfile(int profile) { Content profileLinkContent; Content profileLabel; String profileName = (Profile.lookup(profile)).name; profileLabel = new StringContent(profileName); profileLinkContent = getHyperLink(DocPaths.profileFrame(profileName), profileLabel, "", "packageListFrame"); Content li = HtmlTree.LI(profileLinkContent); return li; } /** * {@inheritDoc} */ protected void addNavigationBarHeader(Content body) { Content headerContent; if (configuration.packagesheader.length() > 0) { headerContent = new RawHtml(replaceDocRootDir(configuration.packagesheader)); } else { headerContent = new RawHtml(replaceDocRootDir(configuration.header)); } Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, true, HtmlStyle.bar, headerContent); body.addContent(heading); } /** * Do nothing as there is no overview information in this page. */ protected void addOverviewHeader(Content body) { } /** * Adds "All Classes" link for the top of the left-hand frame page to the * documentation tree. * * @param div the Content object to which the all classes link should be added */ protected void addAllClassesLink(Content div) { Content linkContent = getHyperLink(DocPaths.ALLCLASSES_FRAME, allclassesLabel, "", "packageFrame"); Content span = HtmlTree.SPAN(linkContent); div.addContent(span); } /** * Adds "All Packages" link for the top of the left-hand frame page to the * documentation tree. * * @param div the Content object to which the all packages link should be added */ protected void addAllPackagesLink(Content div) { Content linkContent = getHyperLink(DocPaths.OVERVIEW_FRAME, allpackagesLabel, "", "packageListFrame"); Content span = HtmlTree.SPAN(linkContent); div.addContent(span); } /** * {@inheritDoc} */ protected void addNavigationBarFooter(Content body) { Content p = HtmlTree.P(getSpace()); body.addContent(p); } protected void addProfilePackagesList(Profiles profiles, String text, String tableSummary, Content body, String profileName) { } } ././@LongLink0000000000000000000000000000016300000000000011215 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/ProfilePackageFrameWriter.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/ProfilePackageFr0000644000000000000000000002076312214026367032123 0ustar 00000000000000/* * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html; import java.io.*; import java.util.*; import com.sun.javadoc.*; import com.sun.tools.javac.jvm.Profile; import com.sun.tools.doclets.formats.html.markup.*; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.*; /** * Class to generate file for each package contents of a profile in the left-hand bottom * frame. This will list all the Class Kinds in the package for a profile. A click on any * class-kind will update the right-hand frame with the clicked class-kind page. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Bhavesh Patel */ public class ProfilePackageFrameWriter extends HtmlDocletWriter { /** * The package being documented. */ private PackageDoc packageDoc; /** * Constructor to construct ProfilePackageFrameWriter object and to generate * "profilename-package-frame.html" file in the respective package directory. * For example for profile compact1 and package "java.lang" this will generate file * "compact1-package-frame.html" file in the "java/lang" directory. It will also * create "java/lang" directory in the current or the destination directory * if it doesn't exist. * * @param configuration the configuration of the doclet. * @param packageDoc PackageDoc under consideration. * @param profileName the name of the profile being documented */ public ProfilePackageFrameWriter(ConfigurationImpl configuration, PackageDoc packageDoc, String profileName) throws IOException { super(configuration, DocPath.forPackage(packageDoc).resolve( DocPaths.profilePackageFrame(profileName))); this.packageDoc = packageDoc; } /** * Generate a profile package summary page for the left-hand bottom frame. Construct * the ProfilePackageFrameWriter object and then uses it generate the file. * * @param configuration the current configuration of the doclet. * @param packageDoc The package for which "profilename-package-frame.html" is to be generated. * @param profileValue the value of the profile being documented */ public static void generate(ConfigurationImpl configuration, PackageDoc packageDoc, int profileValue) { ProfilePackageFrameWriter profpackgen; try { String profileName = Profile.lookup(profileValue).name; profpackgen = new ProfilePackageFrameWriter(configuration, packageDoc, profileName); StringBuilder winTitle = new StringBuilder(profileName); String sep = " - "; winTitle.append(sep); String pkgName = Util.getPackageName(packageDoc); winTitle.append(pkgName); Content body = profpackgen.getBody(false, profpackgen.getWindowTitle(winTitle.toString())); Content profName = new StringContent(profileName); Content sepContent = new StringContent(sep); Content pkgNameContent = new RawHtml(pkgName); Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, HtmlStyle.bar, profpackgen.getTargetProfileLink("classFrame", profName, profileName)); heading.addContent(sepContent); heading.addContent(profpackgen.getTargetProfilePackageLink(packageDoc, "classFrame", pkgNameContent, profileName)); body.addContent(heading); HtmlTree div = new HtmlTree(HtmlTag.DIV); div.addStyle(HtmlStyle.indexContainer); profpackgen.addClassListing(div, profileValue); body.addContent(div); profpackgen.printHtmlDocument( configuration.metakeywords.getMetaKeywords(packageDoc), false, body); profpackgen.close(); } catch (IOException exc) { configuration.standardmessage.error( "doclet.exception_encountered", exc.toString(), DocPaths.PACKAGE_FRAME.getPath()); throw new DocletAbortException(); } } /** * Add class listing for all the classes in this package. Divide class * listing as per the class kind and generate separate listing for * Classes, Interfaces, Exceptions and Errors. * * @param contentTree the content tree to which the listing will be added * @param profileValue the value of the profile being documented */ protected void addClassListing(Content contentTree, int profileValue) { if (packageDoc.isIncluded()) { addClassKindListing(packageDoc.interfaces(), getResource("doclet.Interfaces"), contentTree, profileValue); addClassKindListing(packageDoc.ordinaryClasses(), getResource("doclet.Classes"), contentTree, profileValue); addClassKindListing(packageDoc.enums(), getResource("doclet.Enums"), contentTree, profileValue); addClassKindListing(packageDoc.exceptions(), getResource("doclet.Exceptions"), contentTree, profileValue); addClassKindListing(packageDoc.errors(), getResource("doclet.Errors"), contentTree, profileValue); addClassKindListing(packageDoc.annotationTypes(), getResource("doclet.AnnotationTypes"), contentTree, profileValue); } } /** * Add specific class kind listing. Also add label to the listing. * * @param arr Array of specific class kinds, namely Class or Interface or Exception or Error * @param labelContent content tree of the label to be added * @param contentTree the content tree to which the class kind listing will be added * @param profileValue the value of the profile being documented */ protected void addClassKindListing(ClassDoc[] arr, Content labelContent, Content contentTree, int profileValue) { if(arr.length > 0) { Arrays.sort(arr); boolean printedHeader = false; HtmlTree ul = new HtmlTree(HtmlTag.UL); ul.setTitle(labelContent); for (int i = 0; i < arr.length; i++) { if (!isTypeInProfile(arr[i], profileValue)) { continue; } if (!Util.isCoreClass(arr[i]) || ! configuration.isGeneratedDoc(arr[i])) { continue; } if (!printedHeader) { Content heading = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, true, labelContent); contentTree.addContent(heading); printedHeader = true; } Content arr_i_name = new StringContent(arr[i].name()); if (arr[i].isInterface()) arr_i_name = HtmlTree.I(arr_i_name); Content link = getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.PACKAGE_FRAME, arr[i]).label(arr_i_name).target("classFrame")); Content li = HtmlTree.LI(link); ul.addContent(li); } contentTree.addContent(ul); } } } ././@LongLink0000000000000000000000000000017000000000000011213 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/ProfilePackageIndexFrameWriter.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/ProfilePackageIn0000644000000000000000000001711512214026367032117 0ustar 00000000000000/* * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html; import java.io.*; import com.sun.javadoc.*; import com.sun.tools.javac.sym.Profiles; import com.sun.tools.doclets.formats.html.markup.*; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.*; /** * Generate the profile package index for the left-hand frame in the generated output. * A click on the package name in this frame will update the page in the bottom * left hand frame with the listing of contents of the clicked profile package. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Bhavesh Patel */ public class ProfilePackageIndexFrameWriter extends AbstractProfileIndexWriter { /** * Construct the ProfilePackageIndexFrameWriter object. * * @param configuration the configuration object * @param filename Name of the package index file to be generated. */ public ProfilePackageIndexFrameWriter(ConfigurationImpl configuration, DocPath filename) throws IOException { super(configuration, filename); } /** * Generate the profile package index file. * @throws DocletAbortException * @param configuration the configuration object * @param profileName the name of the profile being documented */ public static void generate(ConfigurationImpl configuration, String profileName) { ProfilePackageIndexFrameWriter profpackgen; DocPath filename = DocPaths.profileFrame(profileName); try { profpackgen = new ProfilePackageIndexFrameWriter(configuration, filename); profpackgen.buildProfilePackagesIndexFile("doclet.Window_Overview", false, profileName); profpackgen.close(); } catch (IOException exc) { configuration.standardmessage.error( "doclet.exception_encountered", exc.toString(), filename); throw new DocletAbortException(); } } /** * {@inheritDoc} */ protected void addProfilePackagesList(Profiles profiles, String text, String tableSummary, Content body, String profileName) { Content profNameContent = new StringContent(profileName); Content heading = HtmlTree.HEADING(HtmlConstants.PACKAGE_HEADING, true, getTargetProfileLink("classFrame", profNameContent, profileName)); heading.addContent(getSpace()); heading.addContent(packagesLabel); Content div = HtmlTree.DIV(HtmlStyle.indexContainer, heading); HtmlTree ul = new HtmlTree(HtmlTag.UL); ul.setTitle(packagesLabel); PackageDoc[] packages = configuration.profilePackages.get(profileName); for (int i = 0; i < packages.length; i++) { if ((!(configuration.nodeprecated && Util.isDeprecated(packages[i])))) { ul.addContent(getPackage(packages[i], profileName)); } } div.addContent(ul); body.addContent(div); } /** * Gets each package name as a separate link. * * @param pd PackageDoc * @param profileName the name of the profile being documented * @return content for the package link */ protected Content getPackage(PackageDoc pd, String profileName) { Content packageLinkContent; Content pkgLabel; if (pd.name().length() > 0) { pkgLabel = getPackageLabel(pd.name()); packageLinkContent = getHyperLink(pathString(pd, DocPaths.profilePackageFrame(profileName)), pkgLabel, "", "packageFrame"); } else { pkgLabel = new StringContent(""); packageLinkContent = getHyperLink(DocPaths.PACKAGE_FRAME, pkgLabel, "", "packageFrame"); } Content li = HtmlTree.LI(packageLinkContent); return li; } /** * {@inheritDoc} */ protected void addNavigationBarHeader(Content body) { Content headerContent; if (configuration.packagesheader.length() > 0) { headerContent = new RawHtml(replaceDocRootDir(configuration.packagesheader)); } else { headerContent = new RawHtml(replaceDocRootDir(configuration.header)); } Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, true, HtmlStyle.bar, headerContent); body.addContent(heading); } /** * Do nothing as there is no overview information in this page. */ protected void addOverviewHeader(Content body) { } protected void addProfilesList(Profiles profiles, String text, String tableSummary, Content body) { } /** * Adds "All Classes" link for the top of the left-hand frame page to the * documentation tree. * * @param div the Content object to which the all classes link should be added */ protected void addAllClassesLink(Content div) { Content linkContent = getHyperLink(DocPaths.ALLCLASSES_FRAME, allclassesLabel, "", "packageFrame"); Content span = HtmlTree.SPAN(linkContent); div.addContent(span); } /** * Adds "All Packages" link for the top of the left-hand frame page to the * documentation tree. * * @param div the Content object to which the all packages link should be added */ protected void addAllPackagesLink(Content div) { Content linkContent = getHyperLink(DocPaths.OVERVIEW_FRAME, allpackagesLabel, "", "packageListFrame"); Content span = HtmlTree.SPAN(linkContent); div.addContent(span); } /** * Adds "All Profiles" link for the top of the left-hand frame page to the * documentation tree. * * @param div the Content object to which the all profiles link should be added */ protected void addAllProfilesLink(Content div) { Content linkContent = getHyperLink(DocPaths.PROFILE_OVERVIEW_FRAME, allprofilesLabel, "", "packageListFrame"); Content span = HtmlTree.SPAN(linkContent); div.addContent(span); } /** * {@inheritDoc} */ protected void addNavigationBarFooter(Content body) { Content p = HtmlTree.P(getSpace()); body.addContent(p); } } ././@LongLink0000000000000000000000000000016200000000000011214 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/ProfilePackageWriterImpl.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/ProfilePackageWr0000644000000000000000000002432412214026367032141 0ustar 00000000000000/* * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html; import java.io.*; import java.util.*; import com.sun.javadoc.*; import com.sun.tools.javac.jvm.Profile; import com.sun.tools.doclets.formats.html.markup.*; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.*; /** * Class to generate file for each profile package contents in the right-hand * frame. This will list all the Class Kinds in the package. A click on any * class-kind will update the frame with the clicked class-kind page. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Bhavesh Patel */ public class ProfilePackageWriterImpl extends HtmlDocletWriter implements ProfilePackageSummaryWriter { /** * The prev package name in the alpha-order list. */ protected PackageDoc prev; /** * The next package name in the alpha-order list. */ protected PackageDoc next; /** * The profile package being documented. */ protected PackageDoc packageDoc; /** * The name of the profile being documented. */ protected String profileName; /** * The value of the profile being documented. */ protected int profileValue; /** * Constructor to construct ProfilePackageWriter object and to generate * "profilename-package-summary.html" file in the respective package directory. * For example for profile compact1 and package "java.lang" this will generate file * "compact1-package-summary.html" file in the "java/lang" directory. It will also * create "java/lang" directory in the current or the destination directory * if it doesn't exist. * * @param configuration the configuration of the doclet. * @param packageDoc PackageDoc under consideration. * @param prev Previous package in the sorted array. * @param next Next package in the sorted array. * @param profile The profile being documented. */ public ProfilePackageWriterImpl(ConfigurationImpl configuration, PackageDoc packageDoc, PackageDoc prev, PackageDoc next, Profile profile) throws IOException { super(configuration, DocPath.forPackage(packageDoc).resolve( DocPaths.profilePackageSummary(profile.name))); this.prev = prev; this.next = next; this.packageDoc = packageDoc; this.profileName = profile.name; this.profileValue = profile.value; } /** * {@inheritDoc} */ public Content getPackageHeader(String heading) { String pkgName = packageDoc.name(); Content bodyTree = getBody(true, getWindowTitle(pkgName)); addTop(bodyTree); addNavLinks(true, bodyTree); HtmlTree div = new HtmlTree(HtmlTag.DIV); div.addStyle(HtmlStyle.header); Content profileContent = new StringContent(profileName); Content profileNameDiv = HtmlTree.DIV(HtmlStyle.subTitle, profileContent); div.addContent(profileNameDiv); Content annotationContent = new HtmlTree(HtmlTag.P); addAnnotationInfo(packageDoc, annotationContent); div.addContent(annotationContent); Content tHeading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, true, HtmlStyle.title, packageLabel); tHeading.addContent(getSpace()); Content packageHead = new RawHtml(heading); tHeading.addContent(packageHead); div.addContent(tHeading); addDeprecationInfo(div); if (packageDoc.inlineTags().length > 0 && ! configuration.nocomment) { HtmlTree docSummaryDiv = new HtmlTree(HtmlTag.DIV); docSummaryDiv.addStyle(HtmlStyle.docSummary); addSummaryComment(packageDoc, docSummaryDiv); div.addContent(docSummaryDiv); Content space = getSpace(); Content descLink = getHyperLink(DocLink.fragment("package_description"), descriptionLabel, "", ""); Content descPara = new HtmlTree(HtmlTag.P, seeLabel, space, descLink); div.addContent(descPara); } bodyTree.addContent(div); return bodyTree; } /** * {@inheritDoc} */ public Content getContentHeader() { HtmlTree div = new HtmlTree(HtmlTag.DIV); div.addStyle(HtmlStyle.contentContainer); return div; } /** * Add the package deprecation information to the documentation tree. * * @param div the content tree to which the deprecation information will be added */ public void addDeprecationInfo(Content div) { Tag[] deprs = packageDoc.tags("deprecated"); if (Util.isDeprecated(packageDoc)) { HtmlTree deprDiv = new HtmlTree(HtmlTag.DIV); deprDiv.addStyle(HtmlStyle.deprecatedContent); Content deprPhrase = HtmlTree.SPAN(HtmlStyle.strong, deprecatedPhrase); deprDiv.addContent(deprPhrase); if (deprs.length > 0) { Tag[] commentTags = deprs[0].inlineTags(); if (commentTags.length > 0) { addInlineDeprecatedComment(packageDoc, deprs[0], deprDiv); } } div.addContent(deprDiv); } } /** * {@inheritDoc} */ public void addClassesSummary(ClassDoc[] classes, String label, String tableSummary, String[] tableHeader, Content packageSummaryContentTree) { addClassesSummary(classes, label, tableSummary, tableHeader, packageSummaryContentTree, profileValue); } /** * {@inheritDoc} */ public Content getSummaryHeader() { HtmlTree ul = new HtmlTree(HtmlTag.UL); ul.addStyle(HtmlStyle.blockList); return ul; } /** * {@inheritDoc} */ public void addPackageDescription(Content packageContentTree) { if (packageDoc.inlineTags().length > 0) { packageContentTree.addContent(getMarkerAnchor("package_description")); Content h2Content = new StringContent( configuration.getText("doclet.Package_Description", packageDoc.name())); packageContentTree.addContent(HtmlTree.HEADING(HtmlConstants.PACKAGE_HEADING, true, h2Content)); addInlineComment(packageDoc, packageContentTree); } } /** * {@inheritDoc} */ public void addPackageTags(Content packageContentTree) { addTagsInfo(packageDoc, packageContentTree); } /** * {@inheritDoc} */ public void addPackageFooter(Content contentTree) { addNavLinks(false, contentTree); addBottom(contentTree); } /** * {@inheritDoc} */ public void printDocument(Content contentTree) throws IOException { printHtmlDocument(configuration.metakeywords.getMetaKeywords(packageDoc), true, contentTree); } /** * Get "Use" link for this package in the navigation bar. * * @return a content tree for the class use link */ protected Content getNavLinkClassUse() { Content useLink = getHyperLink(DocPaths.PACKAGE_USE, useLabel, "", ""); Content li = HtmlTree.LI(useLink); return li; } /** * Get "PREV PACKAGE" link in the navigation bar. * * @return a content tree for the previous link */ public Content getNavLinkPrevious() { Content li; if (prev == null) { li = HtmlTree.LI(prevpackageLabel); } else { DocPath path = DocPath.relativePath(packageDoc, prev); li = HtmlTree.LI(getHyperLink(path.resolve(DocPaths.profilePackageSummary(profileName)), prevpackageLabel, "", "")); } return li; } /** * Get "NEXT PACKAGE" link in the navigation bar. * * @return a content tree for the next link */ public Content getNavLinkNext() { Content li; if (next == null) { li = HtmlTree.LI(nextpackageLabel); } else { DocPath path = DocPath.relativePath(packageDoc, next); li = HtmlTree.LI(getHyperLink(path.resolve(DocPaths.profilePackageSummary(profileName)), nextpackageLabel, "", "")); } return li; } /** * Get "Tree" link in the navigation bar. This will be link to the package * tree file. * * @return a content tree for the tree link */ protected Content getNavLinkTree() { Content useLink = getHyperLink(DocPaths.PACKAGE_TREE, treeLabel, "", ""); Content li = HtmlTree.LI(useLink); return li; } /** * Highlight "Package" in the navigation bar, as this is the package page. * * @return a content tree for the package link */ protected Content getNavLinkPackage() { Content li = HtmlTree.LI(HtmlStyle.navBarCell1Rev, packageLabel); return li; } } ././@LongLink0000000000000000000000000000015300000000000011214 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/ProfileWriterImpl.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/ProfileWriterImp0000644000000000000000000001536712214026367032226 0ustar 00000000000000/* * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html; import java.io.*; import java.util.*; import com.sun.javadoc.*; import com.sun.tools.javac.jvm.Profile; import com.sun.tools.doclets.formats.html.markup.*; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.*; /** * Class to generate file for each profile contents in the right-hand * frame. This will list all the packages and Class Kinds in the profile. A click on any * class-kind will update the frame with the clicked class-kind page. A click on any * package will update the frame with the clicked profile package page. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Bhavesh Patel */ public class ProfileWriterImpl extends HtmlDocletWriter implements ProfileSummaryWriter { /** * The prev profile name in the alpha-order list. */ protected Profile prevProfile; /** * The next profile name in the alpha-order list. */ protected Profile nextProfile; /** * The profile being documented. */ protected Profile profile; /** * Constructor to construct ProfileWriter object and to generate * "profileName-summary.html" file. * * @param configuration the configuration of the doclet. * @param profile Profile under consideration. * @param prevProfile Previous profile in the sorted array. * @param nextProfile Next profile in the sorted array. */ public ProfileWriterImpl(ConfigurationImpl configuration, Profile profile, Profile prevProfile, Profile nextProfile) throws IOException { super(configuration, DocPaths.profileSummary(profile.name)); this.prevProfile = prevProfile; this.nextProfile = nextProfile; this.profile = profile; } /** * {@inheritDoc} */ public Content getProfileHeader(String heading) { String profileName = profile.name; Content bodyTree = getBody(true, getWindowTitle(profileName)); addTop(bodyTree); addNavLinks(true, bodyTree); HtmlTree div = new HtmlTree(HtmlTag.DIV); div.addStyle(HtmlStyle.header); Content tHeading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, true, HtmlStyle.title, profileLabel); tHeading.addContent(getSpace()); Content profileHead = new RawHtml(heading); tHeading.addContent(profileHead); div.addContent(tHeading); bodyTree.addContent(div); return bodyTree; } /** * {@inheritDoc} */ public Content getContentHeader() { HtmlTree div = new HtmlTree(HtmlTag.DIV); div.addStyle(HtmlStyle.contentContainer); return div; } /** * {@inheritDoc} */ public Content getSummaryHeader() { HtmlTree li = new HtmlTree(HtmlTag.LI); li.addStyle(HtmlStyle.blockList); return li; } /** * {@inheritDoc} */ public Content getSummaryTree(Content summaryContentTree) { HtmlTree ul = HtmlTree.UL(HtmlStyle.blockList, summaryContentTree); HtmlTree div = HtmlTree.DIV(HtmlStyle.summary, ul); return div; } /** * {@inheritDoc} */ public Content getPackageSummaryHeader(PackageDoc pkg) { Content pkgName = getTargetProfilePackageLink(pkg, "classFrame", new StringContent(pkg.name()), profile.name); Content heading = HtmlTree.HEADING(HtmlTag.H3, pkgName); HtmlTree li = HtmlTree.LI(HtmlStyle.blockList, heading); return li; } /** * {@inheritDoc} */ public Content getPackageSummaryTree(Content packageSummaryContentTree) { HtmlTree ul = HtmlTree.UL(HtmlStyle.blockList, packageSummaryContentTree); return ul; } /** * {@inheritDoc} */ public void addClassesSummary(ClassDoc[] classes, String label, String tableSummary, String[] tableHeader, Content packageSummaryContentTree) { addClassesSummary(classes, label, tableSummary, tableHeader, packageSummaryContentTree, profile.value); } /** * {@inheritDoc} */ public void addProfileFooter(Content contentTree) { addNavLinks(false, contentTree); addBottom(contentTree); } /** * {@inheritDoc} */ public void printDocument(Content contentTree) throws IOException { printHtmlDocument(configuration.metakeywords.getMetaKeywords(profile), true, contentTree); } /** * Get "PREV PROFILE" link in the navigation bar. * * @return a content tree for the previous link */ public Content getNavLinkPrevious() { Content li; if (prevProfile == null) { li = HtmlTree.LI(prevprofileLabel); } else { li = HtmlTree.LI(getHyperLink(pathToRoot.resolve(DocPaths.profileSummary( prevProfile.name)), prevprofileLabel, "", "")); } return li; } /** * Get "NEXT PROFILE" link in the navigation bar. * * @return a content tree for the next link */ public Content getNavLinkNext() { Content li; if (nextProfile == null) { li = HtmlTree.LI(nextprofileLabel); } else { li = HtmlTree.LI(getHyperLink(pathToRoot.resolve(DocPaths.profileSummary( nextProfile.name)), nextprofileLabel, "", "")); } return li; } } ././@LongLink0000000000000000000000000000015400000000000011215 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/PropertyWriterImpl.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/PropertyWriterIm0000644000000000000000000002557312214026367032272 0ustar 00000000000000/* * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html; import java.io.*; import com.sun.javadoc.*; import com.sun.tools.doclets.formats.html.markup.*; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.*; /** * Writes property documentation in HTML format. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Robert Field * @author Atul M Dambalkar * @author Jamie Ho (rewrite) * @author Bhavesh Patel (Modified) */ public class PropertyWriterImpl extends AbstractMemberWriter implements PropertyWriter, MemberSummaryWriter { public PropertyWriterImpl(SubWriterHolderWriter writer, ClassDoc classdoc) { super(writer, classdoc); } /** * {@inheritDoc} */ public Content getMemberSummaryHeader(ClassDoc classDoc, Content memberSummaryTree) { memberSummaryTree.addContent(HtmlConstants.START_OF_PROPERTY_SUMMARY); Content memberTree = writer.getMemberTreeHeader(); writer.addSummaryHeader(this, classDoc, memberTree); return memberTree; } /** * {@inheritDoc} */ public Content getPropertyDetailsTreeHeader(ClassDoc classDoc, Content memberDetailsTree) { memberDetailsTree.addContent(HtmlConstants.START_OF_PROPERTY_DETAILS); Content propertyDetailsTree = writer.getMemberTreeHeader(); propertyDetailsTree.addContent(writer.getMarkerAnchor("property_detail")); Content heading = HtmlTree.HEADING(HtmlConstants.DETAILS_HEADING, writer.propertyDetailsLabel); propertyDetailsTree.addContent(heading); return propertyDetailsTree; } /** * {@inheritDoc} */ public Content getPropertyDocTreeHeader(MethodDoc property, Content propertyDetailsTree) { propertyDetailsTree.addContent( writer.getMarkerAnchor(property.name())); Content propertyDocTree = writer.getMemberTreeHeader(); Content heading = new HtmlTree(HtmlConstants.MEMBER_HEADING); heading.addContent(property.name().substring(0, property.name().lastIndexOf("Property"))); propertyDocTree.addContent(heading); return propertyDocTree; } /** * {@inheritDoc} */ public Content getSignature(MethodDoc property) { Content pre = new HtmlTree(HtmlTag.PRE); writer.addAnnotationInfo(property, pre); addModifiers(property, pre); Content propertylink = writer.getLink(new LinkInfoImpl( configuration, LinkInfoImpl.Kind.MEMBER, property.returnType())); pre.addContent(propertylink); pre.addContent(" "); if (configuration.linksource) { Content propertyName = new StringContent(property.name()); writer.addSrcLink(property, propertyName, pre); } else { addName(property.name(), pre); } return pre; } /** * {@inheritDoc} */ public void addDeprecated(MethodDoc property, Content propertyDocTree) { } /** * {@inheritDoc} */ public void addComments(MethodDoc property, Content propertyDocTree) { ClassDoc holder = property.containingClass(); if (property.inlineTags().length > 0) { if (holder.equals(classdoc) || (! (holder.isPublic() || Util.isLinkable(holder, configuration)))) { writer.addInlineComment(property, propertyDocTree); } else { Content link = writer.getDocLink(LinkInfoImpl.Kind.PROPERTY_DOC_COPY, holder, property, holder.isIncluded() ? holder.typeName() : holder.qualifiedTypeName(), false); Content codeLink = HtmlTree.CODE(link); Content strong = HtmlTree.STRONG(holder.isClass()? writer.descfrmClassLabel : writer.descfrmInterfaceLabel); strong.addContent(writer.getSpace()); strong.addContent(codeLink); propertyDocTree.addContent(HtmlTree.DIV(HtmlStyle.block, strong)); writer.addInlineComment(property, propertyDocTree); } } } /** * {@inheritDoc} */ public void addTags(MethodDoc property, Content propertyDocTree) { writer.addTagsInfo(property, propertyDocTree); } /** * {@inheritDoc} */ public Content getPropertyDetails(Content propertyDetailsTree) { return getMemberTree(propertyDetailsTree); } /** * {@inheritDoc} */ public Content getPropertyDoc(Content propertyDocTree, boolean isLastContent) { return getMemberTree(propertyDocTree, isLastContent); } /** * Close the writer. */ public void close() throws IOException { writer.close(); } public int getMemberKind() { return VisibleMemberMap.PROPERTIES; } /** * {@inheritDoc} */ public void addSummaryLabel(Content memberTree) { Content label = HtmlTree.HEADING(HtmlConstants.SUMMARY_HEADING, writer.getResource("doclet.Property_Summary")); memberTree.addContent(label); } /** * {@inheritDoc} */ public String getTableSummary() { return configuration.getText("doclet.Member_Table_Summary", configuration.getText("doclet.Property_Summary"), configuration.getText("doclet.properties")); } /** * {@inheritDoc} */ public Content getCaption() { return configuration.getResource("doclet.Properties"); } /** * {@inheritDoc} */ public String[] getSummaryTableHeader(ProgramElementDoc member) { String[] header = new String[] { configuration.getText("doclet.Type"), configuration.getText("doclet.0_and_1", configuration.getText("doclet.Property"), configuration.getText("doclet.Description")) }; return header; } /** * {@inheritDoc} */ public void addSummaryAnchor(ClassDoc cd, Content memberTree) { memberTree.addContent(writer.getMarkerAnchor("property_summary")); } /** * {@inheritDoc} */ public void addInheritedSummaryAnchor(ClassDoc cd, Content inheritedTree) { inheritedTree.addContent(writer.getMarkerAnchor( "properties_inherited_from_class_" + configuration.getClassName(cd))); } /** * {@inheritDoc} */ public void addInheritedSummaryLabel(ClassDoc cd, Content inheritedTree) { Content classLink = writer.getPreQualifiedClassLink( LinkInfoImpl.Kind.MEMBER, cd, false); Content label = new StringContent(cd.isClass() ? configuration.getText("doclet.Properties_Inherited_From_Class") : configuration.getText("doclet.Properties_Inherited_From_Interface")); Content labelHeading = HtmlTree.HEADING(HtmlConstants.INHERITED_SUMMARY_HEADING, label); labelHeading.addContent(writer.getSpace()); labelHeading.addContent(classLink); inheritedTree.addContent(labelHeading); } /** * {@inheritDoc} */ protected void addSummaryLink(LinkInfoImpl.Kind context, ClassDoc cd, ProgramElementDoc member, Content tdSummary) { Content strong = HtmlTree.STRONG( writer.getDocLink(context, cd, (MemberDoc) member, member.name().substring(0, member.name().lastIndexOf("Property")), false, true)); Content code = HtmlTree.CODE(strong); tdSummary.addContent(code); } /** * {@inheritDoc} */ protected void addInheritedSummaryLink(ClassDoc cd, ProgramElementDoc member, Content linksTree) { linksTree.addContent( writer.getDocLink(LinkInfoImpl.Kind.MEMBER, cd, (MemberDoc)member, ((member.name().lastIndexOf("Property") != -1) && configuration.javafx) ? member.name().substring(0, member.name().length() - "Property".length()) : member.name(), false, true)); } /** * {@inheritDoc} */ protected void addSummaryType(ProgramElementDoc member, Content tdSummaryType) { MethodDoc property = (MethodDoc)member; addModifierAndType(property, property.returnType(), tdSummaryType); } /** * {@inheritDoc} */ protected Content getDeprecatedLink(ProgramElementDoc member) { return writer.getDocLink(LinkInfoImpl.Kind.MEMBER, (MemberDoc) member, ((MethodDoc)member).qualifiedName()); } /** * {@inheritDoc} */ protected Content getNavSummaryLink(ClassDoc cd, boolean link) { if (link) { return writer.getHyperLink((cd == null)? "property_summary": "properties_inherited_from_class_" + configuration.getClassName(cd), writer.getResource("doclet.navProperty")); } else { return writer.getResource("doclet.navProperty"); } } /** * {@inheritDoc} */ protected void addNavDetailLink(boolean link, Content liNav) { if (link) { liNav.addContent(writer.getHyperLink("property_detail", writer.getResource("doclet.navProperty"))); } else { liNav.addContent(writer.getResource("doclet.navProperty")); } } } ././@LongLink0000000000000000000000000000016200000000000011214 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/SerializedFormWriterImpl.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/SerializedFormWr0000644000000000000000000001773012214026367032207 0ustar 00000000000000/* * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html; import java.io.*; import com.sun.javadoc.*; import com.sun.tools.doclets.formats.html.markup.*; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.DocPaths; import com.sun.tools.doclets.internal.toolkit.util.DocletAbortException; /** * Generate the Serialized Form Information Page. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Atul M Dambalkar */ public class SerializedFormWriterImpl extends SubWriterHolderWriter implements SerializedFormWriter { /** * @param configuration the configuration data for the doclet * @throws IOException * @throws DocletAbortException */ public SerializedFormWriterImpl(ConfigurationImpl configuration) throws IOException { super(configuration, DocPaths.SERIALIZED_FORM); } /** * Get the given header. * * @param header the header to write * @return the body content tree */ public Content getHeader(String header) { Content bodyTree = getBody(true, getWindowTitle(header)); addTop(bodyTree); addNavLinks(true, bodyTree); Content h1Content = new StringContent(header); Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, true, HtmlStyle.title, h1Content); Content div = HtmlTree.DIV(HtmlStyle.header, heading); bodyTree.addContent(div); return bodyTree; } /** * Get the serialized form summaries header. * * @return the serialized form summary header tree */ public Content getSerializedSummariesHeader() { HtmlTree ul = new HtmlTree(HtmlTag.UL); ul.addStyle(HtmlStyle.blockList); return ul; } /** * Get the package serialized form header. * * @return the package serialized form header tree */ public Content getPackageSerializedHeader() { HtmlTree li = new HtmlTree(HtmlTag.LI); li.addStyle(HtmlStyle.blockList); return li; } /** * Get the given package header. * * @param packageName the package header to write * @return a content tree for the package header */ public Content getPackageHeader(String packageName) { Content heading = HtmlTree.HEADING(HtmlConstants.PACKAGE_HEADING, true, packageLabel); heading.addContent(getSpace()); heading.addContent(packageName); return heading; } /** * Get the serialized class header. * * @return a content tree for the serialized class header */ public Content getClassSerializedHeader() { HtmlTree ul = new HtmlTree(HtmlTag.UL); ul.addStyle(HtmlStyle.blockList); return ul; } /** * Get the serializable class heading. * * @param classDoc the class being processed * @return a content tree for the class header */ public Content getClassHeader(ClassDoc classDoc) { Content classLink = (classDoc.isPublic() || classDoc.isProtected()) ? getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.DEFAULT, classDoc) .label(configuration.getClassName(classDoc))) : new StringContent(classDoc.qualifiedName()); Content li = HtmlTree.LI(HtmlStyle.blockList, getMarkerAnchor( classDoc.qualifiedName())); Content superClassLink = classDoc.superclassType() != null ? getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.SERIALIZED_FORM, classDoc.superclassType())) : null; //Print the heading. Content className = superClassLink == null ? configuration.getResource( "doclet.Class_0_implements_serializable", classLink) : configuration.getResource( "doclet.Class_0_extends_implements_serializable", classLink, superClassLink); li.addContent(HtmlTree.HEADING(HtmlConstants.SERIALIZED_MEMBER_HEADING, className)); return li; } /** * Get the serial UID info header. * * @return a content tree for the serial uid info header */ public Content getSerialUIDInfoHeader() { HtmlTree dl = new HtmlTree(HtmlTag.DL); dl.addStyle(HtmlStyle.nameValue); return dl; } /** * Adds the serial UID info. * * @param header the header that will show up before the UID. * @param serialUID the serial UID to print. * @param serialUidTree the serial UID content tree to which the serial UID * content will be added */ public void addSerialUIDInfo(String header, String serialUID, Content serialUidTree) { Content headerContent = new StringContent(header); serialUidTree.addContent(HtmlTree.DT(headerContent)); Content serialContent = new StringContent(serialUID); serialUidTree.addContent(HtmlTree.DD(serialContent)); } /** * Get the class serialize content header. * * @return a content tree for the class serialize content header */ public Content getClassContentHeader() { HtmlTree ul = new HtmlTree(HtmlTag.UL); ul.addStyle(HtmlStyle.blockList); return ul; } /** * Get the serialized content tree section. * * @param serializedTreeContent the serialized content tree to be added * @return a div content tree */ public Content getSerializedContent(Content serializedTreeContent) { Content divContent = HtmlTree.DIV(HtmlStyle.serializedFormContainer, serializedTreeContent); return divContent; } /** * Add the footer. * * @param serializedTree the serialized tree to be added */ public void addFooter(Content serializedTree) { addNavLinks(false, serializedTree); addBottom(serializedTree); } /** * {@inheritDoc} */ public void printDocument(Content serializedTree) throws IOException { printHtmlDocument(null, true, serializedTree); } /** * Return an instance of a SerialFieldWriter. * * @return an instance of a SerialFieldWriter. */ public SerialFieldWriter getSerialFieldWriter(ClassDoc classDoc) { return new HtmlSerialFieldWriter(this, classDoc); } /** * Return an instance of a SerialMethodWriter. * * @return an instance of a SerialMethodWriter. */ public SerialMethodWriter getSerialMethodWriter(ClassDoc classDoc) { return new HtmlSerialMethodWriter(this, classDoc); } } ././@LongLink0000000000000000000000000000015300000000000011214 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/SingleIndexWriter.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/SingleIndexWrite0000644000000000000000000001150312214026367032173 0ustar 00000000000000/* * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html; import java.io.*; import com.sun.tools.doclets.formats.html.markup.*; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.*; /** * Generate only one index file for all the Member Names with Indexing in * Unicode Order. The name of the generated file is "index-all.html" and it is * generated in current or the destination directory. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @see java.lang.Character * @author Atul M Dambalkar * @author Bhavesh Patel (Modified) */ public class SingleIndexWriter extends AbstractIndexWriter { /** * Construct the SingleIndexWriter with filename "index-all.html" and the * {@link IndexBuilder} * * @param filename Name of the index file to be generated. * @param indexbuilder Unicode based Index from {@link IndexBuilder} */ public SingleIndexWriter(ConfigurationImpl configuration, DocPath filename, IndexBuilder indexbuilder) throws IOException { super(configuration, filename, indexbuilder); } /** * Generate single index file, for all Unicode characters. * * @param indexbuilder IndexBuilder built by {@link IndexBuilder} * @throws DocletAbortException */ public static void generate(ConfigurationImpl configuration, IndexBuilder indexbuilder) { SingleIndexWriter indexgen; DocPath filename = DocPaths.INDEX_ALL; try { indexgen = new SingleIndexWriter(configuration, filename, indexbuilder); indexgen.generateIndexFile(); indexgen.close(); } catch (IOException exc) { configuration.standardmessage.error( "doclet.exception_encountered", exc.toString(), filename); throw new DocletAbortException(); } } /** * Generate the contents of each index file, with Header, Footer, * Member Field, Method and Constructor Description. */ protected void generateIndexFile() throws IOException { String title = configuration.getText("doclet.Window_Single_Index"); Content body = getBody(true, getWindowTitle(title)); addTop(body); addNavLinks(true, body); HtmlTree divTree = new HtmlTree(HtmlTag.DIV); divTree.addStyle(HtmlStyle.contentContainer); addLinksForIndexes(divTree); for (int i = 0; i < indexbuilder.elements().length; i++) { Character unicode = (Character)((indexbuilder.elements())[i]); addContents(unicode, indexbuilder.getMemberList(unicode), divTree); } addLinksForIndexes(divTree); body.addContent(divTree); addNavLinks(false, body); addBottom(body); printHtmlDocument(null, true, body); } /** * Add links for all the Index Files per unicode character. * * @param contentTree the content tree to which the links for indexes will be added */ protected void addLinksForIndexes(Content contentTree) { for (int i = 0; i < indexbuilder.elements().length; i++) { String unicode = (indexbuilder.elements())[i].toString(); contentTree.addContent( getHyperLink("_" + unicode + "_", new StringContent(unicode))); contentTree.addContent(getSpace()); } } } ././@LongLink0000000000000000000000000000015700000000000011220 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/SourceToHTMLConverter.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/SourceToHTMLConv0000644000000000000000000002452712214026367032037 0ustar 00000000000000/* * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html; import java.io.*; import javax.tools.FileObject; import com.sun.javadoc.*; import com.sun.tools.doclets.formats.html.markup.*; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.*; /** * Converts Java Source Code to HTML. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Jamie Ho * @author Bhavesh Patel (Modified) * @since 1.4 */ public class SourceToHTMLConverter { /** * The number of trailing blank lines at the end of the page. * This is inserted so that anchors at the bottom of small pages * can be reached. */ private static final int NUM_BLANK_LINES = 60; /** * New line to be added to the documentation. */ private static final String NEW_LINE = DocletConstants.NL; private final ConfigurationImpl configuration; private final RootDoc rootDoc; private DocPath outputdir; /** * Relative path from the documentation root to the file that is being * generated. */ private DocPath relativePath = DocPath.empty; private SourceToHTMLConverter(ConfigurationImpl configuration, RootDoc rd, DocPath outputdir) { this.configuration = configuration; this.rootDoc = rd; this.outputdir = outputdir; } /** * Convert the Classes in the given RootDoc to an HTML. * * @param configuration the configuration. * @param rd the RootDoc to convert. * @param outputdir the name of the directory to output to. */ public static void convertRoot(ConfigurationImpl configuration, RootDoc rd, DocPath outputdir) { new SourceToHTMLConverter(configuration, rd, outputdir).generate(); } void generate() { if (rootDoc == null || outputdir == null) { return; } PackageDoc[] pds = rootDoc.specifiedPackages(); for (int i = 0; i < pds.length; i++) { // If -nodeprecated option is set and the package is marked as deprecated, // do not convert the package files to HTML. if (!(configuration.nodeprecated && Util.isDeprecated(pds[i]))) convertPackage(pds[i], outputdir); } ClassDoc[] cds = rootDoc.specifiedClasses(); for (int i = 0; i < cds.length; i++) { // If -nodeprecated option is set and the class is marked as deprecated // or the containing package is deprecated, do not convert the // package files to HTML. if (!(configuration.nodeprecated && (Util.isDeprecated(cds[i]) || Util.isDeprecated(cds[i].containingPackage())))) convertClass(cds[i], outputdir); } } /** * Convert the Classes in the given Package to an HTML. * * @param pd the Package to convert. * @param outputdir the name of the directory to output to. */ public void convertPackage(PackageDoc pd, DocPath outputdir) { if (pd == null) { return; } ClassDoc[] cds = pd.allClasses(); for (int i = 0; i < cds.length; i++) { // If -nodeprecated option is set and the class is marked as deprecated, // do not convert the package files to HTML. We do not check for // containing package deprecation since it is already check in // the calling method above. if (!(configuration.nodeprecated && Util.isDeprecated(cds[i]))) convertClass(cds[i], outputdir); } } /** * Convert the given Class to an HTML. * * @param cd the class to convert. * @param outputdir the name of the directory to output to. */ public void convertClass(ClassDoc cd, DocPath outputdir) { if (cd == null) { return; } try { SourcePosition sp = cd.position(); if (sp == null) return; Reader r; // temp hack until we can update SourcePosition API. if (sp instanceof com.sun.tools.javadoc.SourcePositionImpl) { FileObject fo = ((com.sun.tools.javadoc.SourcePositionImpl) sp).fileObject(); if (fo == null) return; r = fo.openReader(true); } else { File file = sp.file(); if (file == null) return; r = new FileReader(file); } LineNumberReader reader = new LineNumberReader(r); int lineno = 1; String line; relativePath = DocPaths.SOURCE_OUTPUT .resolve(DocPath.forPackage(cd)) .invert(); Content body = getHeader(); Content pre = new HtmlTree(HtmlTag.PRE); try { while ((line = reader.readLine()) != null) { addLineNo(pre, lineno); addLine(pre, line, lineno); lineno++; } } finally { reader.close(); } addBlankLines(pre); Content div = HtmlTree.DIV(HtmlStyle.sourceContainer, pre); body.addContent(div); writeToFile(body, outputdir.resolve(DocPath.forClass(cd))); } catch (IOException e) { e.printStackTrace(); } } /** * Write the output to the file. * * @param body the documentation content to be written to the file. * @param path the path for the file. */ private void writeToFile(Content body, DocPath path) throws IOException { Content htmlDocType = DocType.TRANSITIONAL; Content head = new HtmlTree(HtmlTag.HEAD); head.addContent(HtmlTree.TITLE(new StringContent( configuration.getText("doclet.Window_Source_title")))); head.addContent(getStyleSheetProperties()); Content htmlTree = HtmlTree.HTML(configuration.getLocale().getLanguage(), head, body); Content htmlDocument = new HtmlDocument(htmlDocType, htmlTree); configuration.message.notice("doclet.Generating_0", path.getPath()); DocFile df = DocFile.createFileForOutput(configuration, path); Writer w = df.openWriter(); try { htmlDocument.write(w, true); } finally { w.close(); } } /** * Returns a link to the stylesheet file. * * @return an HtmlTree for the lINK tag which provides the stylesheet location */ public HtmlTree getStyleSheetProperties() { String filename = configuration.stylesheetfile; DocPath stylesheet; if (filename.length() > 0) { DocFile file = DocFile.createFileForInput(configuration, filename); stylesheet = DocPath.create(file.getName()); } else { stylesheet = DocPaths.STYLESHEET; } DocPath p = relativePath.resolve(stylesheet); HtmlTree link = HtmlTree.LINK("stylesheet", "text/css", p.getPath(), "Style"); return link; } /** * Get the header. * * @return the header content for the HTML file */ private static Content getHeader() { return new HtmlTree(HtmlTag.BODY); } /** * Add the line numbers for the source code. * * @param pre the content tree to which the line number will be added * @param lineno The line number */ private static void addLineNo(Content pre, int lineno) { HtmlTree span = new HtmlTree(HtmlTag.SPAN); span.addStyle(HtmlStyle.sourceLineNo); if (lineno < 10) { span.addContent("00" + Integer.toString(lineno)); } else if (lineno < 100) { span.addContent("0" + Integer.toString(lineno)); } else { span.addContent(Integer.toString(lineno)); } pre.addContent(span); } /** * Add a line from source to the HTML file that is generated. * * @param pre the content tree to which the line will be added. * @param line the string to format. * @param currentLineNo the current number. */ private void addLine(Content pre, String line, int currentLineNo) { if (line != null) { pre.addContent(Util.replaceTabs(configuration, line)); Content anchor = HtmlTree.A_NAME("line." + Integer.toString(currentLineNo)); pre.addContent(anchor); pre.addContent(NEW_LINE); } } /** * Add trailing blank lines at the end of the page. * * @param pre the content tree to which the blank lines will be added. */ private static void addBlankLines(Content pre) { for (int i = 0; i < NUM_BLANK_LINES; i++) { pre.addContent(NEW_LINE); } } /** * Given a Doc, return an anchor name for it. * * @param d the Doc to check. * @return the name of the anchor. */ public static String getAnchorName(Doc d) { return "line." + d.position().line(); } } ././@LongLink0000000000000000000000000000015200000000000011213 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/SplitIndexWriter.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/SplitIndexWriter0000644000000000000000000001525712214026367032241 0ustar 00000000000000/* * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html; import java.io.*; import com.sun.tools.doclets.formats.html.markup.*; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.*; /** * Generate Separate Index Files for all the member names with Indexing in * Unicode Order. This will create "index-files" directory in the current or * destination directory and will generate separate file for each unicode index. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @see java.lang.Character * @author Atul M Dambalkar * @author Bhavesh Patel (Modified) */ public class SplitIndexWriter extends AbstractIndexWriter { /** * Previous unicode character index in the built index. */ protected int prev; /** * Next unicode character in the built index. */ protected int next; /** * Construct the SplitIndexWriter. Uses path to this file and relative path * from this file. * * @param path Path to the file which is getting generated. * @param indexbuilder Unicode based Index from {@link IndexBuilder} */ public SplitIndexWriter(ConfigurationImpl configuration, DocPath path, IndexBuilder indexbuilder, int prev, int next) throws IOException { super(configuration, path, indexbuilder); this.prev = prev; this.next = next; } /** * Generate separate index files, for each Unicode character, listing all * the members starting with the particular unicode character. * * @param indexbuilder IndexBuilder built by {@link IndexBuilder} * @throws DocletAbortException */ public static void generate(ConfigurationImpl configuration, IndexBuilder indexbuilder) { SplitIndexWriter indexgen; DocPath filename = DocPath.empty; DocPath path = DocPaths.INDEX_FILES; try { for (int i = 0; i < indexbuilder.elements().length; i++) { int j = i + 1; int prev = (j == 1)? -1: i; int next = (j == indexbuilder.elements().length)? -1: j + 1; filename = DocPaths.indexN(j); indexgen = new SplitIndexWriter(configuration, path.resolve(filename), indexbuilder, prev, next); indexgen.generateIndexFile((Character)indexbuilder. elements()[i]); indexgen.close(); } } catch (IOException exc) { configuration.standardmessage.error( "doclet.exception_encountered", exc.toString(), filename.getPath()); throw new DocletAbortException(); } } /** * Generate the contents of each index file, with Header, Footer, * Member Field, Method and Constructor Description. * * @param unicode Unicode character referring to the character for the * index. */ protected void generateIndexFile(Character unicode) throws IOException { String title = configuration.getText("doclet.Window_Split_Index", unicode.toString()); Content body = getBody(true, getWindowTitle(title)); addTop(body); addNavLinks(true, body); HtmlTree divTree = new HtmlTree(HtmlTag.DIV); divTree.addStyle(HtmlStyle.contentContainer); addLinksForIndexes(divTree); addContents(unicode, indexbuilder.getMemberList(unicode), divTree); addLinksForIndexes(divTree); body.addContent(divTree); addNavLinks(false, body); addBottom(body); printHtmlDocument(null, true, body); } /** * Add links for all the Index Files per unicode character. * * @param contentTree the content tree to which the links for indexes will be added */ protected void addLinksForIndexes(Content contentTree) { Object[] unicodeChars = indexbuilder.elements(); for (int i = 0; i < unicodeChars.length; i++) { int j = i + 1; contentTree.addContent(getHyperLink(DocPaths.indexN(j), new StringContent(unicodeChars[i].toString()))); contentTree.addContent(getSpace()); } } /** * Get link to the previous unicode character. * * @return a content tree for the link */ public Content getNavLinkPrevious() { Content prevletterLabel = getResource("doclet.Prev_Letter"); if (prev == -1) { return HtmlTree.LI(prevletterLabel); } else { Content prevLink = getHyperLink(DocPaths.indexN(prev), prevletterLabel); return HtmlTree.LI(prevLink); } } /** * Get link to the next unicode character. * * @return a content tree for the link */ public Content getNavLinkNext() { Content nextletterLabel = getResource("doclet.Next_Letter"); if (next == -1) { return HtmlTree.LI(nextletterLabel); } else { Content nextLink = getHyperLink(DocPaths.indexN(next), nextletterLabel); return HtmlTree.LI(nextLink); } } } ././@LongLink0000000000000000000000000000015700000000000011220 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/SubWriterHolderWriter.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/SubWriterHolderW0000644000000000000000000002665512214026367032200 0ustar 00000000000000/* * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html; import java.io.*; import java.util.*; import com.sun.javadoc.*; import com.sun.tools.doclets.formats.html.markup.*; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.*; /** * This abstract class exists to provide functionality needed in the * the formatting of member information. Since AbstractSubWriter and its * subclasses control this, they would be the logical place to put this. * However, because each member type has its own subclass, subclassing * can not be used effectively to change formatting. The concrete * class subclass of this class can be subclassed to change formatting. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @see AbstractMemberWriter * @see ClassWriterImpl * * @author Robert Field * @author Atul M Dambalkar * @author Bhavesh Patel (Modified) */ public abstract class SubWriterHolderWriter extends HtmlDocletWriter { public SubWriterHolderWriter(ConfigurationImpl configuration, DocPath filename) throws IOException { super(configuration, filename); } /** * Add the summary header. * * @param mw the writer for the member being documented * @param cd the classdoc to be documented * @param memberTree the content tree to which the summary header will be added */ public void addSummaryHeader(AbstractMemberWriter mw, ClassDoc cd, Content memberTree) { mw.addSummaryAnchor(cd, memberTree); mw.addSummaryLabel(memberTree); } /** * Get the summary table. * * @param mw the writer for the member being documented * @param cd the classdoc to be documented * @param tableContents list of summary table contents * @param showTabs true if the table needs to show tabs * @return the content tree for the summary table */ public Content getSummaryTableTree(AbstractMemberWriter mw, ClassDoc cd, List tableContents, boolean showTabs) { Content caption; if (showTabs) { caption = getTableCaption(mw.methodTypes); generateMethodTypesScript(mw.typeMap, mw.methodTypes); } else { caption = getTableCaption(mw.getCaption()); } Content table = HtmlTree.TABLE(HtmlStyle.overviewSummary, 0, 3, 0, mw.getTableSummary(), caption); table.addContent(getSummaryTableHeader(mw.getSummaryTableHeader(cd), "col")); for (int i = 0; i < tableContents.size(); i++) { table.addContent(tableContents.get(i)); } return table; } /** * Get the summary table caption. * * @param methodTypes set comprising of method types to show as table caption * @return the caption for the summary table */ public Content getTableCaption(Set methodTypes) { Content tabbedCaption = new HtmlTree(HtmlTag.CAPTION); for (MethodTypes type : methodTypes) { Content captionSpan; Content span; if (type.isDefaultTab()) { captionSpan = HtmlTree.SPAN(new StringContent(type.text())); span = HtmlTree.SPAN(type.tabId(), HtmlStyle.activeTableTab, captionSpan); } else { captionSpan = HtmlTree.SPAN(getMethodTypeLinks(type)); span = HtmlTree.SPAN(type.tabId(), HtmlStyle.tableTab, captionSpan); } Content tabSpan = HtmlTree.SPAN(HtmlStyle.tabEnd, getSpace()); span.addContent(tabSpan); tabbedCaption.addContent(span); } return tabbedCaption; } /** * Get the method type links for the table caption. * * @param methodType the method type to be displayed as link * @return the content tree for the method type link */ public Content getMethodTypeLinks(MethodTypes methodType) { String jsShow = "javascript:show(" + methodType.value() +");"; HtmlTree link = HtmlTree.A(jsShow, new StringContent(methodType.text())); return link; } /** * Add the inherited summary header. * * @param mw the writer for the member being documented * @param cd the classdoc to be documented * @param inheritedTree the content tree to which the inherited summary header will be added */ public void addInheritedSummaryHeader(AbstractMemberWriter mw, ClassDoc cd, Content inheritedTree) { mw.addInheritedSummaryAnchor(cd, inheritedTree); mw.addInheritedSummaryLabel(cd, inheritedTree); } /** * Add the index comment. * * @param member the member being documented * @param contentTree the content tree to which the comment will be added */ protected void addIndexComment(Doc member, Content contentTree) { addIndexComment(member, member.firstSentenceTags(), contentTree); } /** * Add the index comment. * * @param member the member being documented * @param firstSentenceTags the first sentence tags for the member to be documented * @param tdSummary the content tree to which the comment will be added */ protected void addIndexComment(Doc member, Tag[] firstSentenceTags, Content tdSummary) { Tag[] deprs = member.tags("deprecated"); Content div; if (Util.isDeprecated((ProgramElementDoc) member)) { Content strong = HtmlTree.STRONG(deprecatedPhrase); div = HtmlTree.DIV(HtmlStyle.block, strong); div.addContent(getSpace()); if (deprs.length > 0) { addInlineDeprecatedComment(member, deprs[0], div); } tdSummary.addContent(div); return; } else { ClassDoc cd = ((ProgramElementDoc)member).containingClass(); if (cd != null && Util.isDeprecated(cd)) { Content strong = HtmlTree.STRONG(deprecatedPhrase); div = HtmlTree.DIV(HtmlStyle.block, strong); div.addContent(getSpace()); tdSummary.addContent(div); } } addSummaryComment(member, firstSentenceTags, tdSummary); } /** * Add the summary type for the member. * * @param mw the writer for the member being documented * @param member the member to be documented * @param tdSummaryType the content tree to which the type will be added */ public void addSummaryType(AbstractMemberWriter mw, ProgramElementDoc member, Content tdSummaryType) { mw.addSummaryType(member, tdSummaryType); } /** * Add the summary link for the member. * * @param mw the writer for the member being documented * @param member the member to be documented * @param contentTree the content tree to which the link will be added */ public void addSummaryLinkComment(AbstractMemberWriter mw, ProgramElementDoc member, Content contentTree) { addSummaryLinkComment(mw, member, member.firstSentenceTags(), contentTree); } /** * Add the summary link comment. * * @param mw the writer for the member being documented * @param member the member being documented * @param firstSentenceTags the first sentence tags for the member to be documented * @param tdSummary the content tree to which the comment will be added */ public void addSummaryLinkComment(AbstractMemberWriter mw, ProgramElementDoc member, Tag[] firstSentenceTags, Content tdSummary) { addIndexComment(member, firstSentenceTags, tdSummary); } /** * Add the inherited member summary. * * @param mw the writer for the member being documented * @param cd the class being documented * @param member the member being documented * @param isFirst true if its the first link being documented * @param linksTree the content tree to which the summary will be added */ public void addInheritedMemberSummary(AbstractMemberWriter mw, ClassDoc cd, ProgramElementDoc member, boolean isFirst, Content linksTree) { if (! isFirst) { linksTree.addContent(", "); } mw.addInheritedSummaryLink(cd, member, linksTree); } /** * Get the document content header tree * * @return a content tree the document content header */ public Content getContentHeader() { HtmlTree div = new HtmlTree(HtmlTag.DIV); div.addStyle(HtmlStyle.contentContainer); return div; } /** * Get the member header tree * * @return a content tree the member header */ public Content getMemberTreeHeader() { HtmlTree li = new HtmlTree(HtmlTag.LI); li.addStyle(HtmlStyle.blockList); return li; } /** * Get the member tree * * @param contentTree the tree used to generate the complete member tree * @return a content tree for the member */ public Content getMemberTree(Content contentTree) { Content ul = HtmlTree.UL(HtmlStyle.blockList, contentTree); return ul; } /** * Get the member summary tree * * @param contentTree the tree used to generate the member summary tree * @return a content tree for the member summary */ public Content getMemberSummaryTree(Content contentTree) { return getMemberTree(HtmlStyle.summary, contentTree); } /** * Get the member details tree * * @param contentTree the tree used to generate the member details tree * @return a content tree for the member details */ public Content getMemberDetailsTree(Content contentTree) { return getMemberTree(HtmlStyle.details, contentTree); } /** * Get the member tree * * @param style the style class to be added to the content tree * @param contentTree the tree used to generate the complete member tree */ public Content getMemberTree(HtmlStyle style, Content contentTree) { Content div = HtmlTree.DIV(style, getMemberTree(contentTree)); return div; } } ././@LongLink0000000000000000000000000000015200000000000011213 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/TagletWriterImpl.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/TagletWriterImpl0000644000000000000000000003070212214026367032210 0ustar 00000000000000/* * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html; import com.sun.javadoc.*; import com.sun.tools.doclets.formats.html.markup.ContentBuilder; import com.sun.tools.doclets.formats.html.markup.HtmlStyle; import com.sun.tools.doclets.formats.html.markup.HtmlTree; import com.sun.tools.doclets.formats.html.markup.RawHtml; import com.sun.tools.doclets.formats.html.markup.StringContent; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.builders.SerializedFormBuilder; import com.sun.tools.doclets.internal.toolkit.taglets.*; import com.sun.tools.doclets.internal.toolkit.util.*; /** * The taglet writer that writes HTML. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @since 1.5 * @author Jamie Ho * @author Bhavesh Patel (Modified) */ public class TagletWriterImpl extends TagletWriter { private final HtmlDocletWriter htmlWriter; private final ConfigurationImpl configuration; public TagletWriterImpl(HtmlDocletWriter htmlWriter, boolean isFirstSentence) { super(isFirstSentence); this.htmlWriter = htmlWriter; configuration = htmlWriter.configuration; } /** * {@inheritDoc} */ public Content getOutputInstance() { return new ContentBuilder(); } /** * {@inheritDoc} */ protected Content codeTagOutput(Tag tag) { Content result = HtmlTree.CODE(new StringContent(tag.text())); return result; } /** * {@inheritDoc} */ public Content getDocRootOutput() { String path; if (configuration.docrootparent.length() > 0) path = configuration.docrootparent; else if (htmlWriter.pathToRoot.isEmpty()) path = "."; else path = htmlWriter.pathToRoot.getPath(); return new StringContent(path); } /** * {@inheritDoc} */ public Content deprecatedTagOutput(Doc doc) { ContentBuilder result = new ContentBuilder(); Tag[] deprs = doc.tags("deprecated"); if (doc instanceof ClassDoc) { if (Util.isDeprecated((ProgramElementDoc) doc)) { result.addContent(HtmlTree.SPAN(HtmlStyle.strong, new StringContent(configuration.getText("doclet.Deprecated")))); result.addContent(RawHtml.nbsp); if (deprs.length > 0) { Tag[] commentTags = deprs[0].inlineTags(); if (commentTags.length > 0) { result.addContent(commentTagsToOutput(null, doc, deprs[0].inlineTags(), false) ); } } } } else { MemberDoc member = (MemberDoc) doc; if (Util.isDeprecated((ProgramElementDoc) doc)) { result.addContent(HtmlTree.SPAN(HtmlStyle.strong, new StringContent(configuration.getText("doclet.Deprecated")))); result.addContent(RawHtml.nbsp); if (deprs.length > 0) { Content body = commentTagsToOutput(null, doc, deprs[0].inlineTags(), false); result.addContent(HtmlTree.I(body)); } } else { if (Util.isDeprecated(member.containingClass())) { result.addContent(HtmlTree.SPAN(HtmlStyle.strong, new StringContent(configuration.getText("doclet.Deprecated")))); result.addContent(RawHtml.nbsp); } } } return result; } /** * {@inheritDoc} */ protected Content literalTagOutput(Tag tag) { Content result = new StringContent(tag.text()); return result; } /** * {@inheritDoc} */ public MessageRetriever getMsgRetriever() { return configuration.message; } /** * {@inheritDoc} */ public Content getParamHeader(String header) { HtmlTree result = HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.strong, new StringContent(header))); return result; } /** * {@inheritDoc} */ public Content paramTagOutput(ParamTag paramTag, String paramName) { ContentBuilder body = new ContentBuilder(); body.addContent(HtmlTree.CODE(new RawHtml(paramName))); body.addContent(" - "); body.addContent(htmlWriter.commentTagsToContent(paramTag, null, paramTag.inlineTags(), false)); HtmlTree result = HtmlTree.DD(body); return result; } /** * {@inheritDoc} */ public Content propertyTagOutput(Tag tag, String prefix) { Content body = new ContentBuilder(); body.addContent(new RawHtml(prefix)); body.addContent(" "); body.addContent(HtmlTree.CODE(new RawHtml(tag.text()))); body.addContent("."); Content result = HtmlTree.P(body); return result; } /** * {@inheritDoc} */ public Content returnTagOutput(Tag returnTag) { ContentBuilder result = new ContentBuilder(); result.addContent(HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.strong, new StringContent(configuration.getText("doclet.Returns"))))); result.addContent(HtmlTree.DD(htmlWriter.commentTagsToContent( returnTag, null, returnTag.inlineTags(), false))); return result; } /** * {@inheritDoc} */ public Content seeTagOutput(Doc holder, SeeTag[] seeTags) { ContentBuilder body = new ContentBuilder(); if (seeTags.length > 0) { for (int i = 0; i < seeTags.length; ++i) { appendSeparatorIfNotEmpty(body); body.addContent(htmlWriter.seeTagToContent(seeTags[i])); } } if (holder.isField() && ((FieldDoc)holder).constantValue() != null && htmlWriter instanceof ClassWriterImpl) { //Automatically add link to constant values page for constant fields. appendSeparatorIfNotEmpty(body); DocPath constantsPath = htmlWriter.pathToRoot.resolve(DocPaths.CONSTANT_VALUES); String whichConstant = ((ClassWriterImpl) htmlWriter).getClassDoc().qualifiedName() + "." + ((FieldDoc) holder).name(); DocLink link = constantsPath.fragment(whichConstant); body.addContent(htmlWriter.getHyperLink(link, new StringContent(configuration.getText("doclet.Constants_Summary")))); } if (holder.isClass() && ((ClassDoc)holder).isSerializable()) { //Automatically add link to serialized form page for serializable classes. if ((SerializedFormBuilder.serialInclude(holder) && SerializedFormBuilder.serialInclude(((ClassDoc)holder).containingPackage()))) { appendSeparatorIfNotEmpty(body); DocPath serialPath = htmlWriter.pathToRoot.resolve(DocPaths.SERIALIZED_FORM); DocLink link = serialPath.fragment(((ClassDoc)holder).qualifiedName()); body.addContent(htmlWriter.getHyperLink(link, new StringContent(configuration.getText("doclet.Serialized_Form")))); } } if (body.isEmpty()) return body; ContentBuilder result = new ContentBuilder(); result.addContent(HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.strong, new StringContent(configuration.getText("doclet.See_Also"))))); result.addContent(HtmlTree.DD(body)); return result; } private void appendSeparatorIfNotEmpty(ContentBuilder body) { if (!body.isEmpty()) { body.addContent(", "); body.addContent(DocletConstants.NL); } } /** * {@inheritDoc} */ public Content simpleTagOutput(Tag[] simpleTags, String header) { ContentBuilder result = new ContentBuilder(); result.addContent(HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.strong, new RawHtml(header)))); ContentBuilder body = new ContentBuilder(); for (int i = 0; i < simpleTags.length; i++) { if (i > 0) { body.addContent(", "); } body.addContent(htmlWriter.commentTagsToContent( simpleTags[i], null, simpleTags[i].inlineTags(), false)); } result.addContent(HtmlTree.DD(body)); return result; } /** * {@inheritDoc} */ public Content simpleTagOutput(Tag simpleTag, String header) { ContentBuilder result = new ContentBuilder(); result.addContent(HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.strong, new RawHtml(header)))); Content body = htmlWriter.commentTagsToContent( simpleTag, null, simpleTag.inlineTags(), false); result.addContent(HtmlTree.DD(body)); return result; } /** * {@inheritDoc} */ public Content getThrowsHeader() { HtmlTree result = HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.strong, new StringContent(configuration.getText("doclet.Throws")))); return result; } /** * {@inheritDoc} */ public Content throwsTagOutput(ThrowsTag throwsTag) { ContentBuilder body = new ContentBuilder(); Content excName = (throwsTag.exceptionType() == null) ? new RawHtml(throwsTag.exceptionName()) : htmlWriter.getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.MEMBER, throwsTag.exceptionType())); body.addContent(HtmlTree.CODE(excName)); Content desc = htmlWriter.commentTagsToContent(throwsTag, null, throwsTag.inlineTags(), false); if (desc != null && !desc.isEmpty()) { body.addContent(" - "); body.addContent(desc); } HtmlTree result = HtmlTree.DD(body); return result; } /** * {@inheritDoc} */ public Content throwsTagOutput(Type throwsType) { HtmlTree result = HtmlTree.DD(HtmlTree.CODE(htmlWriter.getLink( new LinkInfoImpl(configuration, LinkInfoImpl.Kind.MEMBER, throwsType)))); return result; } /** * {@inheritDoc} */ public Content valueTagOutput(FieldDoc field, String constantVal, boolean includeLink) { return includeLink ? htmlWriter.getDocLink(LinkInfoImpl.Kind.VALUE_TAG, field, constantVal, false) : new RawHtml(constantVal); } /** * {@inheritDoc} */ public Content commentTagsToOutput(Tag holderTag, Tag[] tags) { return commentTagsToOutput(holderTag, null, tags, false); } /** * {@inheritDoc} */ public Content commentTagsToOutput(Doc holderDoc, Tag[] tags) { return commentTagsToOutput(null, holderDoc, tags, false); } /** * {@inheritDoc} */ public Content commentTagsToOutput(Tag holderTag, Doc holderDoc, Tag[] tags, boolean isFirstSentence) { return htmlWriter.commentTagsToContent( holderTag, holderDoc, tags, isFirstSentence); } /** * {@inheritDoc} */ public Configuration configuration() { return configuration; } } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/TreeWriter.java0000644000000000000000000001472512214026367031774 0ustar 00000000000000/* * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html; import java.io.*; import com.sun.javadoc.*; import com.sun.tools.doclets.formats.html.markup.*; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.*; /** * Generate Class Hierarchy page for all the Classes in this run. Use * ClassTree for building the Tree. The name of * the generated file is "overview-tree.html" and it is generated in the * current or the destination directory. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Atul M Dambalkar * @author Bhavesh Patel (Modified) */ public class TreeWriter extends AbstractTreeWriter { /** * Packages in this run. */ private PackageDoc[] packages; /** * True if there are no packages specified on the command line, * False otherwise. */ private boolean classesonly; /** * Constructor to construct TreeWriter object. * * @param configuration the current configuration of the doclet. * @param filename String filename * @param classtree the tree being built. */ public TreeWriter(ConfigurationImpl configuration, DocPath filename, ClassTree classtree) throws IOException { super(configuration, filename, classtree); packages = configuration.packages; classesonly = packages.length == 0; } /** * Create a TreeWriter object and use it to generate the * "overview-tree.html" file. * * @param classtree the class tree being documented. * @throws DocletAbortException */ public static void generate(ConfigurationImpl configuration, ClassTree classtree) { TreeWriter treegen; DocPath filename = DocPaths.OVERVIEW_TREE; try { treegen = new TreeWriter(configuration, filename, classtree); treegen.generateTreeFile(); treegen.close(); } catch (IOException exc) { configuration.standardmessage.error( "doclet.exception_encountered", exc.toString(), filename); throw new DocletAbortException(); } } /** * Generate the interface hierarchy and class hierarchy. */ public void generateTreeFile() throws IOException { Content body = getTreeHeader(); Content headContent = getResource("doclet.Hierarchy_For_All_Packages"); Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, false, HtmlStyle.title, headContent); Content div = HtmlTree.DIV(HtmlStyle.header, heading); addPackageTreeLinks(div); body.addContent(div); HtmlTree divTree = new HtmlTree(HtmlTag.DIV); divTree.addStyle(HtmlStyle.contentContainer); addTree(classtree.baseclasses(), "doclet.Class_Hierarchy", divTree); addTree(classtree.baseinterfaces(), "doclet.Interface_Hierarchy", divTree); addTree(classtree.baseAnnotationTypes(), "doclet.Annotation_Type_Hierarchy", divTree); addTree(classtree.baseEnums(), "doclet.Enum_Hierarchy", divTree); body.addContent(divTree); addNavLinks(false, body); addBottom(body); printHtmlDocument(null, true, body); } /** * Add the links to all the package tree files. * * @param contentTree the content tree to which the links will be added */ protected void addPackageTreeLinks(Content contentTree) { //Do nothing if only unnamed package is used if (packages.length == 1 && packages[0].name().length() == 0) { return; } if (!classesonly) { Content span = HtmlTree.SPAN(HtmlStyle.strong, getResource("doclet.Package_Hierarchies")); contentTree.addContent(span); HtmlTree ul = new HtmlTree(HtmlTag.UL); ul.addStyle(HtmlStyle.horizontal); for (int i = 0; i < packages.length; i++) { // If the package name length is 0 or if -nodeprecated option // is set and the package is marked as deprecated, do not include // the page in the list of package hierarchies. if (packages[i].name().length() == 0 || (configuration.nodeprecated && Util.isDeprecated(packages[i]))) { continue; } DocPath link = pathString(packages[i], DocPaths.PACKAGE_TREE); Content li = HtmlTree.LI(getHyperLink( link, new StringContent(packages[i].name()))); if (i < packages.length - 1) { li.addContent(", "); } ul.addContent(li); } contentTree.addContent(ul); } } /** * Get the tree header. * * @return a content tree for the tree header */ protected Content getTreeHeader() { String title = configuration.getText("doclet.Window_Class_Hierarchy"); Content bodyTree = getBody(true, getWindowTitle(title)); addTop(bodyTree); addNavLinks(true, bodyTree); return bodyTree; } } ././@LongLink0000000000000000000000000000015300000000000011214 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/WriterFactoryImpl.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/WriterFactoryImp0000644000000000000000000001671412214026367032232 0ustar 00000000000000/* * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html; import java.io.IOException; import com.sun.javadoc.*; import com.sun.tools.javac.jvm.Profile; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.*; /** * The factory that returns HTML writers. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Jamie Ho * @since 1.5 */ public class WriterFactoryImpl implements WriterFactory { private final ConfigurationImpl configuration; public WriterFactoryImpl(ConfigurationImpl configuration) { this.configuration = configuration; } /** * {@inheritDoc} */ public ConstantsSummaryWriter getConstantsSummaryWriter() throws Exception { return new ConstantsSummaryWriterImpl(configuration); } /** * {@inheritDoc} */ public PackageSummaryWriter getPackageSummaryWriter(PackageDoc packageDoc, PackageDoc prevPkg, PackageDoc nextPkg) throws Exception { return new PackageWriterImpl(configuration, packageDoc, prevPkg, nextPkg); } /** * {@inheritDoc} */ public ProfileSummaryWriter getProfileSummaryWriter(Profile profile, Profile prevProfile, Profile nextProfile) throws Exception { return new ProfileWriterImpl(configuration, profile, prevProfile, nextProfile); } /** * {@inheritDoc} */ public ProfilePackageSummaryWriter getProfilePackageSummaryWriter(PackageDoc packageDoc, PackageDoc prevPkg, PackageDoc nextPkg, Profile profile) throws Exception { return new ProfilePackageWriterImpl(configuration, packageDoc, prevPkg, nextPkg, profile); } /** * {@inheritDoc} */ public ClassWriter getClassWriter(ClassDoc classDoc, ClassDoc prevClass, ClassDoc nextClass, ClassTree classTree) throws IOException { return new ClassWriterImpl(configuration, classDoc, prevClass, nextClass, classTree); } /** * {@inheritDoc} */ public AnnotationTypeWriter getAnnotationTypeWriter( AnnotationTypeDoc annotationType, Type prevType, Type nextType) throws Exception { return new AnnotationTypeWriterImpl(configuration, annotationType, prevType, nextType); } /** * {@inheritDoc} */ public AnnotationTypeOptionalMemberWriter getAnnotationTypeOptionalMemberWriter( AnnotationTypeWriter annotationTypeWriter) throws Exception { return new AnnotationTypeOptionalMemberWriterImpl( (SubWriterHolderWriter) annotationTypeWriter, annotationTypeWriter.getAnnotationTypeDoc()); } /** * {@inheritDoc} */ public AnnotationTypeRequiredMemberWriter getAnnotationTypeRequiredMemberWriter(AnnotationTypeWriter annotationTypeWriter) throws Exception { return new AnnotationTypeRequiredMemberWriterImpl( (SubWriterHolderWriter) annotationTypeWriter, annotationTypeWriter.getAnnotationTypeDoc()); } /** * {@inheritDoc} */ public EnumConstantWriterImpl getEnumConstantWriter(ClassWriter classWriter) throws Exception { return new EnumConstantWriterImpl((SubWriterHolderWriter) classWriter, classWriter.getClassDoc()); } /** * {@inheritDoc} */ public FieldWriterImpl getFieldWriter(ClassWriter classWriter) throws Exception { return new FieldWriterImpl((SubWriterHolderWriter) classWriter, classWriter.getClassDoc()); } /** * {@inheritDoc} */ public PropertyWriterImpl getPropertyWriter(ClassWriter classWriter) throws Exception { return new PropertyWriterImpl((SubWriterHolderWriter) classWriter, classWriter.getClassDoc()); } /** * {@inheritDoc} */ public MethodWriterImpl getMethodWriter(ClassWriter classWriter) throws Exception { return new MethodWriterImpl((SubWriterHolderWriter) classWriter, classWriter.getClassDoc()); } /** * {@inheritDoc} */ public ConstructorWriterImpl getConstructorWriter(ClassWriter classWriter) throws Exception { return new ConstructorWriterImpl((SubWriterHolderWriter) classWriter, classWriter.getClassDoc()); } /** * {@inheritDoc} */ public MemberSummaryWriter getMemberSummaryWriter( ClassWriter classWriter, int memberType) throws Exception { switch (memberType) { case VisibleMemberMap.CONSTRUCTORS: return getConstructorWriter(classWriter); case VisibleMemberMap.ENUM_CONSTANTS: return getEnumConstantWriter(classWriter); case VisibleMemberMap.FIELDS: return getFieldWriter(classWriter); case VisibleMemberMap.PROPERTIES: return getPropertyWriter(classWriter); case VisibleMemberMap.INNERCLASSES: return new NestedClassWriterImpl((SubWriterHolderWriter) classWriter, classWriter.getClassDoc()); case VisibleMemberMap.METHODS: return getMethodWriter(classWriter); default: return null; } } /** * {@inheritDoc} */ public MemberSummaryWriter getMemberSummaryWriter( AnnotationTypeWriter annotationTypeWriter, int memberType) throws Exception { switch (memberType) { case VisibleMemberMap.ANNOTATION_TYPE_MEMBER_OPTIONAL: return (AnnotationTypeOptionalMemberWriterImpl) getAnnotationTypeOptionalMemberWriter(annotationTypeWriter); case VisibleMemberMap.ANNOTATION_TYPE_MEMBER_REQUIRED: return (AnnotationTypeRequiredMemberWriterImpl) getAnnotationTypeRequiredMemberWriter(annotationTypeWriter); default: return null; } } /** * {@inheritDoc} */ public SerializedFormWriter getSerializedFormWriter() throws Exception { return new SerializedFormWriterImpl(configuration); } } ././@LongLink0000000000000000000000000000015000000000000011211 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/markup/Comment.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/markup/Comment.j0000644000000000000000000000637412214026367032112 0ustar 00000000000000/* * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html.markup; import java.io.IOException; import java.io.Writer; import com.sun.tools.doclets.internal.toolkit.Content; import com.sun.tools.doclets.internal.toolkit.util.*; /** * Class for generating a comment for HTML pages of javadoc output. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Bhavesh Patel */ public class Comment extends Content { private String commentText; /** * Constructor to construct a Comment object. * * @param comment comment text for the comment */ public Comment(String comment) { commentText = nullCheck(comment); } /** * This method is not supported by the class. * * @param content content that needs to be added * @throws DocletAbortException this method will always throw a * DocletAbortException because it * is not supported. */ public void addContent(Content content) { throw new DocletAbortException(); } /** * This method is not supported by the class. * * @param stringContent string content that needs to be added * @throws DocletAbortException this method will always throw a * DocletAbortException because it * is not supported. */ public void addContent(String stringContent) { throw new DocletAbortException(); } /** * {@inheritDoc} */ public boolean isEmpty() { return commentText.isEmpty(); } /** * {@inheritDoc} */ @Override public boolean write(Writer out, boolean atNewline) throws IOException { if (!atNewline) out.write(DocletConstants.NL); out.write("" + DocletConstants.NL); return true; } } ././@LongLink0000000000000000000000000000015700000000000011220 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/markup/ContentBuilder.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/markup/ContentBu0000644000000000000000000000613312214026367032152 0ustar 00000000000000/* * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html.markup; import java.io.IOException; import java.io.Writer; import java.util.ArrayList; import java.util.Collections; import java.util.List; import com.sun.tools.doclets.internal.toolkit.Content; /** * A sequence of Content nodes. */ public class ContentBuilder extends Content { protected List contents = Collections.emptyList(); @Override public void addContent(Content content) { nullCheck(content); if ((content instanceof ContentBuilder) && content.isEmpty()) return; ensureMutableContents(); if (content instanceof ContentBuilder) { contents.addAll(((ContentBuilder) content).contents); } else contents.add(content); } @Override public void addContent(String text) { if (text.isEmpty()) return; ensureMutableContents(); Content c = contents.isEmpty() ? null : contents.get(contents.size() - 1); StringContent sc; if (c != null && c instanceof StringContent) { sc = (StringContent) c; } else { contents.add(sc = new StringContent()); } sc.addContent(text); } @Override public boolean write(Writer writer, boolean atNewline) throws IOException { for (Content content: contents) { atNewline = content.write(writer, atNewline); } return atNewline; } @Override public boolean isEmpty() { for (Content content: contents) { if (!content.isEmpty()) return false; } return true; } @Override public int charCount() { int n = 0; for (Content c : contents) n += c.charCount(); return n; } private void ensureMutableContents() { if (contents.isEmpty()) contents = new ArrayList(); } } ././@LongLink0000000000000000000000000000015000000000000011211 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/markup/DocType.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/markup/DocType.j0000644000000000000000000000675112214026367032056 0ustar 00000000000000/* * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html.markup; import java.io.IOException; import java.io.Writer; import com.sun.tools.doclets.internal.toolkit.Content; import com.sun.tools.doclets.internal.toolkit.util.*; /** * Class for generating document type for HTML pages of javadoc output. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Bhavesh Patel */ public class DocType extends Content { private String docType; public static final DocType TRANSITIONAL = new DocType("Transitional", "http://www.w3.org/TR/html4/loose.dtd"); public static final DocType FRAMESET = new DocType("Frameset", "http://www.w3.org/TR/html4/frameset.dtd"); /** * Constructor to construct a DocType object. * * @param type the doctype to be added */ private DocType(String type, String dtd) { docType = "" + DocletConstants.NL; } /** * This method is not supported by the class. * * @param content content that needs to be added * @throws DocletAbortException this method will always throw a * DocletAbortException because it * is not supported. */ public void addContent(Content content) { throw new DocletAbortException(); } /** * This method is not supported by the class. * * @param stringContent string content that needs to be added * @throws DocletAbortException this method will always throw a * DocletAbortException because it * is not supported. */ public void addContent(String stringContent) { throw new DocletAbortException(); } /** * {@inheritDoc} */ public boolean isEmpty() { return (docType.length() == 0); } /** * {@inheritDoc} */ @Override public boolean write(Writer out, boolean atNewline) throws IOException { out.write(docType); return true; // guaranteed by constructor } } ././@LongLink0000000000000000000000000000015100000000000011212 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlAttr.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlAttr.0000644000000000000000000000410712214026367032065 0ustar 00000000000000/* * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html.markup; /** * Enum representing HTML tag attributes. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Bhavesh Patel */ public enum HtmlAttr { ALT, BORDER, CELLPADDING, CELLSPACING, CHARSET, CLASS, CLEAR, COLS, CONTENT, HREF, HTTP_EQUIV("http-equiv"), ID, LANG, NAME, ONLOAD, REL, ROWS, SCOPE, SCROLLING, SRC, SUMMARY, TARGET, TITLE, TYPE, WIDTH; private final String value; HtmlAttr() { this.value = name().toLowerCase(); } HtmlAttr(String name) { this.value = name; } public String toString() { return value; } } ././@LongLink0000000000000000000000000000015600000000000011217 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlConstants.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlConst0000644000000000000000000001557212214026367032173 0ustar 00000000000000/* * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html.markup; import com.sun.tools.doclets.internal.toolkit.Content; /** * Stores constants for Html Doclet. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Bhavesh Patel */ public class HtmlConstants { /** * Marker to identify start of top navigation bar. */ public static final Content START_OF_TOP_NAVBAR = new Comment("========= START OF TOP NAVBAR ======="); /** * Marker to identify start of bottom navigation bar. */ public static final Content START_OF_BOTTOM_NAVBAR = new Comment("======= START OF BOTTOM NAVBAR ======"); /** * Marker to identify end of top navigation bar. */ public static final Content END_OF_TOP_NAVBAR = new Comment("========= END OF TOP NAVBAR ========="); /** * Marker to identify end of bottom navigation bar. */ public static final Content END_OF_BOTTOM_NAVBAR = new Comment("======== END OF BOTTOM NAVBAR ======="); /** * Marker to identify start of class data. */ public static final Content START_OF_CLASS_DATA = new Comment("======== START OF CLASS DATA ========"); /** * Marker to identify end of class data. */ public static final Content END_OF_CLASS_DATA = new Comment("========= END OF CLASS DATA ========="); /** * Marker to identify start of nested class summary. */ public static final Content START_OF_NESTED_CLASS_SUMMARY = new Comment("======== NESTED CLASS SUMMARY ========"); /** * Marker to identify start of annotation type optional member summary. */ public static final Content START_OF_ANNOTATION_TYPE_OPTIONAL_MEMBER_SUMMARY = new Comment("=========== ANNOTATION TYPE OPTIONAL MEMBER SUMMARY ==========="); /** * Marker to identify start of annotation type required member summary. */ public static final Content START_OF_ANNOTATION_TYPE_REQUIRED_MEMBER_SUMMARY = new Comment("=========== ANNOTATION TYPE REQUIRED MEMBER SUMMARY ==========="); /** * Marker to identify start of constructor summary. */ public static final Content START_OF_CONSTRUCTOR_SUMMARY = new Comment("======== CONSTRUCTOR SUMMARY ========"); /** * Marker to identify start of enum constants summary. */ public static final Content START_OF_ENUM_CONSTANT_SUMMARY = new Comment("=========== ENUM CONSTANT SUMMARY ==========="); /** * Marker to identify start of field summary. */ public static final Content START_OF_FIELD_SUMMARY = new Comment("=========== FIELD SUMMARY ==========="); /** * Marker to identify start of properties summary. */ public static final Content START_OF_PROPERTY_SUMMARY = new Comment("=========== PROPERTY SUMMARY ==========="); /** * Marker to identify start of method summary. */ public static final Content START_OF_METHOD_SUMMARY = new Comment("========== METHOD SUMMARY ==========="); /** * Marker to identify start of annotation type details. */ public static final Content START_OF_ANNOTATION_TYPE_DETAILS = new Comment("============ ANNOTATION TYPE MEMBER DETAIL ==========="); /** * Marker to identify start of method details. */ public static final Content START_OF_METHOD_DETAILS = new Comment("============ METHOD DETAIL =========="); /** * Marker to identify start of field details. */ public static final Content START_OF_FIELD_DETAILS = new Comment("============ FIELD DETAIL ==========="); /** * Marker to identify start of property details. */ public static final Content START_OF_PROPERTY_DETAILS = new Comment("============ PROPERTY DETAIL ==========="); /** * Marker to identify start of constructor details. */ public static final Content START_OF_CONSTRUCTOR_DETAILS = new Comment("========= CONSTRUCTOR DETAIL ========"); /** * Marker to identify start of enum constants details. */ public static final Content START_OF_ENUM_CONSTANT_DETAILS = new Comment("============ ENUM CONSTANT DETAIL ==========="); /** * Html tag for the page title heading. */ public static final HtmlTag TITLE_HEADING = HtmlTag.H1; /** * Html tag for the class page title heading. */ public static final HtmlTag CLASS_PAGE_HEADING = HtmlTag.H2; /** * Html tag for the content heading. */ public static final HtmlTag CONTENT_HEADING = HtmlTag.H2; /** * Html tag for the package name heading. */ public static final HtmlTag PACKAGE_HEADING = HtmlTag.H2; /** * Html tag for the profile name heading. */ public static final HtmlTag PROFILE_HEADING = HtmlTag.H2; /** * Html tag for the member summary heading. */ public static final HtmlTag SUMMARY_HEADING = HtmlTag.H3; /** * Html tag for the inherited member summary heading. */ public static final HtmlTag INHERITED_SUMMARY_HEADING = HtmlTag.H3; /** * Html tag for the member details heading. */ public static final HtmlTag DETAILS_HEADING = HtmlTag.H3; /** * Html tag for the serialized member heading. */ public static final HtmlTag SERIALIZED_MEMBER_HEADING = HtmlTag.H3; /** * Html tag for the member heading. */ public static final HtmlTag MEMBER_HEADING = HtmlTag.H4; } ././@LongLink0000000000000000000000000000015600000000000011217 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocWriter.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocWr0000644000000000000000000001737412214026367032125 0ustar 00000000000000/* * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html.markup; import java.io.*; import java.util.*; import com.sun.javadoc.*; import com.sun.tools.doclets.formats.html.ConfigurationImpl; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.DocFile; import com.sun.tools.doclets.internal.toolkit.util.DocLink; import com.sun.tools.doclets.internal.toolkit.util.DocPath; /** * Class for the Html Format Code Generation specific to JavaDoc. * This Class contains methods related to the Html Code Generation which * are used by the Sub-Classes in the package com.sun.tools.doclets.standard * and com.sun.tools.doclets.oneone. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @since 1.2 * @author Atul M Dambalkar * @author Robert Field */ public abstract class HtmlDocWriter extends HtmlWriter { /** * Constructor. Initializes the destination file name through the super * class HtmlWriter. * * @param filename String file name. */ public HtmlDocWriter(Configuration configuration, DocPath filename) throws IOException { super(configuration, filename); configuration.message.notice("doclet.Generating_0", DocFile.createFileForOutput(configuration, filename).getPath()); } /** * Accessor for configuration. */ public abstract Configuration configuration(); public Content getHyperLink(DocPath link, String label) { return getHyperLink(link, new StringContent(label), false, "", "", ""); } /** * Get Html Hyper Link string. * * @param where Position of the link in the file. Character '#' is not * needed. * @param label Tag for the link. * @return a content tree for the hyper link */ public Content getHyperLink(String where, Content label) { return getHyperLink(DocLink.fragment(where), label, "", ""); } /** * Get Html hyperlink. * * @param link path of the file. * @param label Tag for the link. * @return a content tree for the hyper link */ public Content getHyperLink(DocPath link, Content label) { return getHyperLink(link, label, "", ""); } public Content getHyperLink(DocLink link, Content label) { return getHyperLink(link, label, "", ""); } public Content getHyperLink(DocPath link, Content label, boolean strong, String stylename, String title, String target) { return getHyperLink(new DocLink(link), label, strong, stylename, title, target); } public Content getHyperLink(DocLink link, Content label, boolean strong, String stylename, String title, String target) { Content body = label; if (strong) { body = HtmlTree.SPAN(HtmlStyle.strong, body); } if (stylename != null && stylename.length() != 0) { HtmlTree t = new HtmlTree(HtmlTag.FONT, body); t.addAttr(HtmlAttr.CLASS, stylename); body = t; } HtmlTree l = HtmlTree.A(link.toString(), body); if (title != null && title.length() != 0) { l.addAttr(HtmlAttr.TITLE, title); } if (target != null && target.length() != 0) { l.addAttr(HtmlAttr.TARGET, target); } return l; } /** * Get Html Hyper Link. * * @param link String name of the file. * @param label Tag for the link. * @param title String that describes the link's content for accessibility. * @param target Target frame. * @return a content tree for the hyper link. */ public Content getHyperLink(DocPath link, Content label, String title, String target) { return getHyperLink(new DocLink(link), label, title, target); } public Content getHyperLink(DocLink link, Content label, String title, String target) { HtmlTree anchor = HtmlTree.A(link.toString(), label); if (title != null && title.length() != 0) { anchor.addAttr(HtmlAttr.TITLE, title); } if (target != null && target.length() != 0) { anchor.addAttr(HtmlAttr.TARGET, target); } return anchor; } /** * Get the name of the package, this class is in. * * @param cd ClassDoc. */ public String getPkgName(ClassDoc cd) { String pkgName = cd.containingPackage().name(); if (pkgName.length() > 0) { pkgName += "."; return pkgName; } return ""; } public boolean getMemberDetailsListPrinted() { return memberDetailsListPrinted; } /** * Print the frameset version of the Html file header. * Called only when generating an HTML frameset file. * * @param title Title of this HTML document * @param noTimeStamp If true, don't print time stamp in header * @param frameset the frameset to be added to the HTML document */ public void printFramesetDocument(String title, boolean noTimeStamp, Content frameset) throws IOException { Content htmlDocType = DocType.FRAMESET; Content htmlComment = new Comment(configuration.getText("doclet.New_Page")); Content head = new HtmlTree(HtmlTag.HEAD); if (! noTimeStamp) { Content headComment = new Comment(getGeneratedByString()); head.addContent(headComment); } if (configuration.charset.length() > 0) { Content meta = HtmlTree.META("Content-Type", "text/html", configuration.charset); head.addContent(meta); } Content windowTitle = HtmlTree.TITLE(new StringContent(title)); head.addContent(windowTitle); head.addContent(getFramesetJavaScript()); Content htmlTree = HtmlTree.HTML(configuration.getLocale().getLanguage(), head, frameset); Content htmlDocument = new HtmlDocument(htmlDocType, htmlComment, htmlTree); write(htmlDocument); } protected String getGeneratedByString() { Calendar calendar = new GregorianCalendar(TimeZone.getDefault()); Date today = calendar.getTime(); return "Generated by javadoc ("+ ConfigurationImpl.BUILD_DATE + ") on " + today; } } ././@LongLink0000000000000000000000000000015500000000000011216 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocument.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocum0000644000000000000000000000731312214026367032146 0ustar 00000000000000/* * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html.markup; import java.io.IOException; import java.io.Writer; import java.util.*; import com.sun.tools.doclets.internal.toolkit.Content; import com.sun.tools.doclets.internal.toolkit.util.*; /** * Class for generating an HTML document for javadoc output. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Bhavesh Patel */ public class HtmlDocument extends Content { private List docContent = Collections.emptyList(); /** * Constructor to construct an HTML document. * * @param docType document type for the HTML document * @param docComment comment for the document * @param htmlTree HTML tree of the document */ public HtmlDocument(Content docType, Content docComment, Content htmlTree) { docContent = new ArrayList(); addContent(nullCheck(docType)); addContent(nullCheck(docComment)); addContent(nullCheck(htmlTree)); } /** * Constructor to construct an HTML document. * * @param docType document type for the HTML document * @param htmlTree HTML tree of the document */ public HtmlDocument(Content docType, Content htmlTree) { docContent = new ArrayList(); addContent(nullCheck(docType)); addContent(nullCheck(htmlTree)); } /** * Adds content for the HTML document. * * @param htmlContent html content to be added */ public final void addContent(Content htmlContent) { if (htmlContent.isValid()) docContent.add(htmlContent); } /** * This method is not supported by the class. * * @param stringContent string content that needs to be added * @throws DocletAbortException this method will always throw a * DocletAbortException because it * is not supported. */ public void addContent(String stringContent) { throw new DocletAbortException(); } /** * {@inheritDoc} */ public boolean isEmpty() { return (docContent.isEmpty()); } /** * {@inheritDoc} */ public boolean write(Writer out, boolean atNewline) throws IOException { for (Content c : docContent) atNewline = c.write(out, atNewline); return atNewline; } } ././@LongLink0000000000000000000000000000015200000000000011213 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlStyle.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlStyle0000644000000000000000000000442612214026367032201 0ustar 00000000000000/* * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html.markup; /** * Enum representing HTML styles. The name map to values in the CSS file. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Bhavesh Patel */ public enum HtmlStyle { aboutLanguage, activeTableTab, altColor, bar, block, blockList, blockListLast, bottomNav, classUseContainer, colFirst, colLast, colOne, constantValuesContainer, contentContainer, description, details, docSummary, header, horizontal, footer, indexContainer, indexHeader, inheritance, legalCopy, nameValue, navBarCell1Rev, navList, overviewSummary, packageSummary, rowColor, serializedFormContainer, sourceContainer, sourceLineNo, strong, subNav, subNavList, subTitle, summary, deprecatedContent, tabEnd, tableTab, title, topNav; } ././@LongLink0000000000000000000000000000015000000000000011211 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTag.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTag.j0000644000000000000000000000732412214026367032044 0ustar 00000000000000/* * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html.markup; /** * Enum representing HTML tags. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Bhavesh Patel */ public enum HtmlTag { A(BlockType.INLINE, EndTag.END), BLOCKQUOTE, BODY(BlockType.OTHER, EndTag.END), BR(BlockType.INLINE, EndTag.NOEND), CAPTION, CENTER, CODE(BlockType.INLINE, EndTag.END), DD, DIR, DIV, DL, DT, EM(BlockType.INLINE, EndTag.END), FONT(BlockType.INLINE, EndTag.END), FRAME(BlockType.OTHER, EndTag.NOEND), FRAMESET(BlockType.OTHER, EndTag.END), H1, H2, H3, H4, H5, H6, HEAD(BlockType.OTHER, EndTag.END), HR(BlockType.BLOCK, EndTag.NOEND), HTML(BlockType.OTHER, EndTag.END), I(BlockType.INLINE, EndTag.END), IMG(BlockType.INLINE, EndTag.NOEND), LI, LISTING, LINK(BlockType.OTHER, EndTag.NOEND), MENU, META(BlockType.OTHER, EndTag.NOEND), NOFRAMES(BlockType.OTHER, EndTag.END), NOSCRIPT(BlockType.OTHER, EndTag.END), OL, P, PRE, SCRIPT(BlockType.OTHER, EndTag.END), SMALL(BlockType.INLINE, EndTag.END), SPAN(BlockType.INLINE, EndTag.END), STRONG(BlockType.INLINE, EndTag.END), SUB(BlockType.INLINE, EndTag.END), TABLE, TBODY, TD, TH, TITLE(BlockType.OTHER, EndTag.END), TR, TT(BlockType.INLINE, EndTag.END), UL; public final BlockType blockType; public final EndTag endTag; public final String value; /** * Enum representing the type of HTML element. */ public static enum BlockType { BLOCK, INLINE, OTHER; } /** * Enum representing HTML end tag requirement. */ public static enum EndTag { END, NOEND; } HtmlTag() { this(BlockType.BLOCK, EndTag.END); } HtmlTag(BlockType blockType, EndTag endTag ) { this.blockType = blockType; this.endTag = endTag; this.value = name().toLowerCase(); } /** * Returns true if the end tag is required. This is specific to the standard * doclet and does not exactly resemble the W3C specifications. * * @return true if end tag needs to be displayed else return false */ public boolean endTagRequired() { return (endTag == EndTag.END); } public String toString() { return value; } } ././@LongLink0000000000000000000000000000015100000000000011212 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTree.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTree.0000644000000000000000000007215712214026367032064 0ustar 00000000000000/* * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html.markup; import java.io.IOException; import java.io.Writer; import java.util.*; import com.sun.tools.doclets.internal.toolkit.Content; import com.sun.tools.doclets.internal.toolkit.util.*; /** * Class for generating HTML tree for javadoc output. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Bhavesh Patel */ public class HtmlTree extends Content { private HtmlTag htmlTag; private Map attrs = Collections.emptyMap(); private List content = Collections.emptyList(); public static final Content EMPTY = new StringContent(""); /** * Constructor to construct HtmlTree object. * * @param tag HTML tag for the HtmlTree object */ public HtmlTree(HtmlTag tag) { htmlTag = nullCheck(tag); } /** * Constructor to construct HtmlTree object. * * @param tag HTML tag for the HtmlTree object * @param contents contents to be added to the tree */ public HtmlTree(HtmlTag tag, Content... contents) { this(tag); for (Content content: contents) addContent(content); } /** * Adds an attribute for the HTML tag. * * @param attrName name of the attribute * @param attrValue value of the attribute */ public void addAttr(HtmlAttr attrName, String attrValue) { if (attrs.isEmpty()) attrs = new LinkedHashMap(3); attrs.put(nullCheck(attrName), escapeHtmlChars(attrValue)); } public void setTitle(Content body) { addAttr(HtmlAttr.TITLE, stripHtml(body)); } /** * Adds a style for the HTML tag. * * @param style style to be added */ public void addStyle(HtmlStyle style) { addAttr(HtmlAttr.CLASS, style.toString()); } /** * Adds content for the HTML tag. * * @param tagContent tag content to be added */ public void addContent(Content tagContent) { if (tagContent == HtmlTree.EMPTY || tagContent.isValid()) { if (content.isEmpty()) content = new ArrayList(); content.add(tagContent); } } /** * This method adds a string content to the htmltree. If the last content member * added is a StringContent, append the string to that StringContent or else * create a new StringContent and add it to the html tree. * * @param stringContent string content that needs to be added */ public void addContent(String stringContent) { if (!content.isEmpty()) { Content lastContent = content.get(content.size() - 1); if (lastContent instanceof StringContent) lastContent.addContent(stringContent); else addContent(new StringContent(stringContent)); } else addContent(new StringContent(stringContent)); } public int charCount() { int n = 0; for (Content c : content) n += c.charCount(); return n; } /** * Given a string, escape all special html characters and * return the result. * * @param s The string to check. * @return the original string with all of the HTML characters escaped. */ private static String escapeHtmlChars(String s) { for (int i = 0; i < s.length(); i++) { char ch = s.charAt(i); switch (ch) { // only start building a new string if we need to case '<': case '>': case '&': StringBuilder sb = new StringBuilder(s.substring(0, i)); for ( ; i < s.length(); i++) { ch = s.charAt(i); switch (ch) { case '<': sb.append("<"); break; case '>': sb.append(">"); break; case '&': sb.append("&"); break; default: sb.append(ch); break; } } return sb.toString(); } } return s; } /** * Generates an HTML anchor tag. * * @param ref reference url for the anchor tag * @param body content for the anchor tag * @return an HtmlTree object */ public static HtmlTree A(String ref, Content body) { HtmlTree htmltree = new HtmlTree(HtmlTag.A, nullCheck(body)); htmltree.addAttr(HtmlAttr.HREF, ref); return htmltree; } /** * Generates an HTML anchor tag with name attribute and content. * * @param name name for the anchor tag * @param body content for the anchor tag * @return an HtmlTree object */ public static HtmlTree A_NAME(String name, Content body) { HtmlTree htmltree = HtmlTree.A_NAME(name); htmltree.addContent(nullCheck(body)); return htmltree; } /** * Generates an HTML anchor tag with name attribute. * * @param name name for the anchor tag * @return an HtmlTree object */ public static HtmlTree A_NAME(String name) { HtmlTree htmltree = new HtmlTree(HtmlTag.A); htmltree.addAttr(HtmlAttr.NAME, nullCheck(name)); return htmltree; } /** * Generates a CAPTION tag with some content. * * @param body content for the tag * @return an HtmlTree object for the CAPTION tag */ public static HtmlTree CAPTION(Content body) { HtmlTree htmltree = new HtmlTree(HtmlTag.CAPTION, nullCheck(body)); return htmltree; } /** * Generates a CODE tag with some content. * * @param body content for the tag * @return an HtmlTree object for the CODE tag */ public static HtmlTree CODE(Content body) { HtmlTree htmltree = new HtmlTree(HtmlTag.CODE, nullCheck(body)); return htmltree; } /** * Generates a DD tag with some content. * * @param body content for the tag * @return an HtmlTree object for the DD tag */ public static HtmlTree DD(Content body) { HtmlTree htmltree = new HtmlTree(HtmlTag.DD, nullCheck(body)); return htmltree; } /** * Generates a DL tag with some content. * * @param body content for the tag * @return an HtmlTree object for the DL tag */ public static HtmlTree DL(Content body) { HtmlTree htmltree = new HtmlTree(HtmlTag.DL, nullCheck(body)); return htmltree; } /** * Generates a DIV tag with the style class attributes. It also encloses * a content. * * @param styleClass stylesheet class for the tag * @param body content for the tag * @return an HtmlTree object for the DIV tag */ public static HtmlTree DIV(HtmlStyle styleClass, Content body) { HtmlTree htmltree = new HtmlTree(HtmlTag.DIV, nullCheck(body)); if (styleClass != null) htmltree.addStyle(styleClass); return htmltree; } /** * Generates a DIV tag with some content. * * @param body content for the tag * @return an HtmlTree object for the DIV tag */ public static HtmlTree DIV(Content body) { return DIV(null, body); } /** * Generates a DT tag with some content. * * @param body content for the tag * @return an HtmlTree object for the DT tag */ public static HtmlTree DT(Content body) { HtmlTree htmltree = new HtmlTree(HtmlTag.DT, nullCheck(body)); return htmltree; } /** * Generates a EM tag with some content. * * @param body content to be added to the tag * @return an HtmlTree object for the EM tag */ public static HtmlTree EM(Content body) { HtmlTree htmltree = new HtmlTree(HtmlTag.EM, nullCheck(body)); return htmltree; } /** * Generates a FRAME tag. * * @param src the url of the document to be shown in the frame * @param name specifies the name of the frame * @param title the title for the frame * @param scrolling specifies whether to display scrollbars in the frame * @return an HtmlTree object for the FRAME tag */ public static HtmlTree FRAME(String src, String name, String title, String scrolling) { HtmlTree htmltree = new HtmlTree(HtmlTag.FRAME); htmltree.addAttr(HtmlAttr.SRC, nullCheck(src)); htmltree.addAttr(HtmlAttr.NAME, nullCheck(name)); htmltree.addAttr(HtmlAttr.TITLE, nullCheck(title)); if (scrolling != null) htmltree.addAttr(HtmlAttr.SCROLLING, scrolling); return htmltree; } /** * Generates a Frame tag. * * @param src the url of the document to be shown in the frame * @param name specifies the name of the frame * @param title the title for the frame * @return an HtmlTree object for the SPAN tag */ public static HtmlTree FRAME(String src, String name, String title) { return FRAME(src, name, title, null); } /** * Generates a FRAMESET tag. * * @param cols the size of columns in the frameset * @param rows the size of rows in the frameset * @param title the title for the frameset * @param onload the script to run when the document loads * @return an HtmlTree object for the FRAMESET tag */ public static HtmlTree FRAMESET(String cols, String rows, String title, String onload) { HtmlTree htmltree = new HtmlTree(HtmlTag.FRAMESET); if (cols != null) htmltree.addAttr(HtmlAttr.COLS, cols); if (rows != null) htmltree.addAttr(HtmlAttr.ROWS, rows); htmltree.addAttr(HtmlAttr.TITLE, nullCheck(title)); htmltree.addAttr(HtmlAttr.ONLOAD, nullCheck(onload)); return htmltree; } /** * Generates a heading tag (h1 to h6) with the title and style class attributes. It also encloses * a content. * * @param headingTag the heading tag to be generated * @param printTitle true if title for the tag needs to be printed else false * @param styleClass stylesheet class for the tag * @param body content for the tag * @return an HtmlTree object for the tag */ public static HtmlTree HEADING(HtmlTag headingTag, boolean printTitle, HtmlStyle styleClass, Content body) { HtmlTree htmltree = new HtmlTree(headingTag, nullCheck(body)); if (printTitle) htmltree.setTitle(body); if (styleClass != null) htmltree.addStyle(styleClass); return htmltree; } /** * Generates a heading tag (h1 to h6) with style class attribute. It also encloses * a content. * * @param headingTag the heading tag to be generated * @param styleClass stylesheet class for the tag * @param body content for the tag * @return an HtmlTree object for the tag */ public static HtmlTree HEADING(HtmlTag headingTag, HtmlStyle styleClass, Content body) { return HEADING(headingTag, false, styleClass, body); } /** * Generates a heading tag (h1 to h6) with the title attribute. It also encloses * a content. * * @param headingTag the heading tag to be generated * @param printTitle true if the title for the tag needs to be printed else false * @param body content for the tag * @return an HtmlTree object for the tag */ public static HtmlTree HEADING(HtmlTag headingTag, boolean printTitle, Content body) { return HEADING(headingTag, printTitle, null, body); } /** * Generates a heading tag (h1 to h6) with some content. * * @param headingTag the heading tag to be generated * @param body content for the tag * @return an HtmlTree object for the tag */ public static HtmlTree HEADING(HtmlTag headingTag, Content body) { return HEADING(headingTag, false, null, body); } /** * Generates an HTML tag with lang attribute. It also adds head and body * content to the HTML tree. * * @param lang language for the HTML document * @param head head for the HTML tag * @param body body for the HTML tag * @return an HtmlTree object for the HTML tag */ public static HtmlTree HTML(String lang, Content head, Content body) { HtmlTree htmltree = new HtmlTree(HtmlTag.HTML, nullCheck(head), nullCheck(body)); htmltree.addAttr(HtmlAttr.LANG, nullCheck(lang)); return htmltree; } /** * Generates a I tag with some content. * * @param body content for the tag * @return an HtmlTree object for the I tag */ public static HtmlTree I(Content body) { HtmlTree htmltree = new HtmlTree(HtmlTag.I, nullCheck(body)); return htmltree; } /** * Generates a LI tag with some content. * * @param body content for the tag * @return an HtmlTree object for the LI tag */ public static HtmlTree LI(Content body) { return LI(null, body); } /** * Generates a LI tag with some content. * * @param styleClass style for the tag * @param body content for the tag * @return an HtmlTree object for the LI tag */ public static HtmlTree LI(HtmlStyle styleClass, Content body) { HtmlTree htmltree = new HtmlTree(HtmlTag.LI, nullCheck(body)); if (styleClass != null) htmltree.addStyle(styleClass); return htmltree; } /** * Generates a LINK tag with the rel, type, href and title attributes. * * @param rel relevance of the link * @param type type of link * @param href the path for the link * @param title title for the link * @return an HtmlTree object for the LINK tag */ public static HtmlTree LINK(String rel, String type, String href, String title) { HtmlTree htmltree = new HtmlTree(HtmlTag.LINK); htmltree.addAttr(HtmlAttr.REL, nullCheck(rel)); htmltree.addAttr(HtmlAttr.TYPE, nullCheck(type)); htmltree.addAttr(HtmlAttr.HREF, nullCheck(href)); htmltree.addAttr(HtmlAttr.TITLE, nullCheck(title)); return htmltree; } /** * Generates a META tag with the http-equiv, content and charset attributes. * * @param httpEquiv http equiv attribute for the META tag * @param content type of content * @param charSet character set used * @return an HtmlTree object for the META tag */ public static HtmlTree META(String httpEquiv, String content, String charSet) { HtmlTree htmltree = new HtmlTree(HtmlTag.META); htmltree.addAttr(HtmlAttr.HTTP_EQUIV, nullCheck(httpEquiv)); htmltree.addAttr(HtmlAttr.CONTENT, nullCheck(content)); htmltree.addAttr(HtmlAttr.CHARSET, nullCheck(charSet)); return htmltree; } /** * Generates a META tag with the name and content attributes. * * @param name name attribute * @param content type of content * @return an HtmlTree object for the META tag */ public static HtmlTree META(String name, String content) { HtmlTree htmltree = new HtmlTree(HtmlTag.META); htmltree.addAttr(HtmlAttr.NAME, nullCheck(name)); htmltree.addAttr(HtmlAttr.CONTENT, nullCheck(content)); return htmltree; } /** * Generates a NOSCRIPT tag with some content. * * @param body content of the noscript tag * @return an HtmlTree object for the NOSCRIPT tag */ public static HtmlTree NOSCRIPT(Content body) { HtmlTree htmltree = new HtmlTree(HtmlTag.NOSCRIPT, nullCheck(body)); return htmltree; } /** * Generates a P tag with some content. * * @param body content of the Paragraph tag * @return an HtmlTree object for the P tag */ public static HtmlTree P(Content body) { return P(null, body); } /** * Generates a P tag with some content. * * @param styleClass style of the Paragraph tag * @param body content of the Paragraph tag * @return an HtmlTree object for the P tag */ public static HtmlTree P(HtmlStyle styleClass, Content body) { HtmlTree htmltree = new HtmlTree(HtmlTag.P, nullCheck(body)); if (styleClass != null) htmltree.addStyle(styleClass); return htmltree; } /** * Generates a SCRIPT tag with the type and src attributes. * * @param type type of link * @param src the path for the script * @return an HtmlTree object for the SCRIPT tag */ public static HtmlTree SCRIPT(String type, String src) { HtmlTree htmltree = new HtmlTree(HtmlTag.SCRIPT); htmltree.addAttr(HtmlAttr.TYPE, nullCheck(type)); htmltree.addAttr(HtmlAttr.SRC, nullCheck(src)); return htmltree; } /** * Generates a SMALL tag with some content. * * @param body content for the tag * @return an HtmlTree object for the SMALL tag */ public static HtmlTree SMALL(Content body) { HtmlTree htmltree = new HtmlTree(HtmlTag.SMALL, nullCheck(body)); return htmltree; } /** * Generates a STRONG tag with some content. * * @param body content for the tag * @return an HtmlTree object for the STRONG tag */ public static HtmlTree STRONG(Content body) { HtmlTree htmltree = new HtmlTree(HtmlTag.STRONG, nullCheck(body)); return htmltree; } /** * Generates a SPAN tag with some content. * * @param body content for the tag * @return an HtmlTree object for the SPAN tag */ public static HtmlTree SPAN(Content body) { return SPAN(null, body); } /** * Generates a SPAN tag with style class attribute and some content. * * @param styleClass style class for the tag * @param body content for the tag * @return an HtmlTree object for the SPAN tag */ public static HtmlTree SPAN(HtmlStyle styleClass, Content body) { HtmlTree htmltree = new HtmlTree(HtmlTag.SPAN, nullCheck(body)); if (styleClass != null) htmltree.addStyle(styleClass); return htmltree; } /** * Generates a SPAN tag with id and style class attributes. It also encloses * a content. * * @param id the id for the tag * @param styleClass stylesheet class for the tag * @param body content for the tag * @return an HtmlTree object for the SPAN tag */ public static HtmlTree SPAN(String id, HtmlStyle styleClass, Content body) { HtmlTree htmltree = new HtmlTree(HtmlTag.SPAN, nullCheck(body)); htmltree.addAttr(HtmlAttr.ID, nullCheck(id)); if (styleClass != null) htmltree.addStyle(styleClass); return htmltree; } /** * Generates a Table tag with border, width and summary attributes and * some content. * * @param border border for the table * @param width width of the table * @param summary summary for the table * @param body content for the table * @return an HtmlTree object for the TABLE tag */ public static HtmlTree TABLE(int border, int width, String summary, Content body) { HtmlTree htmltree = new HtmlTree(HtmlTag.TABLE, nullCheck(body)); htmltree.addAttr(HtmlAttr.BORDER, Integer.toString(border)); htmltree.addAttr(HtmlAttr.WIDTH, Integer.toString(width)); htmltree.addAttr(HtmlAttr.SUMMARY, nullCheck(summary)); return htmltree; } /** * Generates a Table tag with style class, border, cell padding, * cellspacing and summary attributes and some content. * * @param styleClass style of the table * @param border border for the table * @param cellPadding cell padding for the table * @param cellSpacing cell spacing for the table * @param summary summary for the table * @param body content for the table * @return an HtmlTree object for the TABLE tag */ public static HtmlTree TABLE(HtmlStyle styleClass, int border, int cellPadding, int cellSpacing, String summary, Content body) { HtmlTree htmltree = new HtmlTree(HtmlTag.TABLE, nullCheck(body)); if (styleClass != null) htmltree.addStyle(styleClass); htmltree.addAttr(HtmlAttr.BORDER, Integer.toString(border)); htmltree.addAttr(HtmlAttr.CELLPADDING, Integer.toString(cellPadding)); htmltree.addAttr(HtmlAttr.CELLSPACING, Integer.toString(cellSpacing)); htmltree.addAttr(HtmlAttr.SUMMARY, nullCheck(summary)); return htmltree; } /** * Generates a Table tag with border, cell padding, * cellspacing and summary attributes and some content. * * @param border border for the table * @param cellPadding cell padding for the table * @param cellSpacing cell spacing for the table * @param summary summary for the table * @param body content for the table * @return an HtmlTree object for the TABLE tag */ public static HtmlTree TABLE(int border, int cellPadding, int cellSpacing, String summary, Content body) { return TABLE(null, border, cellPadding, cellSpacing, summary, body); } /** * Generates a TD tag with style class attribute and some content. * * @param styleClass style for the tag * @param body content for the tag * @return an HtmlTree object for the TD tag */ public static HtmlTree TD(HtmlStyle styleClass, Content body) { HtmlTree htmltree = new HtmlTree(HtmlTag.TD, nullCheck(body)); if (styleClass != null) htmltree.addStyle(styleClass); return htmltree; } /** * Generates a TD tag for an HTML table with some content. * * @param body content for the tag * @return an HtmlTree object for the TD tag */ public static HtmlTree TD(Content body) { return TD(null, body); } /** * Generates a TH tag with style class and scope attributes and some content. * * @param styleClass style for the tag * @param scope scope of the tag * @param body content for the tag * @return an HtmlTree object for the TH tag */ public static HtmlTree TH(HtmlStyle styleClass, String scope, Content body) { HtmlTree htmltree = new HtmlTree(HtmlTag.TH, nullCheck(body)); if (styleClass != null) htmltree.addStyle(styleClass); htmltree.addAttr(HtmlAttr.SCOPE, nullCheck(scope)); return htmltree; } /** * Generates a TH tag with scope attribute and some content. * * @param scope scope of the tag * @param body content for the tag * @return an HtmlTree object for the TH tag */ public static HtmlTree TH(String scope, Content body) { return TH(null, scope, body); } /** * Generates a TITLE tag with some content. * * @param body content for the tag * @return an HtmlTree object for the TITLE tag */ public static HtmlTree TITLE(Content body) { HtmlTree htmltree = new HtmlTree(HtmlTag.TITLE, nullCheck(body)); return htmltree; } /** * Generates a TR tag for an HTML table with some content. * * @param body content for the tag * @return an HtmlTree object for the TR tag */ public static HtmlTree TR(Content body) { HtmlTree htmltree = new HtmlTree(HtmlTag.TR, nullCheck(body)); return htmltree; } /** * Generates a UL tag with the style class attribute and some content. * * @param styleClass style for the tag * @param body content for the tag * @return an HtmlTree object for the UL tag */ public static HtmlTree UL(HtmlStyle styleClass, Content body) { HtmlTree htmltree = new HtmlTree(HtmlTag.UL, nullCheck(body)); htmltree.addStyle(nullCheck(styleClass)); return htmltree; } /** * {@inheritDoc} */ public boolean isEmpty() { return (!hasContent() && !hasAttrs()); } /** * Returns true if the HTML tree has content. * * @return true if the HTML tree has content else return false */ public boolean hasContent() { return (!content.isEmpty()); } /** * Returns true if the HTML tree has attributes. * * @return true if the HTML tree has attributes else return false */ public boolean hasAttrs() { return (!attrs.isEmpty()); } /** * Returns true if the HTML tree has a specific attribute. * * @param attrName name of the attribute to check within the HTML tree * @return true if the HTML tree has the specified attribute else return false */ public boolean hasAttr(HtmlAttr attrName) { return (attrs.containsKey(attrName)); } /** * Returns true if the HTML tree is valid. This check is more specific to * standard doclet and not exactly similar to W3C specifications. But it * ensures HTML validation. * * @return true if the HTML tree is valid */ public boolean isValid() { switch (htmlTag) { case A : return (hasAttr(HtmlAttr.NAME) || (hasAttr(HtmlAttr.HREF) && hasContent())); case BR : return (!hasContent() && (!hasAttrs() || hasAttr(HtmlAttr.CLEAR))); case FRAME : return (hasAttr(HtmlAttr.SRC) && !hasContent()); case HR : return (!hasContent()); case IMG : return (hasAttr(HtmlAttr.SRC) && hasAttr(HtmlAttr.ALT) && !hasContent()); case LINK : return (hasAttr(HtmlAttr.HREF) && !hasContent()); case META : return (hasAttr(HtmlAttr.CONTENT) && !hasContent()); case SCRIPT : return ((hasAttr(HtmlAttr.TYPE) && hasAttr(HtmlAttr.SRC) && !hasContent()) || (hasAttr(HtmlAttr.TYPE) && hasContent())); default : return hasContent(); } } /** * Returns true if the element is an inline element. * * @return true if the HTML tag is an inline element */ public boolean isInline() { return (htmlTag.blockType == HtmlTag.BlockType.INLINE); } /** * {@inheritDoc} */ @Override public boolean write(Writer out, boolean atNewline) throws IOException { if (!isInline() && !atNewline) out.write(DocletConstants.NL); String tagString = htmlTag.toString(); out.write("<"); out.write(tagString); Iterator iterator = attrs.keySet().iterator(); HtmlAttr key; String value; while (iterator.hasNext()) { key = iterator.next(); value = attrs.get(key); out.write(" "); out.write(key.toString()); if (!value.isEmpty()) { out.write("=\""); out.write(value); out.write("\""); } } out.write(">"); boolean nl = false; for (Content c : content) nl = c.write(out, nl); if (htmlTag.endTagRequired()) { out.write(""); } if (!isInline()) { out.write(DocletConstants.NL); return true; } else { return false; } } /** * Given a Content node, strips all html characters and * return the result. * * @param body The content node to check. * @return the plain text from the content node * */ private static String stripHtml(Content body) { String rawString = body.toString(); // remove HTML tags rawString = rawString.replaceAll("\\<.*?>", " "); // consolidate multiple spaces between a word to a single space rawString = rawString.replaceAll("\\b\\s{2,}\\b", " "); // remove extra whitespaces return rawString.trim(); } } ././@LongLink0000000000000000000000000000015300000000000011214 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWrite0000644000000000000000000004235412214026367032175 0ustar 00000000000000/* * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html.markup; import java.io.*; import java.util.*; import java.util.regex.Matcher; import java.util.regex.Pattern; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.*; /** * Class for the Html format code generation. * Initializes PrintWriter with FileWriter, to enable print * related methods to generate the code to the named File through FileWriter. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @since 1.2 * @author Atul M Dambalkar * @author Bhavesh Patel (Modified) */ public class HtmlWriter { /** * The window title of this file */ protected String winTitle; /** * The configuration */ protected Configuration configuration; /** * The flag to indicate whether a member details list is printed or not. */ protected boolean memberDetailsListPrinted; /** * Header for table displaying profiles and description.. */ protected final String[] profileTableHeader; /** * Header for tables displaying packages and description.. */ protected final String[] packageTableHeader; /** * Summary for use tables displaying class and package use. */ protected final String useTableSummary; /** * Column header for class docs displaying Modifier and Type header. */ protected final String modifierTypeHeader; public final Content overviewLabel; public final Content defaultPackageLabel; public final Content packageLabel; public final Content profileLabel; public final Content useLabel; public final Content prevLabel; public final Content nextLabel; public final Content prevclassLabel; public final Content nextclassLabel; public final Content summaryLabel; public final Content detailLabel; public final Content framesLabel; public final Content noframesLabel; public final Content treeLabel; public final Content classLabel; public final Content deprecatedLabel; public final Content deprecatedPhrase; public final Content allclassesLabel; public final Content allpackagesLabel; public final Content allprofilesLabel; public final Content indexLabel; public final Content helpLabel; public final Content seeLabel; public final Content descriptionLabel; public final Content prevpackageLabel; public final Content nextpackageLabel; public final Content prevprofileLabel; public final Content nextprofileLabel; public final Content packagesLabel; public final Content profilesLabel; public final Content methodDetailsLabel; public final Content annotationTypeDetailsLabel; public final Content fieldDetailsLabel; public final Content propertyDetailsLabel; public final Content constructorDetailsLabel; public final Content enumConstantsDetailsLabel; public final Content specifiedByLabel; public final Content overridesLabel; public final Content descfrmClassLabel; public final Content descfrmInterfaceLabel; private final Writer writer; private Content script; /** * Constructor. * * @param path The directory path to be created for this file * or null if none to be created. * @exception IOException Exception raised by the FileWriter is passed on * to next level. * @exception UnsupportedEncodingException Exception raised by the * OutputStreamWriter is passed on to next level. */ public HtmlWriter(Configuration configuration, DocPath path) throws IOException, UnsupportedEncodingException { writer = DocFile.createFileForOutput(configuration, path).openWriter(); this.configuration = configuration; this.memberDetailsListPrinted = false; profileTableHeader = new String[] { configuration.getText("doclet.Profile"), configuration.getText("doclet.Description") }; packageTableHeader = new String[] { configuration.getText("doclet.Package"), configuration.getText("doclet.Description") }; useTableSummary = configuration.getText("doclet.Use_Table_Summary", configuration.getText("doclet.packages")); modifierTypeHeader = configuration.getText("doclet.0_and_1", configuration.getText("doclet.Modifier"), configuration.getText("doclet.Type")); overviewLabel = getResource("doclet.Overview"); defaultPackageLabel = new StringContent(DocletConstants.DEFAULT_PACKAGE_NAME); packageLabel = getResource("doclet.Package"); profileLabel = getResource("doclet.Profile"); useLabel = getResource("doclet.navClassUse"); prevLabel = getResource("doclet.Prev"); nextLabel = getResource("doclet.Next"); prevclassLabel = getResource("doclet.Prev_Class"); nextclassLabel = getResource("doclet.Next_Class"); summaryLabel = getResource("doclet.Summary"); detailLabel = getResource("doclet.Detail"); framesLabel = getResource("doclet.Frames"); noframesLabel = getResource("doclet.No_Frames"); treeLabel = getResource("doclet.Tree"); classLabel = getResource("doclet.Class"); deprecatedLabel = getResource("doclet.navDeprecated"); deprecatedPhrase = getResource("doclet.Deprecated"); allclassesLabel = getResource("doclet.All_Classes"); allpackagesLabel = getResource("doclet.All_Packages"); allprofilesLabel = getResource("doclet.All_Profiles"); indexLabel = getResource("doclet.Index"); helpLabel = getResource("doclet.Help"); seeLabel = getResource("doclet.See"); descriptionLabel = getResource("doclet.Description"); prevpackageLabel = getResource("doclet.Prev_Package"); nextpackageLabel = getResource("doclet.Next_Package"); prevprofileLabel = getResource("doclet.Prev_Profile"); nextprofileLabel = getResource("doclet.Next_Profile"); packagesLabel = getResource("doclet.Packages"); profilesLabel = getResource("doclet.Profiles"); methodDetailsLabel = getResource("doclet.Method_Detail"); annotationTypeDetailsLabel = getResource("doclet.Annotation_Type_Member_Detail"); fieldDetailsLabel = getResource("doclet.Field_Detail"); propertyDetailsLabel = getResource("doclet.Property_Detail"); constructorDetailsLabel = getResource("doclet.Constructor_Detail"); enumConstantsDetailsLabel = getResource("doclet.Enum_Constant_Detail"); specifiedByLabel = getResource("doclet.Specified_By"); overridesLabel = getResource("doclet.Overrides"); descfrmClassLabel = getResource("doclet.Description_From_Class"); descfrmInterfaceLabel = getResource("doclet.Description_From_Interface"); } public void write(Content c) throws IOException { c.write(writer, true); } public void close() throws IOException { writer.close(); } /** * Get the configuration string as a content. * * @param key the key to look for in the configuration file * @return a content tree for the text */ public Content getResource(String key) { return configuration.getResource(key); } /** * Get the configuration string as a content. * * @param key the key to look for in the configuration file * @param o string or content argument added to configuration text * @return a content tree for the text */ public Content getResource(String key, Object o) { return configuration.getResource(key, o); } /** * Get the configuration string as a content. * * @param key the key to look for in the configuration file * @param o1 string or content argument added to configuration text * @param o2 string or content argument added to configuration text * @return a content tree for the text */ public Content getResource(String key, Object o0, Object o1) { return configuration.getResource(key, o0, o1); } /** * Returns an HtmlTree for the SCRIPT tag. * * @return an HtmlTree for the SCRIPT tag */ protected HtmlTree getWinTitleScript(){ HtmlTree script = new HtmlTree(HtmlTag.SCRIPT); if(winTitle != null && winTitle.length() > 0) { script.addAttr(HtmlAttr.TYPE, "text/javascript"); String scriptCode = "" + DocletConstants.NL; RawHtml scriptContent = new RawHtml(scriptCode); script.addContent(scriptContent); } return script; } /** * Returns a content tree for the SCRIPT tag for the main page(index.html). * * @return a content for the SCRIPT tag */ protected Content getFramesetJavaScript() { HtmlTree script = new HtmlTree(HtmlTag.SCRIPT); script.addAttr(HtmlAttr.TYPE, "text/javascript"); String scriptCode = DocletConstants.NL + " targetPage = \"\" + window.location.search;" + DocletConstants.NL + " if (targetPage != \"\" && targetPage != \"undefined\")" + DocletConstants.NL + " targetPage = targetPage.substring(1);" + DocletConstants.NL + " if (targetPage.indexOf(\":\") != -1 || (targetPage != \"\" && !validURL(targetPage)))" + DocletConstants.NL + " targetPage = \"undefined\";" + DocletConstants.NL + " function validURL(url) {" + DocletConstants.NL + " var pos = url.indexOf(\".html\");" + DocletConstants.NL + " if (pos == -1 || pos != url.length - 5)" + DocletConstants.NL + " return false;" + DocletConstants.NL + " var allowNumber = false;" + DocletConstants.NL + " var allowSep = false;" + DocletConstants.NL + " var seenDot = false;" + DocletConstants.NL + " for (var i = 0; i < url.length - 5; i++) {" + DocletConstants.NL + " var ch = url.charAt(i);" + DocletConstants.NL + " if ('a' <= ch && ch <= 'z' ||" + DocletConstants.NL + " 'A' <= ch && ch <= 'Z' ||" + DocletConstants.NL + " ch == '$' ||" + DocletConstants.NL + " ch == '_') {" + DocletConstants.NL + " allowNumber = true;" + DocletConstants.NL + " allowSep = true;" + DocletConstants.NL + " } else if ('0' <= ch && ch <= '9'" + DocletConstants.NL + " || ch == '-') {" + DocletConstants.NL + " if (!allowNumber)" + DocletConstants.NL + " return false;" + DocletConstants.NL + " } else if (ch == '/' || ch == '.') {" + DocletConstants.NL + " if (!allowSep)" + DocletConstants.NL + " return false;" + DocletConstants.NL + " allowNumber = false;" + DocletConstants.NL + " allowSep = false;" + DocletConstants.NL + " if (ch == '.')" + DocletConstants.NL + " seenDot = true;" + DocletConstants.NL + " if (ch == '/' && seenDot)" + DocletConstants.NL + " return false;" + DocletConstants.NL + " } else {" + DocletConstants.NL + " return false;"+ DocletConstants.NL + " }" + DocletConstants.NL + " }" + DocletConstants.NL + " return true;" + DocletConstants.NL + " }" + DocletConstants.NL + " function loadFrames() {" + DocletConstants.NL + " if (targetPage != \"\" && targetPage != \"undefined\")" + DocletConstants.NL + " top.classFrame.location = top.targetPage;" + DocletConstants.NL + " }" + DocletConstants.NL; RawHtml scriptContent = new RawHtml(scriptCode); script.addContent(scriptContent); return script; } /** * Returns an HtmlTree for the BODY tag. * * @param includeScript set true if printing windowtitle script * @param title title for the window * @return an HtmlTree for the BODY tag */ public HtmlTree getBody(boolean includeScript, String title) { HtmlTree body = new HtmlTree(HtmlTag.BODY); // Set window title string which is later printed this.winTitle = title; // Don't print windowtitle script for overview-frame, allclasses-frame // and package-frame if (includeScript) { this.script = getWinTitleScript(); body.addContent(script); Content noScript = HtmlTree.NOSCRIPT( HtmlTree.DIV(getResource("doclet.No_Script_Message"))); body.addContent(noScript); } return body; } /** * Generated javascript variables for the document. * * @param typeMap map comprising of method and type relationship * @param methodTypes set comprising of all methods types for this class */ public void generateMethodTypesScript(Map typeMap, Set methodTypes) { String sep = ""; StringBuilder vars = new StringBuilder("var methods = {"); for (Map.Entry entry : typeMap.entrySet()) { vars.append(sep); sep = ","; vars.append("\""); vars.append(entry.getKey()); vars.append("\":"); vars.append(entry.getValue()); } vars.append("};").append(DocletConstants.NL); sep = ""; vars.append("var tabs = {"); for (MethodTypes entry : methodTypes) { vars.append(sep); sep = ","; vars.append(entry.value()).append(":"); vars.append("[").append("\"").append(entry.tabId()); vars.append("\"").append(sep).append("\"").append(entry.text()).append("\"]"); } vars.append("};").append(DocletConstants.NL); addStyles(HtmlStyle.altColor, vars); addStyles(HtmlStyle.rowColor, vars); addStyles(HtmlStyle.tableTab, vars); addStyles(HtmlStyle.activeTableTab, vars); script.addContent(new RawHtml(vars.toString())); } /** * Adds javascript style variables to the document. * * @param style style to be added as a javascript variable * @param vars variable string to which the style variable will be added */ public void addStyles(HtmlStyle style, StringBuilder vars) { vars.append("var ").append(style).append(" = \"").append(style) .append("\";").append(DocletConstants.NL); } /** * Returns an HtmlTree for the TITLE tag. * * @return an HtmlTree for the TITLE tag */ public HtmlTree getTitle() { HtmlTree title = HtmlTree.TITLE(new StringContent(winTitle)); return title; } public String codeText(String text) { return "" + text + ""; } /** * Return "&nbsp;", non-breaking space. */ public Content getSpace() { return RawHtml.nbsp; } /* * Returns a header for Modifier and Type column of a table. */ public String getModifierTypeHeader() { return modifierTypeHeader; } } ././@LongLink0000000000000000000000000000015000000000000011211 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/markup/RawHtml.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/markup/RawHtml.j0000644000000000000000000001162012214026367032054 0ustar 00000000000000/* * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html.markup; import java.io.IOException; import java.io.Writer; import com.sun.tools.doclets.internal.toolkit.Content; import com.sun.tools.doclets.internal.toolkit.util.*; /** * Class for generating raw HTML content to be added to HTML pages of javadoc output. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Bhavesh Patel */ public class RawHtml extends Content { private String rawHtmlContent; public static final Content nbsp = new RawHtml(" "); /** * Constructor to construct a RawHtml object. * * @param rawHtml raw HTML text to be added */ public RawHtml(String rawHtml) { rawHtmlContent = nullCheck(rawHtml); } /** * This method is not supported by the class. * * @param content content that needs to be added * @throws DocletAbortException this method will always throw a * DocletAbortException because it * is not supported. */ public void addContent(Content content) { throw new DocletAbortException(); } /** * This method is not supported by the class. * * @param stringContent string content that needs to be added * @throws DocletAbortException this method will always throw a * DocletAbortException because it * is not supported. */ public void addContent(String stringContent) { throw new DocletAbortException(); } /** * {@inheritDoc} */ public boolean isEmpty() { return rawHtmlContent.isEmpty(); } /** * {@inheritDoc} */ @Override public String toString() { return rawHtmlContent; } private enum State { TEXT, ENTITY, TAG, STRING }; @Override public int charCount() { return charCount(rawHtmlContent); } static int charCount(String htmlText) { State state = State.TEXT; int count = 0; for (int i = 0; i < htmlText.length(); i++) { char c = htmlText.charAt(i); switch (state) { case TEXT: switch (c) { case '<': state = State.TAG; break; case '&': state = State.ENTITY; count++; break; default: count++; } break; case ENTITY: if (!Character.isLetterOrDigit(c)) state = State.TEXT; break; case TAG: switch (c) { case '"': state = State.STRING; break; case '>': state = State.TEXT; break; } break; case STRING: switch (c) { case '"': state = State.TAG; break; } } } return count; } /** * {@inheritDoc} */ @Override public boolean write(Writer out, boolean atNewline) throws IOException { out.write(rawHtmlContent); return rawHtmlContent.endsWith(DocletConstants.NL); } } ././@LongLink0000000000000000000000000000015600000000000011217 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/markup/StringContent.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/markup/StringCon0000644000000000000000000000767112214026367032167 0ustar 00000000000000/* * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.formats.html.markup; import java.io.IOException; import java.io.Writer; import com.sun.tools.doclets.internal.toolkit.Content; import com.sun.tools.doclets.internal.toolkit.util.*; /** * Class for generating string content for HTML tags of javadoc output. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Bhavesh Patel */ public class StringContent extends Content { private StringBuilder stringContent; /** * Constructor to construct StringContent object. */ public StringContent() { stringContent = new StringBuilder(); } /** * Constructor to construct StringContent object with some initial content. * * @param initialContent initial content for the object */ public StringContent(String initialContent) { stringContent = new StringBuilder(); appendChars(initialContent); } /** * This method is not supported by the class. * * @param content content that needs to be added * @throws DocletAbortException this method will always throw a * DocletAbortException because it * is not supported. */ public void addContent(Content content) { throw new DocletAbortException(); } /** * Adds content for the StringContent object. The method escapes * HTML characters for the string content that is added. * * @param strContent string content to be added */ public void addContent(String strContent) { appendChars(strContent); } /** * {@inheritDoc} */ public boolean isEmpty() { return (stringContent.length() == 0); } public int charCount() { return RawHtml.charCount(stringContent.toString()); } /** * {@inheritDoc} */ public String toString() { return stringContent.toString(); } /** * {@inheritDoc} */ @Override public boolean write(Writer out, boolean atNewline) throws IOException { String s = stringContent.toString(); out.write(s); return s.endsWith(DocletConstants.NL); } private void appendChars(String s) { for (int i = 0; i < s.length(); i++) { char ch = s.charAt(i); switch (ch) { case '<': stringContent.append("<"); break; case '>': stringContent.append(">"); break; case '&': stringContent.append("&"); break; default: stringContent.append(ch); break; } } } } ././@LongLink0000000000000000000000000000015000000000000011211 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/markup/package.htmllibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/markup/package.h0000644000000000000000000000251312214026367032070 0ustar 00000000000000 com.sun.tools.doclets.formats.html.markup package This package contains classes that write HTML markup tags. libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/package.html0000644000000000000000000000316212214026367031307 0ustar 00000000000000 com.sun.tools.doclets.formats.html package This is the default doclet provided with JDK that produces Javadoc's default HTML-formatted API output. For more documentation on this doclet, please refer to the link below. @see http://www.java.sun.com/javadoc/standard-doclet.html ././@LongLink0000000000000000000000000000016200000000000011214 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/resources/standard.propertieslibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/resources/standa0000644000000000000000000003575112214026367032246 0ustar 00000000000000doclet.build_version=Standard Doclet version {0} doclet.Contents=Contents doclet.Overview=Overview doclet.Window_Overview=Overview List doclet.Window_Overview_Summary=Overview doclet.Package=Package doclet.Profile=Profile doclet.All_Packages=All Packages doclet.All_Profiles=All Profiles doclet.Tree=Tree doclet.Class_Hierarchy=Class Hierarchy doclet.Window_Class_Hierarchy=Class Hierarchy doclet.Interface_Hierarchy=Interface Hierarchy doclet.Enum_Hierarchy=Enum Hierarchy doclet.Annotation_Type_Hierarchy=Annotation Type Hierarchy doclet.Prev=Prev doclet.Next=Next doclet.Prev_Class=Prev Class doclet.Next_Class=Next Class doclet.Prev_Package=Prev Package doclet.Next_Package=Next Package doclet.Prev_Profile=Prev Profile doclet.Next_Profile=Next Profile doclet.Prev_Letter=Prev Letter doclet.Next_Letter=Next Letter doclet.Href_Class_Title=class in {0} doclet.Href_Interface_Title=interface in {0} doclet.Href_Annotation_Title=annotation in {0} doclet.Href_Enum_Title=enum in {0} doclet.Href_Type_Param_Title=type parameter in {0} doclet.Href_Class_Or_Interface_Title=class or interface in {0} doclet.Summary=Summary: doclet.Detail=Detail: doclet.navNested=Nested doclet.navAnnotationTypeOptionalMember=Optional doclet.navAnnotationTypeRequiredMember=Required doclet.navAnnotationTypeMember=Element doclet.navField=Field doclet.navProperty=Property doclet.navEnum=Enum Constants doclet.navConstructor=Constr doclet.navMethod=Method doclet.Index=Index doclet.Window_Single_Index=Index doclet.Window_Split_Index={0}-Index doclet.Help=Help doclet.Skip_navigation_links=Skip navigation links doclet.Navigation=Navigation doclet.New_Page=NewPage doclet.navDeprecated=Deprecated doclet.Window_Deprecated_List=Deprecated List doclet.Overrides=Overrides: doclet.in_class=in class doclet.Static_variable_in=Static variable in {0} doclet.Variable_in=Variable in {0} doclet.Constructor_for=Constructor for {0} doclet.Static_method_in=Static method in {0} doclet.Method_in=Method in {0} doclet.package=package doclet.MalformedURL=Malformed URL: {0} doclet.File_error=Error reading file: {0} doclet.URL_error=Error fetching URL: {0} doclet.see.class_or_package_not_found=Tag {0}: reference not found: {1} doclet.see.class_or_package_not_accessible=Tag {0}: reference not accessible: {1} doclet.Deprecated_API=Deprecated API doclet.Deprecated_Packages=Deprecated Packages doclet.Deprecated_Classes=Deprecated Classes doclet.Deprecated_Enums=Deprecated Enums doclet.Deprecated_Interfaces=Deprecated Interfaces doclet.Deprecated_Exceptions=Deprecated Exceptions doclet.Deprecated_Annotation_Types=Deprecated Annotation Types doclet.Deprecated_Errors=Deprecated Errors doclet.Deprecated_Fields=Deprecated Fields doclet.Deprecated_Constructors=Deprecated Constructors doclet.Deprecated_Methods=Deprecated Methods doclet.Deprecated_Enum_Constants=Deprecated Enum Constants doclet.Deprecated_Annotation_Type_Members=Deprecated Annotation Type Elements doclet.deprecated_packages=deprecated packages doclet.deprecated_classes=deprecated classes doclet.deprecated_enums=deprecated enums doclet.deprecated_interfaces=deprecated interfaces doclet.deprecated_exceptions=deprecated exceptions doclet.deprecated_annotation_types=deprecated annotation types doclet.deprecated_errors=deprecated errors doclet.deprecated_fields=deprecated fields doclet.deprecated_constructors=deprecated constructors doclet.deprecated_methods=deprecated methods doclet.deprecated_enum_constants=deprecated enum constants doclet.deprecated_annotation_type_members=deprecated annotation type elements doclet.Generated_Docs_Untitled=Generated Documentation (Untitled) doclet.Other_Packages=Other Packages doclet.Package_Description=Package {0} Description doclet.Description=Description doclet.Specified_By=Specified by: doclet.in_interface=in interface doclet.Subclasses=Direct Known Subclasses: doclet.Subinterfaces=All Known Subinterfaces: doclet.Implementing_Classes=All Known Implementing Classes: doclet.Functional_Interface=Functional Interface: doclet.Functional_Interface_Message=This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference. doclet.also=also doclet.Frames=Frames doclet.No_Frames=No Frames doclet.Package_Hierarchies=Package Hierarchies: doclet.Hierarchy_For_Package=Hierarchy For Package {0} doclet.Hierarchy_For_All_Packages=Hierarchy For All Packages doclet.Frame_Alert=Frame Alert doclet.Frame_Warning_Message=This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. Link to {0}. doclet.No_Script_Message=JavaScript is disabled on your browser. doclet.Non_Frame_Version=Non-frame version doclet.Description_From_Interface=Description copied from interface: doclet.Description_From_Class=Description copied from class: doclet.No_Non_Deprecated_Classes_To_Document=No non-deprecated classes found to document. doclet.Interfaces_Italic=Interfaces (italic) doclet.Enclosing_Class=Enclosing class: doclet.Enclosing_Interface=Enclosing interface: doclet.Window_Source_title=Source code doclet.Window_Help_title=API Help doclet.Help_line_1=How This API Document Is Organized doclet.Help_line_2=This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows. doclet.Help_line_3=The {0} page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages. doclet.Help_line_4=Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories: doclet.Help_line_5=Class/Interface doclet.Help_line_6=Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions: doclet.Help_line_7=Class inheritance diagram doclet.Help_line_8=Direct Subclasses doclet.Help_line_9=All Known Subinterfaces doclet.Help_line_10=All Known Implementing Classes doclet.Help_line_11=Class/interface declaration doclet.Help_line_12=Class/interface description doclet.Help_line_13=Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer. doclet.Help_line_14=Use doclet.Help_line_15=Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar. doclet.Help_line_16=Tree (Class Hierarchy) doclet.Help_line_17_with_tree_link=There is a {0} page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with {1}. The interfaces do not inherit from {1}. doclet.Help_line_18=When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages. doclet.Help_line_19=When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package. doclet.Help_line_20_with_deprecated_api_link=The {0} page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations. doclet.Help_line_21=Index doclet.Help_line_22=The {0} contains an alphabetic list of all classes, interfaces, constructors, methods, and fields. doclet.Help_line_23=Prev/Next doclet.Help_line_24=These links take you to the next or previous class, interface, package, or related page. doclet.Help_line_25=Frames/No Frames doclet.Help_line_26=These links show and hide the HTML frames. All pages are available with or without frames. doclet.Help_line_27=The {0} link shows all classes and interfaces except non-static nested types. doclet.Help_line_28=Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description. doclet.Help_line_29=The {0} page lists the static final fields and their values. doclet.Help_line_30=This help file applies to API documentation generated using the standard doclet. doclet.Help_enum_line_1=Each enum has its own separate page with the following sections: doclet.Help_enum_line_2=Enum declaration doclet.Help_enum_line_3=Enum description doclet.Help_annotation_type_line_1=Each annotation type has its own separate page with the following sections: doclet.Help_annotation_type_line_2=Annotation Type declaration doclet.Help_annotation_type_line_3=Annotation Type description doclet.ClassUse_Packages.that.use.0=Packages that use {0} doclet.ClassUse_Uses.of.0.in.1=Uses of {0} in {1} doclet.ClassUse_Classes.in.0.used.by.1=Classes in {0} used by {1} doclet.ClassUse_PackageAnnotation=Packages with annotations of type {0} doclet.ClassUse_Annotation=Classes in {1} with annotations of type {0} doclet.ClassUse_TypeParameter=Classes in {1} with type parameters of type {0} doclet.ClassUse_MethodTypeParameter=Methods in {1} with type parameters of type {0} doclet.ClassUse_FieldTypeParameter=Fields in {1} with type parameters of type {0} doclet.ClassUse_FieldAnnotations=Fields in {1} with annotations of type {0} doclet.ClassUse_MethodAnnotations=Methods in {1} with annotations of type {0} doclet.ClassUse_MethodParameterAnnotations=Method parameters in {1} with annotations of type {0} doclet.ClassUse_MethodReturnTypeParameter=Methods in {1} that return types with arguments of type {0} doclet.ClassUse_Subclass=Subclasses of {0} in {1} doclet.ClassUse_Subinterface=Subinterfaces of {0} in {1} doclet.ClassUse_ImplementingClass=Classes in {1} that implement {0} doclet.ClassUse_Field=Fields in {1} declared as {0} doclet.ClassUse_MethodReturn=Methods in {1} that return {0} doclet.ClassUse_MethodArgs=Methods in {1} with parameters of type {0} doclet.ClassUse_MethodArgsTypeParameters=Method parameters in {1} with type arguments of type {0} doclet.ClassUse_MethodThrows=Methods in {1} that throw {0} doclet.ClassUse_ConstructorAnnotations=Constructors in {1} with annotations of type {0} doclet.ClassUse_ConstructorParameterAnnotations=Constructor parameters in {1} with annotations of type {0} doclet.ClassUse_ConstructorArgs=Constructors in {1} with parameters of type {0} doclet.ClassUse_ConstructorArgsTypeParameters=Constructor parameters in {1} with type arguments of type {0} doclet.ClassUse_ConstructorThrows=Constructors in {1} that throw {0} doclet.ClassUse_No.usage.of.0=No usage of {0} doclet.Window_ClassUse_Header=Uses of {0} {1} doclet.ClassUse_Title=Uses of {0} doclet.navClassUse=Use doclet.Error_in_packagelist=Error in using -group option: {0} {1} doclet.Groupname_already_used=In -group option, groupname already used: {0} doclet.Same_package_name_used=Package name format used twice: {0} doclet.exception_encountered=Exception encountered while processing {1}\n{0} doclet.usage=Provided by Standard doclet:\n\ \ -d Destination directory for output files\n\ \ -use Create class and package usage pages\n\ \ -version Include @version paragraphs\n\ \ -author Include @author paragraphs\n\ \ -docfilessubdirs Recursively copy doc-file subdirectories\n\ \ -splitindex Split index into one file per letter\n\ \ -windowtitle Browser window title for the documentation\n\ \ -doctitle Include title for the overview page\n\ \ -header Include header text for each page\n\ \ -footer Include footer text for each page\n\ \ -top Include top text for each page\n\ \ -bottom Include bottom text for each page\n\ \ -link Create links to javadoc output at \n\ \ -linkoffline Link to docs at using package list at \n\ \ -excludedocfilessubdir :.. Exclude any doc-files subdirectories with given name.\n\ \ -group :.. Group specified packages together in overview page\n\ \ -nocomment Suppress description and tags, generate only declarations.\n\ \ -nodeprecated Do not include @deprecated information\n\ \ -noqualifier ::... Exclude the list of qualifiers from the output.\n\ \ -nosince Do not include @since information\n\ \ -notimestamp Do not include hidden time stamp\n\ \ -nodeprecatedlist Do not generate deprecated list\n\ \ -notree Do not generate class hierarchy\n\ \ -noindex Do not generate index\n\ \ -nohelp Do not generate help link\n\ \ -nonavbar Do not generate navigation bar\n\ \ -serialwarn Generate warning about @serial tag\n\ \ -tag ::

Specify single argument custom tags\n\ \ -taglet The fully qualified name of Taglet to register\n\ \ -tagletpath The path to Taglets\n\ \ -charset Charset for cross-platform viewing of generated documentation.\n\ \ -helpfile Include file that help link links to\n\ \ -linksource Generate source in HTML\n\ \ -sourcetab Specify the number of spaces each tab takes up in the source\n\ \ -keywords Include HTML meta tags with package, class and member info\n\ \ -stylesheetfile File to change style of the generated documentation\n\ \ -docencoding Specify the character encoding for the output # L10N: do not localize these words: all none accessibility html missing reference syntax doclet.X.usage=Provided by standard doclet:\n\ \ -Xdocrootparent Replaces all appearances of @docRoot followed\n\ \ by /.. in doc comments with \n\ \ -Xdoclint Enable recommended checks for problems in javadoc comments\n\ \ -Xdoclint:(all|none|[-]) \n\ \ Enable or disable specific checks for problems in javadoc comments,\n\ \ where is one of accessibility, html, missing, reference, or syntax.\n ././@LongLink0000000000000000000000000000016500000000000011217 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/resources/standard_ja.propertieslibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/resources/standa0000644000000000000000000007133412214026367032243 0ustar 00000000000000doclet.build_version=\u6A19\u6E96Doclet\u30D0\u30FC\u30B8\u30E7\u30F3{0} doclet.Contents=\u30B3\u30F3\u30C6\u30F3\u30C4 doclet.Overview=\u6982\u8981 doclet.Window_Overview=\u6982\u8981\u30EA\u30B9\u30C8 doclet.Window_Overview_Summary=\u6982\u8981 doclet.Package=\u30D1\u30C3\u30B1\u30FC\u30B8 doclet.Profile=\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB doclet.All_Packages=\u3059\u3079\u3066\u306E\u30D1\u30C3\u30B1\u30FC\u30B8 doclet.All_Profiles=\u3059\u3079\u3066\u306E\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB doclet.Tree=\u968E\u5C64\u30C4\u30EA\u30FC doclet.Class_Hierarchy=\u30AF\u30E9\u30B9\u968E\u5C64 doclet.Window_Class_Hierarchy=\u30AF\u30E9\u30B9\u968E\u5C64 doclet.Interface_Hierarchy=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u968E\u5C64 doclet.Enum_Hierarchy=\u5217\u6319\u578B\u968E\u5C64 doclet.Annotation_Type_Hierarchy=\u6CE8\u91C8\u578B\u968E\u5C64 doclet.Prev=\u524D doclet.Next=\u6B21 doclet.Prev_Class=\u524D\u306E\u30AF\u30E9\u30B9 doclet.Next_Class=\u6B21\u306E\u30AF\u30E9\u30B9 doclet.Prev_Package=\u524D\u306E\u30D1\u30C3\u30B1\u30FC\u30B8 doclet.Next_Package=\u6B21\u306E\u30D1\u30C3\u30B1\u30FC\u30B8 doclet.Prev_Profile=\u524D\u306E\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB doclet.Next_Profile=\u6B21\u306E\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB doclet.Prev_Letter=\u524D\u306E\u6587\u5B57 doclet.Next_Letter=\u6B21\u306E\u6587\u5B57 doclet.Href_Class_Title={0}\u5185\u306E\u30AF\u30E9\u30B9 doclet.Href_Interface_Title={0}\u5185\u306E\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9 doclet.Href_Annotation_Title={0}\u5185\u306E\u6CE8\u91C8 doclet.Href_Enum_Title={0}\u5185\u306E\u5217\u6319\u578B doclet.Href_Type_Param_Title={0}\u5185\u306E\u578B\u30D1\u30E9\u30E1\u30FC\u30BF doclet.Href_Class_Or_Interface_Title={0}\u5185\u306E\u30AF\u30E9\u30B9\u307E\u305F\u306F\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9 doclet.Summary=\u6982\u8981: doclet.Detail=\u8A73\u7D30: doclet.navNested=\u30CD\u30B9\u30C8 doclet.navAnnotationTypeOptionalMember=\u30AA\u30D7\u30B7\u30E7\u30F3 doclet.navAnnotationTypeRequiredMember=\u5FC5\u9808 doclet.navAnnotationTypeMember=\u8981\u7D20 doclet.navField=\u30D5\u30A3\u30FC\u30EB\u30C9 doclet.navProperty=\u30D7\u30ED\u30D1\u30C6\u30A3 doclet.navEnum=\u5217\u6319\u578B\u5B9A\u6570 doclet.navConstructor=\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF doclet.navMethod=\u30E1\u30BD\u30C3\u30C9 doclet.Index=\u7D22\u5F15 doclet.Window_Single_Index=\u7D22\u5F15 doclet.Window_Split_Index={0}\u306E\u7D22\u5F15 doclet.Help=\u30D8\u30EB\u30D7 doclet.Skip_navigation_links=\u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u30FB\u30EA\u30F3\u30AF\u3092\u30B9\u30AD\u30C3\u30D7 doclet.Navigation=\u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3 doclet.New_Page=NewPage doclet.navDeprecated=\u975E\u63A8\u5968 doclet.Window_Deprecated_List=\u975E\u63A8\u5968\u306E\u30EA\u30B9\u30C8 doclet.Overrides=\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9: doclet.in_class=\u30AF\u30E9\u30B9\u5185 doclet.Static_variable_in={0}\u306Estatic\u5909\u6570 doclet.Variable_in={0}\u306E\u5909\u6570 doclet.Constructor_for={0}\u306E\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF doclet.Static_method_in={0}\u306Estatic\u30E1\u30BD\u30C3\u30C9 doclet.Method_in={0}\u306E\u30E1\u30BD\u30C3\u30C9 doclet.package=\u30D1\u30C3\u30B1\u30FC\u30B8 doclet.MalformedURL=\u4E0D\u6B63\u306AURL: {0} doclet.File_error=\u30D5\u30A1\u30A4\u30EB\u8AAD\u8FBC\u307F\u30A8\u30E9\u30FC: {0} doclet.URL_error=URL\u53D6\u51FA\u3057\u30A8\u30E9\u30FC: {0} doclet.see.class_or_package_not_found=\u30BF\u30B0{0}: \u53C2\u7167\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: {1} doclet.see.class_or_package_not_accessible=\u30BF\u30B0{0}: \u53C2\u7167\u306B\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u307E\u305B\u3093: {1} doclet.Deprecated_API=\u975E\u63A8\u5968\u306EAPI doclet.Deprecated_Packages=\u975E\u63A8\u5968\u306E\u30D1\u30C3\u30B1\u30FC\u30B8 doclet.Deprecated_Classes=\u975E\u63A8\u5968\u306E\u30AF\u30E9\u30B9 doclet.Deprecated_Enums=\u975E\u63A8\u5968\u306E\u5217\u6319\u578B doclet.Deprecated_Interfaces=\u975E\u63A8\u5968\u306E\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9 doclet.Deprecated_Exceptions=\u975E\u63A8\u5968\u306E\u4F8B\u5916 doclet.Deprecated_Annotation_Types=\u975E\u63A8\u5968\u306E\u6CE8\u91C8\u578B doclet.Deprecated_Errors=\u975E\u63A8\u5968\u306E\u30A8\u30E9\u30FC doclet.Deprecated_Fields=\u975E\u63A8\u5968\u306E\u30D5\u30A3\u30FC\u30EB\u30C9 doclet.Deprecated_Constructors=\u975E\u63A8\u5968\u306E\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF doclet.Deprecated_Methods=\u975E\u63A8\u5968\u306E\u30E1\u30BD\u30C3\u30C9 doclet.Deprecated_Enum_Constants=\u975E\u63A8\u5968\u306E\u5217\u6319\u578B\u5B9A\u6570 doclet.Deprecated_Annotation_Type_Members=\u975E\u63A8\u5968\u306E\u6CE8\u91C8\u578B\u306E\u8981\u7D20 doclet.deprecated_packages=\u975E\u63A8\u5968\u306E\u30D1\u30C3\u30B1\u30FC\u30B8 doclet.deprecated_classes=\u975E\u63A8\u5968\u306E\u30AF\u30E9\u30B9 doclet.deprecated_enums=\u975E\u63A8\u5968\u306E\u5217\u6319\u578B doclet.deprecated_interfaces=\u975E\u63A8\u5968\u306E\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9 doclet.deprecated_exceptions=\u975E\u63A8\u5968\u306E\u4F8B\u5916 doclet.deprecated_annotation_types=\u975E\u63A8\u5968\u306E\u6CE8\u91C8\u578B doclet.deprecated_errors=\u975E\u63A8\u5968\u306E\u30A8\u30E9\u30FC doclet.deprecated_fields=\u975E\u63A8\u5968\u306E\u30D5\u30A3\u30FC\u30EB\u30C9 doclet.deprecated_constructors=\u975E\u63A8\u5968\u306E\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF doclet.deprecated_methods=\u975E\u63A8\u5968\u306E\u30E1\u30BD\u30C3\u30C9 doclet.deprecated_enum_constants=\u975E\u63A8\u5968\u306E\u5217\u6319\u578B\u5B9A\u6570 doclet.deprecated_annotation_type_members=\u975E\u63A8\u5968\u306E\u6CE8\u91C8\u578B\u306E\u8981\u7D20 doclet.Generated_Docs_Untitled=\u751F\u6210\u3055\u308C\u305F\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8(\u30BF\u30A4\u30C8\u30EB\u306A\u3057) doclet.Other_Packages=\u305D\u306E\u4ED6\u306E\u30D1\u30C3\u30B1\u30FC\u30B8 doclet.Package_Description=\u30D1\u30C3\u30B1\u30FC\u30B8{0}\u306E\u8AAC\u660E doclet.Description=\u8AAC\u660E doclet.Specified_By=\u5B9A\u7FA9: doclet.in_interface=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u5185 doclet.Subclasses=\u76F4\u7CFB\u306E\u65E2\u77E5\u306E\u30B5\u30D6\u30AF\u30E9\u30B9: doclet.Subinterfaces=\u65E2\u77E5\u306E\u30B5\u30D6\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306E\u30EA\u30B9\u30C8: doclet.Implementing_Classes=\u65E2\u77E5\u306E\u5B9F\u88C5\u30AF\u30E9\u30B9\u306E\u30EA\u30B9\u30C8: doclet.Functional_Interface=\u6A5F\u80FD\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9 doclet.Functional_Interface_Message=\u3053\u308C\u306F\u6A5F\u80FD\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306A\u306E\u3067\u3001\u30E9\u30E0\u30C0\u5F0F\u307E\u305F\u306F\u30E1\u30BD\u30C3\u30C9\u53C2\u7167\u306E\u5272\u5F53\u3066\u30BF\u30FC\u30B2\u30C3\u30C8\u3068\u3057\u3066\u4F7F\u7528\u3067\u304D\u307E\u3059\u3002 doclet.also=\u540C\u69D8\u306B doclet.Frames=\u30D5\u30EC\u30FC\u30E0 doclet.No_Frames=\u30D5\u30EC\u30FC\u30E0\u306A\u3057 doclet.Package_Hierarchies=\u30D1\u30C3\u30B1\u30FC\u30B8\u968E\u5C64: doclet.Hierarchy_For_Package=\u30D1\u30C3\u30B1\u30FC\u30B8{0}\u306E\u968E\u5C64 doclet.Hierarchy_For_All_Packages=\u3059\u3079\u3066\u306E\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u968E\u5C64 doclet.Frame_Alert=\u30D5\u30EC\u30FC\u30E0\u95A2\u9023\u306E\u30A2\u30E9\u30FC\u30C8 doclet.Frame_Warning_Message=\u3053\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306F\u30D5\u30EC\u30FC\u30E0\u6A5F\u80FD\u3092\u4F7F\u7528\u3057\u3066\u8868\u793A\u3059\u308B\u3088\u3046\u306B\u4F5C\u6210\u3055\u308C\u3066\u3044\u307E\u3059\u3002\u30D5\u30EC\u30FC\u30E0\u3092\u8868\u793A\u3067\u304D\u306A\u3044Web\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u306E\u5834\u5408\u306B\u3053\u306E\u30E1\u30C3\u30BB\u30FC\u30B8\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002{0}\u306B\u30EA\u30F3\u30AF\u3057\u307E\u3059\u3002 doclet.No_Script_Message=\u30D6\u30E9\u30A6\u30B6\u306EJavaScript\u304C\u7121\u52B9\u306B\u306A\u3063\u3066\u3044\u307E\u3059\u3002 doclet.Non_Frame_Version=\u30D5\u30EC\u30FC\u30E0\u306B\u5BFE\u5FDC\u3057\u3066\u3044\u306A\u3044\u30D0\u30FC\u30B8\u30E7\u30F3 doclet.Description_From_Interface=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u304B\u3089\u30B3\u30D4\u30FC\u3055\u308C\u305F\u8AAC\u660E: doclet.Description_From_Class=\u30AF\u30E9\u30B9\u304B\u3089\u30B3\u30D4\u30FC\u3055\u308C\u305F\u8AAC\u660E: doclet.No_Non_Deprecated_Classes_To_Document=\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u5316\u3059\u308B\u975E\u63A8\u5968\u3067\u306A\u3044\u30AF\u30E9\u30B9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002 doclet.Interfaces_Italic=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9(\u30A4\u30BF\u30EA\u30C3\u30AF) doclet.Enclosing_Class=\u542B\u307E\u308C\u3066\u3044\u308B\u30AF\u30E9\u30B9: doclet.Enclosing_Interface=\u542B\u307E\u308C\u3066\u3044\u308B\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9: doclet.Window_Source_title=\u30BD\u30FC\u30B9\u30FB\u30B3\u30FC\u30C9 doclet.Window_Help_title=API\u30D8\u30EB\u30D7 doclet.Help_line_1=API\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u69CB\u6210 doclet.Help_line_2=\u3053\u306EAPI(Application Programming Interface)\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306B\u306F\u3001\u6B21\u306B\u8AAC\u660E\u3059\u308B\u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u30FB\u30D0\u30FC\u306B\u3042\u308B\u9805\u76EE\u306B\u5BFE\u5FDC\u3059\u308B\u30DA\u30FC\u30B8\u304C\u542B\u307E\u308C\u307E\u3059\u3002 doclet.Help_line_3={0}\u30DA\u30FC\u30B8\u306FAPI\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u30D5\u30ED\u30F3\u30C8\u30FB\u30DA\u30FC\u30B8\u3067\u3001\u5404\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u6982\u8981\u3092\u542B\u3080\u5168\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u30EA\u30B9\u30C8\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002\u4E00\u9023\u306E\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u6982\u8981\u8AAC\u660E\u3082\u8868\u793A\u3055\u308C\u307E\u3059\u3002 doclet.Help_line_4=\u5404\u30D1\u30C3\u30B1\u30FC\u30B8\u306B\u306F\u3001\u305D\u306E\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u30AF\u30E9\u30B9\u304A\u3088\u3073\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306E\u30EA\u30B9\u30C8\u3068\u3001\u305D\u308C\u305E\u308C\u306E\u6982\u8981\u3092\u542B\u3080\u30DA\u30FC\u30B8\u304C\u3042\u308A\u307E\u3059\u3002\u3053\u306E\u30DA\u30FC\u30B8\u306F6\u3064\u306E\u30AB\u30C6\u30B4\u30EA\u3067\u69CB\u6210\u3055\u308C\u307E\u3059\u3002 doclet.Help_line_5=\u30AF\u30E9\u30B9\u307E\u305F\u306F\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9 doclet.Help_line_6=\u5404\u30AF\u30E9\u30B9\u3001\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3001\u30CD\u30B9\u30C8\u3055\u308C\u305F\u30AF\u30E9\u30B9\u304A\u3088\u3073\u30CD\u30B9\u30C8\u3055\u308C\u305F\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306B\u306F\u500B\u5225\u306E\u30DA\u30FC\u30B8\u304C\u3042\u308A\u307E\u3059\u3002\u5404\u30DA\u30FC\u30B8\u306B\u306F\u6B21\u306E\u3088\u3046\u306B\u3001\u30AF\u30E9\u30B9\u307E\u305F\u306F\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306E\u8AAC\u660E\u3068\u3001\u6982\u8981\u8868\u304A\u3088\u3073\u30E1\u30F3\u30D0\u30FC\u306E\u8A73\u7D30\u8AAC\u660E\u304C\u542B\u307E\u308C\u307E\u3059\u3002 doclet.Help_line_7=\u30AF\u30E9\u30B9\u968E\u5C64\u8868\u793A doclet.Help_line_8=\u76F4\u7CFB\u306E\u30B5\u30D6\u30AF\u30E9\u30B9 doclet.Help_line_9=\u65E2\u77E5\u306E\u30B5\u30D6\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306E\u30EA\u30B9\u30C8 doclet.Help_line_10=\u65E2\u77E5\u306E\u5B9F\u88C5\u30AF\u30E9\u30B9\u306E\u30EA\u30B9\u30C8 doclet.Help_line_11=\u30AF\u30E9\u30B9\u307E\u305F\u306F\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306E\u5BA3\u8A00 doclet.Help_line_12=\u30AF\u30E9\u30B9\u307E\u305F\u306F\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306E\u8AAC\u660E doclet.Help_line_13=\u5404\u6982\u8981\u30A8\u30F3\u30C8\u30EA\u306B\u306F\u3001\u305D\u306E\u9805\u76EE\u306E\u8A73\u7D30\u306A\u8AAC\u660E\u306E\u4E2D\u304B\u30891\u884C\u76EE\u306E\u6587\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002\u8A73\u7D30\u306A\u8AAC\u660E\u306F\u30BD\u30FC\u30B9\u30FB\u30B3\u30FC\u30C9\u306B\u73FE\u308C\u308B\u9806\u306B\u4E26\u3079\u3089\u308C\u307E\u3059\u304C\u3001\u6982\u8981\u30A8\u30F3\u30C8\u30EA\u306F\u30A2\u30EB\u30D5\u30A1\u30D9\u30C3\u30C8\u9806\u306B\u4E26\u3079\u3089\u308C\u307E\u3059\u3002\u3053\u308C\u306B\u3088\u3063\u3066\u3001\u30D7\u30ED\u30B0\u30E9\u30DE\u304C\u8A2D\u5B9A\u3057\u305F\u8AD6\u7406\u7684\u306A\u30B0\u30EB\u30FC\u30D7\u5206\u3051\u304C\u4FDD\u6301\u3055\u308C\u307E\u3059\u3002 doclet.Help_line_14=\u4F7F\u7528 doclet.Help_line_15=\u5404\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u5316\u3055\u308C\u305F\u30D1\u30C3\u30B1\u30FC\u30B8\u3001\u30AF\u30E9\u30B9\u304A\u3088\u3073\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306B\u306F\u305D\u308C\u305E\u308C\u300C\u4F7F\u7528\u300D\u30DA\u30FC\u30B8\u304C\u3042\u308A\u307E\u3059\u3002\u3053\u306E\u30DA\u30FC\u30B8\u306B\u306F\u3001\u3069\u306E\u3088\u3046\u306A\u30D1\u30C3\u30B1\u30FC\u30B8\u3001\u30AF\u30E9\u30B9\u3001\u30E1\u30BD\u30C3\u30C9\u3001\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u304A\u3088\u3073\u30D5\u30A3\u30FC\u30EB\u30C9\u304C\u3001\u7279\u5B9A\u306E\u30AF\u30E9\u30B9\u307E\u305F\u306F\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u4E00\u90E8\u3092\u4F7F\u7528\u3057\u3066\u3044\u308B\u304B\u304C\u8A18\u8FF0\u3055\u308C\u3066\u3044\u307E\u3059\u3002\u305F\u3068\u3048\u3070\u3001\u30AF\u30E9\u30B9A\u307E\u305F\u306F\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9A\u306E\u5834\u5408\u3001\u305D\u306E\u300C\u4F7F\u7528\u300D\u30DA\u30FC\u30B8\u306B\u306F\u3001A\u306E\u30B5\u30D6\u30AF\u30E9\u30B9\u3001A\u3068\u3057\u3066\u5BA3\u8A00\u3055\u308C\u308B\u30D5\u30A3\u30FC\u30EB\u30C9\u3001A\u3092\u8FD4\u3059\u30E1\u30BD\u30C3\u30C9\u3068\u3001\u578BA\u3092\u6301\u3064\u30E1\u30BD\u30C3\u30C9\u304A\u3088\u3073\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u304C\u542B\u307E\u308C\u307E\u3059\u3002\u3053\u306E\u30DA\u30FC\u30B8\u306B\u30A2\u30AF\u30BB\u30B9\u3059\u308B\u306B\u306F\u3001\u307E\u305A\u305D\u306E\u30D1\u30C3\u30B1\u30FC\u30B8\u3001\u30AF\u30E9\u30B9\u307E\u305F\u306F\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306B\u79FB\u52D5\u3057\u3001\u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u30FB\u30D0\u30FC\u306E\u300C\u4F7F\u7528\u300D\u30EA\u30F3\u30AF\u3092\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u304F\u3060\u3055\u3044\u3002 doclet.Help_line_16=\u968E\u5C64\u30C4\u30EA\u30FC(\u30AF\u30E9\u30B9\u968E\u5C64) doclet.Help_line_17_with_tree_link=\u3059\u3079\u3066\u306E\u30D1\u30C3\u30B1\u30FC\u30B8\u306B\u306F{0}\u30DA\u30FC\u30B8\u304C\u3042\u308A\u3001\u3055\u3089\u306B\u5404\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u968E\u5C64\u304C\u3042\u308A\u307E\u3059\u3002\u5404\u968E\u5C64\u30DA\u30FC\u30B8\u306F\u3001\u30AF\u30E9\u30B9\u306E\u30EA\u30B9\u30C8\u3068\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306E\u30EA\u30B9\u30C8\u3092\u542B\u307F\u307E\u3059\u3002\u30AF\u30E9\u30B9\u306F{1}\u3092\u958B\u59CB\u70B9\u3068\u3059\u308B\u7D99\u627F\u69CB\u9020\u3067\u7DE8\u6210\u3055\u308C\u307E\u3059\u3002\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306F\u3001{1}\u304B\u3089\u306F\u7D99\u627F\u3057\u307E\u305B\u3093\u3002 doclet.Help_line_18=\u6982\u8981\u30DA\u30FC\u30B8\u3092\u8868\u793A\u3057\u3066\u3044\u308B\u3068\u304D\u306B\u300C\u968E\u5C64\u30C4\u30EA\u30FC\u300D\u3092\u30AF\u30EA\u30C3\u30AF\u3059\u308B\u3068\u3001\u5168\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u968E\u5C64\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002 doclet.Help_line_19=\u7279\u5B9A\u306E\u30D1\u30C3\u30B1\u30FC\u30B8\u3001\u30AF\u30E9\u30B9\u307E\u305F\u306F\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3092\u8868\u793A\u3057\u3066\u3044\u308B\u3068\u304D\u306B\u300C\u968E\u5C64\u30C4\u30EA\u30FC\u300D\u3092\u30AF\u30EA\u30C3\u30AF\u3059\u308B\u3068\u3001\u8A72\u5F53\u3059\u308B\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u307F\u306E\u968E\u5C64\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002 doclet.Help_line_20_with_deprecated_api_link={0}\u30DA\u30FC\u30B8\u306F\u3001\u975E\u63A8\u5968\u306EAPI\u3092\u3059\u3079\u3066\u30EA\u30B9\u30C8\u3057\u307E\u3059\u3002\u975E\u63A8\u5968\u306EAPI\u3068\u306F\u3001\u6A5F\u80FD\u6539\u826F\u306A\u3069\u306E\u7406\u7531\u304B\u3089\u4F7F\u7528\u3092\u304A\u85A6\u3081\u3067\u304D\u306A\u304F\u306A\u3063\u305FAPI\u306E\u3053\u3068\u3067\u3001\u901A\u5E38\u306F\u305D\u308C\u306B\u4EE3\u308F\u308BAPI\u304C\u63D0\u4F9B\u3055\u308C\u307E\u3059\u3002\u975E\u63A8\u5968\u306EAPI\u306F\u4ECA\u5F8C\u306E\u5B9F\u88C5\u3067\u524A\u9664\u3055\u308C\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002 doclet.Help_line_21=\u7D22\u5F15 doclet.Help_line_22={0}\u306B\u306F\u3001\u3059\u3079\u3066\u306E\u30AF\u30E9\u30B9\u3001\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3001\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u3001\u30E1\u30BD\u30C3\u30C9\u304A\u3088\u3073\u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u30A2\u30EB\u30D5\u30A1\u30D9\u30C3\u30C8\u9806\u306E\u30EA\u30B9\u30C8\u304C\u542B\u307E\u308C\u307E\u3059\u3002 doclet.Help_line_23=\u524D/\u6B21 doclet.Help_line_24=\u3053\u308C\u3089\u306E\u30EA\u30F3\u30AF\u306B\u3088\u308A\u3001\u524D\u307E\u305F\u306F\u6B21\u306E\u30AF\u30E9\u30B9\u3001\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3001\u30D1\u30C3\u30B1\u30FC\u30B8\u307E\u305F\u306F\u95A2\u9023\u30DA\u30FC\u30B8\u3078\u79FB\u52D5\u3067\u304D\u307E\u3059\u3002 doclet.Help_line_25=\u30D5\u30EC\u30FC\u30E0/\u30D5\u30EC\u30FC\u30E0\u306A\u3057 doclet.Help_line_26=\u3053\u308C\u3089\u306E\u30EA\u30F3\u30AF\u306FHTML\u30D5\u30EC\u30FC\u30E0\u306E\u8868\u793A\u3068\u975E\u8868\u793A\u3092\u5207\u308A\u66FF\u3048\u307E\u3059\u3002\u3059\u3079\u3066\u306E\u30DA\u30FC\u30B8\u306F\u30D5\u30EC\u30FC\u30E0\u3042\u308A\u3067\u3082\u3001\u30D5\u30EC\u30FC\u30E0\u306A\u3057\u3067\u3082\u8868\u793A\u3067\u304D\u307E\u3059\u3002 doclet.Help_line_27={0}\u30EA\u30F3\u30AF\u306B\u306F\u3001\u3059\u3079\u3066\u306E\u30AF\u30E9\u30B9\u304A\u3088\u3073\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9(\u975Estatic\u306E\u30CD\u30B9\u30C8\u3055\u308C\u305F\u578B\u3092\u9664\u304F)\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002 doclet.Help_line_28=\u76F4\u5217\u5316\u53EF\u80FD\u307E\u305F\u306F\u5916\u90E8\u5316\u53EF\u80FD\u306A\u5404\u30AF\u30E9\u30B9\u306F\u3001\u76F4\u5217\u5316\u30D5\u30A3\u30FC\u30EB\u30C9\u3068\u30E1\u30BD\u30C3\u30C9\u306E\u8AAC\u660E\u3092\u542B\u307F\u307E\u3059\u3002\u3053\u306E\u60C5\u5831\u306F\u3001API\u3092\u4F7F\u7528\u3059\u308B\u958B\u767A\u8005\u3067\u306F\u306A\u304F\u3001\u518D\u5B9F\u88C5\u3092\u884C\u3046\u62C5\u5F53\u8005\u306B\u5F79\u7ACB\u3061\u307E\u3059\u3002\u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u30FB\u30D0\u30FC\u306B\u30EA\u30F3\u30AF\u304C\u306A\u3044\u5834\u5408\u3001\u76F4\u5217\u5316\u3055\u308C\u305F\u30AF\u30E9\u30B9\u306B\u79FB\u52D5\u3057\u3066\u3001\u30AF\u30E9\u30B9\u8A18\u8FF0\u306E\u300C\u95A2\u9023\u9805\u76EE\u300D\u30BB\u30AF\u30B7\u30E7\u30F3\u306B\u3042\u308B\u300C\u76F4\u5217\u5316\u3055\u308C\u305F\u5F62\u5F0F\u300D\u3092\u30AF\u30EA\u30C3\u30AF\u3059\u308B\u3053\u3068\u306B\u3088\u308A\u3001\u3053\u306E\u60C5\u5831\u3092\u8868\u793A\u3067\u304D\u307E\u3059\u3002 doclet.Help_line_29={0}\u30DA\u30FC\u30B8\u306B\u306F\u3001static final\u30D5\u30A3\u30FC\u30EB\u30C9\u3068\u305D\u306E\u5024\u306E\u30EA\u30B9\u30C8\u304C\u3042\u308A\u307E\u3059\u3002 doclet.Help_line_30=\u3053\u306E\u30D8\u30EB\u30D7\u30FB\u30D5\u30A1\u30A4\u30EB\u306F\u3001\u6A19\u6E96doclet\u3092\u4F7F\u7528\u3057\u3066\u751F\u6210\u3055\u308C\u305FAPI\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306B\u9069\u7528\u3055\u308C\u307E\u3059\u3002 doclet.Help_enum_line_1=\u5404\u5217\u6319\u578B\u306B\u306F\u3001\u305D\u308C\u81EA\u8EAB\u306E\u500B\u5225\u306E\u30DA\u30FC\u30B8\u3068\u6B21\u306E\u30BB\u30AF\u30B7\u30E7\u30F3\u304C\u3042\u308A\u307E\u3059: doclet.Help_enum_line_2=\u5217\u6319\u578B\u306E\u5BA3\u8A00 doclet.Help_enum_line_3=\u5217\u6319\u578B\u306E\u8AAC\u660E doclet.Help_annotation_type_line_1=\u5404\u6CE8\u91C8\u578B\u306B\u306F\u3001\u305D\u308C\u81EA\u8EAB\u306E\u500B\u5225\u306E\u30DA\u30FC\u30B8\u3068\u6B21\u306E\u30BB\u30AF\u30B7\u30E7\u30F3\u304C\u3042\u308A\u307E\u3059: doclet.Help_annotation_type_line_2=\u6CE8\u91C8\u578B\u306E\u5BA3\u8A00 doclet.Help_annotation_type_line_3=\u6CE8\u91C8\u578B\u306E\u8AAC\u660E doclet.ClassUse_Packages.that.use.0={0}\u3092\u4F7F\u7528\u3057\u3066\u3044\u308B\u30D1\u30C3\u30B1\u30FC\u30B8 doclet.ClassUse_Uses.of.0.in.1={1}\u3067\u306E{0}\u306E\u4F7F\u7528 doclet.ClassUse_Classes.in.0.used.by.1={1}\u306B\u3088\u308A\u4F7F\u7528\u3055\u308C\u308B{0}\u306E\u30AF\u30E9\u30B9 doclet.ClassUse_PackageAnnotation={0}\u578B\u306E\u6CE8\u91C8\u3092\u6301\u3064\u30D1\u30C3\u30B1\u30FC\u30B8 doclet.ClassUse_Annotation={0}\u578B\u306E\u6CE8\u91C8\u3092\u6301\u3064{1}\u306E\u30E1\u30BD\u30C3\u30C9 doclet.ClassUse_TypeParameter={0}\u578B\u306E\u578B\u30D1\u30E9\u30E1\u30FC\u30BF\u3092\u6301\u3064{1}\u306E\u30AF\u30E9\u30B9 doclet.ClassUse_MethodTypeParameter={0}\u578B\u306E\u578B\u30D1\u30E9\u30E1\u30FC\u30BF\u3092\u6301\u3064{1}\u306E\u30E1\u30BD\u30C3\u30C9 doclet.ClassUse_FieldTypeParameter={0}\u578B\u306E\u578B\u30D1\u30E9\u30E1\u30FC\u30BF\u3092\u6301\u3064{1}\u306E\u30D5\u30A3\u30FC\u30EB\u30C9 doclet.ClassUse_FieldAnnotations={0}\u578B\u306E\u6CE8\u91C8\u3092\u6301\u3064{1}\u306E\u30D5\u30A3\u30FC\u30EB\u30C9 doclet.ClassUse_MethodAnnotations={0}\u578B\u306E\u6CE8\u91C8\u3092\u6301\u3064{1}\u306E\u30E1\u30BD\u30C3\u30C9 doclet.ClassUse_MethodParameterAnnotations={0}\u578B\u306E\u6CE8\u91C8\u3092\u6301\u3064{1}\u306E\u30E1\u30BD\u30C3\u30C9\u30FB\u30D1\u30E9\u30E1\u30FC\u30BF doclet.ClassUse_MethodReturnTypeParameter={0}\u578B\u306E\u5F15\u6570\u3092\u6301\u3064\u578B\u3092\u8FD4\u3059{1}\u306E\u30E1\u30BD\u30C3\u30C9 doclet.ClassUse_Subclass={1}\u3067\u306E{0}\u306E\u30B5\u30D6\u30AF\u30E9\u30B9 doclet.ClassUse_Subinterface={1}\u3067\u306E{0}\u306E\u30B5\u30D6\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9 doclet.ClassUse_ImplementingClass={0}\u3092\u5B9F\u88C5\u3057\u3066\u3044\u308B{1}\u306E\u30AF\u30E9\u30B9 doclet.ClassUse_Field={0}\u3068\u3057\u3066\u5BA3\u8A00\u3055\u308C\u3066\u3044\u308B{1}\u306E\u30D5\u30A3\u30FC\u30EB\u30C9 doclet.ClassUse_MethodReturn={0}\u3092\u8FD4\u3059{1}\u306E\u30E1\u30BD\u30C3\u30C9 doclet.ClassUse_MethodArgs={0}\u578B\u306E\u30D1\u30E9\u30E1\u30FC\u30BF\u3092\u6301\u3064{1}\u306E\u30E1\u30BD\u30C3\u30C9 doclet.ClassUse_MethodArgsTypeParameters={0}\u578B\u306E\u578B\u5F15\u6570\u3092\u6301\u3064{1}\u306E\u30E1\u30BD\u30C3\u30C9\u30FB\u30D1\u30E9\u30E1\u30FC\u30BF doclet.ClassUse_MethodThrows={0}\u3092\u30B9\u30ED\u30FC\u3059\u308B{1}\u306E\u30E1\u30BD\u30C3\u30C9 doclet.ClassUse_ConstructorAnnotations={0}\u578B\u306E\u6CE8\u91C8\u3092\u6301\u3064{1}\u306E\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF doclet.ClassUse_ConstructorParameterAnnotations={0}\u578B\u306E\u6CE8\u91C8\u3092\u6301\u3064{1}\u306E\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u30FB\u30D1\u30E9\u30E1\u30FC\u30BF doclet.ClassUse_ConstructorArgs={0}\u578B\u306E\u30D1\u30E9\u30E1\u30FC\u30BF\u3092\u6301\u3064{1}\u306E\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF doclet.ClassUse_ConstructorArgsTypeParameters={0}\u578B\u306E\u578B\u5F15\u6570\u3092\u6301\u3064{1}\u306E\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u30FB\u30D1\u30E9\u30E1\u30FC\u30BF doclet.ClassUse_ConstructorThrows={0}\u3092\u30B9\u30ED\u30FC\u3059\u308B{1}\u306E\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF doclet.ClassUse_No.usage.of.0={0}\u306F\u3069\u3053\u304B\u3089\u3082\u4F7F\u7528\u3055\u308C\u3066\u3044\u307E\u305B\u3093 doclet.Window_ClassUse_Header={0} {1}\u306E\u4F7F\u7528 doclet.ClassUse_Title={0}\u306E\u4F7F\u7528 doclet.navClassUse=\u4F7F\u7528 doclet.Error_in_packagelist=-group\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u4F7F\u7528\u65B9\u6CD5\u306E\u30A8\u30E9\u30FC: {0} {1} doclet.Groupname_already_used=-group\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u304A\u3044\u3066\u3001\u3059\u3067\u306B\u30B0\u30EB\u30FC\u30D7\u540D\u304C\u4F7F\u7528\u3055\u308C\u3066\u3044\u307E\u3059: {0} doclet.Same_package_name_used=\u30D1\u30C3\u30B1\u30FC\u30B8\u540D\u5F62\u5F0F\u304C2\u56DE\u4F7F\u7528\u3055\u308C\u3066\u3044\u307E\u3059: {0} doclet.exception_encountered={1}\u306E\u51E6\u7406\u4E2D\u306B\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\n{0} doclet.usage=\u6A19\u6E96\u306Edoclet\u306B\u3088\u308A\u63D0\u4F9B\u3055\u308C\u308B\u3082\u306E:\n-d \u51FA\u529B\u30D5\u30A1\u30A4\u30EB\u306E\u8EE2\u9001\u5148\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\n-use \u30AF\u30E9\u30B9\u3068\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u4F7F\u7528\u30DA\u30FC\u30B8\u3092\u4F5C\u6210\u3059\u308B\n-version @version\u30D1\u30E9\u30B0\u30E9\u30D5\u3092\u542B\u3081\u308B\n-author @author\u30D1\u30E9\u30B0\u30E9\u30D5\u3092\u542B\u3081\u308B\n-docfilessubdirs doc-file\u30B5\u30D6\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3092\u518D\u5E30\u7684\u306B\u30B3\u30D4\u30FC\u3059\u308B\n-splitindex 1\u5B57\u3054\u3068\u306B1\u30D5\u30A1\u30A4\u30EB\u306B\u7D22\u5F15\u3092\u5206\u5272\u3059\u308B\n-windowtitle \u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u7528\u306E\u30D6\u30E9\u30A6\u30B6\u30FB\u30A6\u30A3\u30F3\u30C9\u30A6\u30FB\u30BF\u30A4\u30C8\u30EB\n-doctitle \u6982\u8981\u30DA\u30FC\u30B8\u306B\u30BF\u30A4\u30C8\u30EB\u3092\u542B\u3081\u308B\n-header \u5404\u30DA\u30FC\u30B8\u306B\u30D8\u30C3\u30C0\u30FC\u3092\u542B\u3081\u308B\n-footer \u5404\u30DA\u30FC\u30B8\u306B\u30D5\u30C3\u30BF\u30FC\u3092\u542B\u3081\u308B\n-top \u5404\u30DA\u30FC\u30B8\u306B\u4E0A\u90E8\u30C6\u30AD\u30B9\u30C8\u3092\u542B\u3081\u308B\n-bottom \u5404\u30DA\u30FC\u30B8\u306B\u4E0B\u90E8\u30C6\u30AD\u30B9\u30C8\u3092\u542B\u3081\u308B\n-link \u306Bjavadoc\u51FA\u529B\u3078\u306E\u30EA\u30F3\u30AF\u3092\u4F5C\u6210\u3059\u308B\n-linkoffline \u306B\u3042\u308B\u30D1\u30C3\u30B1\u30FC\u30B8\u30FB\u30EA\u30B9\u30C8\u3092\u4F7F\u7528\u3057\u3066\u306Edocs\u306B\u30EA\u30F3\u30AF\u3059\u308B\n-excludedocfilessubdir :.. \u6307\u5B9A\u3055\u308C\u305F\u540D\u524D\u306Edoc-files\u30B5\u30D6\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3092\u3059\u3079\u3066\u9664\u5916\u3059\u308B\n-group :.. \u6307\u5B9A\u3059\u308B\u30D1\u30C3\u30B1\u30FC\u30B8\u3092\u6982\u8981\u30DA\u30FC\u30B8\u306B\u304A\u3044\u3066\u30B0\u30EB\u30FC\u30D7\u5316\u3059\u308B\n-nocomment \u8A18\u8FF0\u304A\u3088\u3073\u30BF\u30B0\u3092\u6291\u5236\u3057\u3066\u5BA3\u8A00\u306E\u307F\u3092\u751F\u6210\u3059\u308B\n-nodeprecated @deprecated\u60C5\u5831\u3092\u9664\u5916\u3059\u308B\n-noqualifier ::... \u51FA\u529B\u304B\u3089\u4FEE\u98FE\u5B50\u306E\u30EA\u30B9\u30C8\u3092\u9664\u5916\u3059\u308B\n-nosince @since\u60C5\u5831\u3092\u9664\u5916\u3059\u308B\n-notimestamp \u975E\u8868\u793A\u306E\u30BF\u30A4\u30E0\u30B9\u30BF\u30F3\u30D7\u3092\u9664\u5916\u3059\u308B\n-nodeprecatedlist \u975E\u63A8\u5968\u306E\u30EA\u30B9\u30C8\u3092\u751F\u6210\u3057\u306A\u3044\n-notree \u30AF\u30E9\u30B9\u968E\u5C64\u3092\u751F\u6210\u3057\u306A\u3044\n-noindex \u7D22\u5F15\u3092\u751F\u6210\u3057\u306A\u3044\n-nohelp \u30D8\u30EB\u30D7\u30FB\u30EA\u30F3\u30AF\u3092\u751F\u6210\u3057\u306A\u3044\n-nonavbar \u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u30FB\u30D0\u30FC\u3092\u751F\u6210\u3057\u306A\u3044\n-serialwarn @serial\u30BF\u30B0\u306B\u95A2\u3059\u308B\u8B66\u544A\u3092\u751F\u6210\u3059\u308B\n-tag ::
\u5358\u4E00\u306E\u5F15\u6570\u3092\u6301\u3064\u30AB\u30B9\u30BF\u30E0\u30FB\u30BF\u30B0\u3092\u6307\u5B9A\u3059\u308B\n-taglet \u30BF\u30B0\u30EC\u30C3\u30C8\u306E\u5B8C\u5168\u4FEE\u98FE\u540D\u3092\u767B\u9332\u3059\u308B\n-tagletpath \u30BF\u30B0\u30EC\u30C3\u30C8\u306E\u30D1\u30B9\n-Xdocrootparent \ \u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u30B3\u30E1\u30F3\u30C8\u5185\u306E@docRoot(\u3053\u306E\u5F8C\u306B\u306F/..\u304C\u7D9A\u304F)\u306E\u3059\u3079\u3066\u306E\u51FA\u73FE\u7B87\u6240\u3092\u3067\u7F6E\u63DB\u3059\u308B\n-charset \u751F\u6210\u3055\u308C\u308B\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u30AF\u30ED\u30B9\u30D7\u30E9\u30C3\u30C8\u30D5\u30A9\u30FC\u30E0\u3067\u306E\u6587\u5B57\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\n-helpfile \u30D8\u30EB\u30D7\u30FB\u30EA\u30F3\u30AF\u306E\u30EA\u30F3\u30AF\u5148\u30D5\u30A1\u30A4\u30EB\u3092\u542B\u3081\u308B\n-linksource HTML\u5F62\u5F0F\u3067\u30BD\u30FC\u30B9\u3092\u751F\u6210\u3059\u308B\n-sourcetab \u30BD\u30FC\u30B9\u5185\u306E\u30BF\u30D6\u306E\u7A7A\u767D\u6587\u5B57\u306E\u6570\u3092\u6307\u5B9A\u3059\u308B\n-keywords HTML\u306Emeta\u30BF\u30B0\u306B\u3001\u30D1\u30C3\u30B1\u30FC\u30B8\u3001\u30AF\u30E9\u30B9\u304A\u3088\u3073\u30E1\u30F3\u30D0\u30FC\u306E\u60C5\u5831\u3092\u542B\u3081\u308B\n-stylesheetfile \u751F\u6210\u3055\u308C\u305F\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u30B9\u30BF\u30A4\u30EB\u5909\u66F4\u7528\u30D5\u30A1\u30A4\u30EB\n-docencoding \u51FA\u529B\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u540D ././@LongLink0000000000000000000000000000017000000000000011213 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/resources/standard_zh_CN.propertieslibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/formats/html/resources/standa0000644000000000000000000005030712214026367032240 0ustar 00000000000000doclet.build_version=\u6807\u51C6 Doclet \u7248\u672C {0} doclet.Contents=\u76EE\u5F55 doclet.Overview=\u6982\u89C8 doclet.Window_Overview=\u6982\u89C8\u5217\u8868 doclet.Window_Overview_Summary=\u6982\u89C8 doclet.Package=\u7A0B\u5E8F\u5305 doclet.Profile=\u914D\u7F6E\u6587\u4EF6 doclet.All_Packages=\u6240\u6709\u7A0B\u5E8F\u5305 doclet.All_Profiles=\u6240\u6709\u914D\u7F6E\u6587\u4EF6 doclet.Tree=\u6811 doclet.Class_Hierarchy=\u7C7B\u5206\u5C42\u7ED3\u6784 doclet.Window_Class_Hierarchy=\u7C7B\u5206\u5C42\u7ED3\u6784 doclet.Interface_Hierarchy=\u63A5\u53E3\u5206\u5C42\u7ED3\u6784 doclet.Enum_Hierarchy=\u679A\u4E3E\u5206\u5C42\u7ED3\u6784 doclet.Annotation_Type_Hierarchy=\u6CE8\u91CA\u7C7B\u578B\u5206\u5C42\u7ED3\u6784 doclet.Prev=\u4E0A\u4E00\u4E2A doclet.Next=\u4E0B\u4E00\u4E2A doclet.Prev_Class=\u4E0A\u4E00\u4E2A\u7C7B doclet.Next_Class=\u4E0B\u4E00\u4E2A\u7C7B doclet.Prev_Package=\u4E0A\u4E00\u4E2A\u7A0B\u5E8F\u5305 doclet.Next_Package=\u4E0B\u4E00\u4E2A\u7A0B\u5E8F\u5305 doclet.Prev_Profile=\u4E0A\u4E00\u914D\u7F6E\u6587\u4EF6 doclet.Next_Profile=\u4E0B\u4E00\u914D\u7F6E\u6587\u4EF6 doclet.Prev_Letter=\u4E0A\u4E00\u4E2A\u5B57\u6BCD doclet.Next_Letter=\u4E0B\u4E00\u4E2A\u5B57\u6BCD doclet.Href_Class_Title={0}\u4E2D\u7684\u7C7B doclet.Href_Interface_Title={0}\u4E2D\u7684\u63A5\u53E3 doclet.Href_Annotation_Title={0}\u4E2D\u7684\u6CE8\u91CA doclet.Href_Enum_Title={0}\u4E2D\u7684\u679A\u4E3E doclet.Href_Type_Param_Title={0}\u4E2D\u7684\u7C7B\u578B\u53C2\u6570 doclet.Href_Class_Or_Interface_Title={0}\u4E2D\u7684\u7C7B\u6216\u63A5\u53E3 doclet.Summary=\u6982\u8981: doclet.Detail=\u8BE6\u7EC6\u8D44\u6599: doclet.navNested=\u5D4C\u5957 doclet.navAnnotationTypeOptionalMember=\u53EF\u9009 doclet.navAnnotationTypeRequiredMember=\u5FC5\u9700 doclet.navAnnotationTypeMember=\u5143\u7D20 doclet.navField=\u5B57\u6BB5 doclet.navProperty=\u5C5E\u6027 doclet.navEnum=\u679A\u4E3E\u5E38\u91CF doclet.navConstructor=\u6784\u9020\u5668 doclet.navMethod=\u65B9\u6CD5 doclet.Index=\u7D22\u5F15 doclet.Window_Single_Index=\u7D22\u5F15 doclet.Window_Split_Index={0} - \u7D22\u5F15 doclet.Help=\u5E2E\u52A9 doclet.Skip_navigation_links=\u8DF3\u8FC7\u5BFC\u822A\u94FE\u63A5 doclet.Navigation=\u5BFC\u822A doclet.New_Page=NewPage doclet.navDeprecated=\u5DF2\u8FC7\u65F6 doclet.Window_Deprecated_List=\u5DF2\u8FC7\u65F6\u7684\u5217\u8868 doclet.Overrides=\u8986\u76D6: doclet.in_class=\u5728\u7C7B\u4E2D doclet.Static_variable_in={0}\u4E2D\u7684\u9759\u6001\u53D8\u91CF doclet.Variable_in={0}\u4E2D\u7684\u53D8\u91CF doclet.Constructor_for={0}\u7684\u6784\u9020\u5668 doclet.Static_method_in={0}\u4E2D\u7684\u9759\u6001\u65B9\u6CD5 doclet.Method_in={0}\u4E2D\u7684\u65B9\u6CD5 doclet.package=\u7A0B\u5E8F\u5305 doclet.MalformedURL=\u683C\u5F0F\u9519\u8BEF\u7684 URL: {0} doclet.File_error=\u8BFB\u53D6\u6587\u4EF6\u65F6\u51FA\u9519: {0} doclet.URL_error=\u83B7\u53D6 URL \u65F6\u51FA\u9519: {0} doclet.see.class_or_package_not_found=\u6807\u8BB0{0}: \u627E\u4E0D\u5230\u5F15\u7528: {1} doclet.see.class_or_package_not_accessible=\u6807\u8BB0{0}: \u65E0\u6CD5\u8BBF\u95EE\u5F15\u7528: {1} doclet.Deprecated_API=\u5DF2\u8FC7\u65F6\u7684 API doclet.Deprecated_Packages=\u5DF2\u8FC7\u65F6\u7A0B\u5E8F\u5305 doclet.Deprecated_Classes=\u5DF2\u8FC7\u65F6\u7684\u7C7B doclet.Deprecated_Enums=\u5DF2\u8FC7\u65F6\u7684\u679A\u4E3E doclet.Deprecated_Interfaces=\u5DF2\u8FC7\u65F6\u7684\u63A5\u53E3 doclet.Deprecated_Exceptions=\u5DF2\u8FC7\u65F6\u7684\u5F02\u5E38\u9519\u8BEF doclet.Deprecated_Annotation_Types=\u5DF2\u8FC7\u65F6\u7684\u6CE8\u91CA\u7C7B\u578B doclet.Deprecated_Errors=\u5DF2\u8FC7\u65F6\u7684\u9519\u8BEF doclet.Deprecated_Fields=\u5DF2\u8FC7\u65F6\u7684\u5B57\u6BB5 doclet.Deprecated_Constructors=\u5DF2\u8FC7\u65F6\u7684\u6784\u9020\u5668 doclet.Deprecated_Methods=\u5DF2\u8FC7\u65F6\u7684\u65B9\u6CD5 doclet.Deprecated_Enum_Constants=\u5DF2\u8FC7\u65F6\u7684\u679A\u4E3E\u5E38\u91CF doclet.Deprecated_Annotation_Type_Members=\u5DF2\u8FC7\u65F6\u7684\u6CE8\u91CA\u7C7B\u578B\u5143\u7D20 doclet.deprecated_packages=\u5DF2\u8FC7\u65F6\u7A0B\u5E8F\u5305 doclet.deprecated_classes=\u5DF2\u8FC7\u65F6\u7684\u7C7B doclet.deprecated_enums=\u5DF2\u8FC7\u65F6\u7684\u679A\u4E3E doclet.deprecated_interfaces=\u5DF2\u8FC7\u65F6\u7684\u63A5\u53E3 doclet.deprecated_exceptions=\u5DF2\u8FC7\u65F6\u7684\u5F02\u5E38\u9519\u8BEF doclet.deprecated_annotation_types=\u5DF2\u8FC7\u65F6\u7684\u6CE8\u91CA\u7C7B\u578B doclet.deprecated_errors=\u5DF2\u8FC7\u65F6\u7684\u9519\u8BEF doclet.deprecated_fields=\u5DF2\u8FC7\u65F6\u7684\u5B57\u6BB5 doclet.deprecated_constructors=\u5DF2\u8FC7\u65F6\u7684\u6784\u9020\u5668 doclet.deprecated_methods=\u5DF2\u8FC7\u65F6\u7684\u65B9\u6CD5 doclet.deprecated_enum_constants=\u5DF2\u8FC7\u65F6\u7684\u679A\u4E3E\u5E38\u91CF doclet.deprecated_annotation_type_members=\u5DF2\u8FC7\u65F6\u7684\u6CE8\u91CA\u7C7B\u578B\u5143\u7D20 doclet.Generated_Docs_Untitled=\u751F\u6210\u7684\u6587\u6863 (\u65E0\u6807\u9898) doclet.Other_Packages=\u5176\u4ED6\u7A0B\u5E8F\u5305 doclet.Package_Description=\u7A0B\u5E8F\u5305{0}\u7684\u8BF4\u660E doclet.Description=\u8BF4\u660E doclet.Specified_By=\u6307\u5B9A\u8005: doclet.in_interface=\u5728\u63A5\u53E3\u4E2D doclet.Subclasses=\u76F4\u63A5\u5DF2\u77E5\u5B50\u7C7B: doclet.Subinterfaces=\u6240\u6709\u5DF2\u77E5\u5B50\u63A5\u53E3: doclet.Implementing_Classes=\u6240\u6709\u5DF2\u77E5\u5B9E\u73B0\u7C7B: doclet.Functional_Interface=\u51FD\u6570\u63A5\u53E3: doclet.Functional_Interface_Message=\u8FD9\u662F\u4E00\u4E2A\u51FD\u6570\u63A5\u53E3, \u56E0\u6B64\u53EF\u7528\u4F5C lambda \u8868\u8FBE\u5F0F\u6216\u65B9\u6CD5\u5F15\u7528\u7684\u8D4B\u503C\u76EE\u6807\u3002 doclet.also=\u5E76 doclet.Frames=\u6846\u67B6 doclet.No_Frames=\u65E0\u6846\u67B6 doclet.Package_Hierarchies=\u7A0B\u5E8F\u5305\u5206\u5C42\u7ED3\u6784: doclet.Hierarchy_For_Package=\u7A0B\u5E8F\u5305{0}\u7684\u5206\u5C42\u7ED3\u6784 doclet.Hierarchy_For_All_Packages=\u6240\u6709\u7A0B\u5E8F\u5305\u7684\u5206\u5C42\u7ED3\u6784 doclet.Frame_Alert=\u6846\u67B6\u9884\u8B66 doclet.Frame_Warning_Message=\u8BF7\u4F7F\u7528\u6846\u67B6\u529F\u80FD\u67E5\u770B\u6B64\u6587\u6863\u3002\u5982\u679C\u770B\u5230\u6B64\u6D88\u606F, \u5219\u8868\u660E\u60A8\u4F7F\u7528\u7684\u662F\u4E0D\u652F\u6301\u6846\u67B6\u7684 Web \u5BA2\u6237\u673A\u3002\u94FE\u63A5\u5230{0}\u3002 doclet.No_Script_Message=\u60A8\u7684\u6D4F\u89C8\u5668\u5DF2\u7981\u7528 JavaScript\u3002 doclet.Non_Frame_Version=\u975E\u6846\u67B6\u7248\u672C doclet.Description_From_Interface=\u4ECE\u63A5\u53E3\u590D\u5236\u7684\u8BF4\u660E: doclet.Description_From_Class=\u4ECE\u7C7B\u590D\u5236\u7684\u8BF4\u660E: doclet.No_Non_Deprecated_Classes_To_Document=\u627E\u4E0D\u5230\u53EF\u4EE5\u6587\u6863\u5316\u7684\u672A\u8FC7\u65F6\u7684\u7C7B\u3002 doclet.Interfaces_Italic=\u63A5\u53E3 (\u659C\u4F53) doclet.Enclosing_Class=\u5C01\u95ED\u7C7B: doclet.Enclosing_Interface=\u5C01\u95ED\u63A5\u53E3: doclet.Window_Source_title=\u6E90\u4EE3\u7801 doclet.Window_Help_title=API \u5E2E\u52A9 doclet.Help_line_1=\u6B64 API \u6587\u6863\u7684\u7EC4\u7EC7\u65B9\u5F0F doclet.Help_line_2=\u6B64 API (\u5E94\u7528\u7A0B\u5E8F\u7F16\u7A0B\u63A5\u53E3) \u6587\u6863\u5305\u542B\u5BF9\u5E94\u4E8E\u5BFC\u822A\u680F\u4E2D\u7684\u9879\u76EE\u7684\u9875\u9762, \u5982\u4E0B\u6240\u8FF0\u3002 doclet.Help_line_3={0} \u9875\u9762\u662F\u6B64 API \u6587\u6863\u7684\u9996\u9875, \u63D0\u4F9B\u4E86\u6240\u6709\u7A0B\u5E8F\u5305\u7684\u5217\u8868\u53CA\u5176\u6982\u8981\u3002\u6B64\u9875\u9762\u4E5F\u53EF\u80FD\u5305\u542B\u8FD9\u4E9B\u7A0B\u5E8F\u5305\u7684\u603B\u4F53\u8BF4\u660E\u3002 doclet.Help_line_4=\u6BCF\u4E2A\u7A0B\u5E8F\u5305\u90FD\u6709\u4E00\u4E2A\u9875\u9762, \u5176\u4E2D\u5305\u542B\u5B83\u7684\u7C7B\u548C\u63A5\u53E3\u7684\u5217\u8868\u53CA\u5176\u6982\u8981\u3002\u6B64\u9875\u9762\u53EF\u4EE5\u5305\u542B\u516D\u4E2A\u7C7B\u522B: doclet.Help_line_5=\u7C7B/\u63A5\u53E3 doclet.Help_line_6=\u6BCF\u4E2A\u7C7B, \u63A5\u53E3, \u5D4C\u5957\u7C7B\u548C\u5D4C\u5957\u63A5\u53E3\u90FD\u6709\u5404\u81EA\u7684\u9875\u9762\u3002\u5176\u4E2D\u6BCF\u4E2A\u9875\u9762\u90FD\u7531\u4E09\u90E8\u5206 (\u7C7B/\u63A5\u53E3\u8BF4\u660E, \u6982\u8981\u8868, \u4EE5\u53CA\u8BE6\u7EC6\u7684\u6210\u5458\u8BF4\u660E) \u7EC4\u6210: doclet.Help_line_7=\u7C7B\u7EE7\u627F\u56FE doclet.Help_line_8=\u76F4\u63A5\u5B50\u7C7B doclet.Help_line_9=\u6240\u6709\u5DF2\u77E5\u5B50\u63A5\u53E3 doclet.Help_line_10=\u6240\u6709\u5DF2\u77E5\u5B9E\u73B0\u7C7B doclet.Help_line_11=\u7C7B/\u63A5\u53E3\u58F0\u660E doclet.Help_line_12=\u7C7B/\u63A5\u53E3\u8BF4\u660E doclet.Help_line_13=\u6BCF\u4E2A\u6982\u8981\u6761\u76EE\u90FD\u5305\u542B\u8BE5\u9879\u76EE\u7684\u8BE6\u7EC6\u8BF4\u660E\u7684\u7B2C\u4E00\u53E5\u3002\u6982\u8981\u6761\u76EE\u6309\u5B57\u6BCD\u987A\u5E8F\u6392\u5217, \u800C\u8BE6\u7EC6\u8BF4\u660E\u5219\u6309\u5176\u5728\u6E90\u4EE3\u7801\u4E2D\u51FA\u73B0\u7684\u987A\u5E8F\u6392\u5217\u3002\u8FD9\u6837\u4FDD\u6301\u4E86\u7A0B\u5E8F\u5458\u6240\u5EFA\u7ACB\u7684\u903B\u8F91\u5206\u7EC4\u3002 doclet.Help_line_14=\u4F7F\u7528 doclet.Help_line_15=\u6BCF\u4E2A\u5DF2\u6587\u6863\u5316\u7684\u7A0B\u5E8F\u5305, \u7C7B\u548C\u63A5\u53E3\u90FD\u6709\u5404\u81EA\u7684\u201C\u4F7F\u7528\u201D\u9875\u9762\u3002\u6B64\u9875\u9762\u4ECB\u7ECD\u4E86\u4F7F\u7528\u7ED9\u5B9A\u7C7B\u6216\u7A0B\u5E8F\u5305\u7684\u4EFB\u4F55\u90E8\u5206\u7684\u7A0B\u5E8F\u5305, \u7C7B, \u65B9\u6CD5, \u6784\u9020\u5668\u548C\u5B57\u6BB5\u3002\u5BF9\u4E8E\u7ED9\u5B9A\u7684\u7C7B\u6216\u63A5\u53E3 A, \u5176\u201C\u4F7F\u7528\u201D\u9875\u9762\u5305\u542B A \u7684\u5B50\u7C7B, \u58F0\u660E\u4E3A A \u7684\u5B57\u6BB5, \u8FD4\u56DE A \u7684\u65B9\u6CD5, \u4EE5\u53CA\u5E26\u6709\u7C7B\u578B\u4E3A A \u7684\u53C2\u6570\u7684\u65B9\u6CD5\u548C\u6784\u9020\u5668\u3002\u8BBF\u95EE\u6B64\u9875\u9762\u7684\u65B9\u6CD5\u662F: \u9996\u5148\u8F6C\u81F3\u7A0B\u5E8F\u5305, \u7C7B\u6216\u63A5\u53E3, \u7136\u540E\u5355\u51FB\u5BFC\u822A\u680F\u4E2D\u7684 "\u4F7F\u7528" \u94FE\u63A5\u3002 doclet.Help_line_16=\u6811 (\u7C7B\u5206\u5C42\u7ED3\u6784) doclet.Help_line_17_with_tree_link=\u5BF9\u4E8E\u6240\u6709\u7A0B\u5E8F\u5305, \u6709\u4E00\u4E2A{0}\u9875\u9762, \u4EE5\u53CA\u6BCF\u4E2A\u7A0B\u5E8F\u5305\u7684\u5206\u5C42\u7ED3\u6784\u3002\u6BCF\u4E2A\u5206\u5C42\u7ED3\u6784\u9875\u9762\u90FD\u5305\u542B\u7C7B\u7684\u5217\u8868\u548C\u63A5\u53E3\u7684\u5217\u8868\u3002\u4ECE{1}\u5F00\u59CB, \u6309\u7EE7\u627F\u7ED3\u6784\u5BF9\u7C7B\u8FDB\u884C\u6392\u5217\u3002\u63A5\u53E3\u4E0D\u4ECE{1}\u7EE7\u627F\u3002 doclet.Help_line_18=\u67E5\u770B\u201C\u6982\u89C8\u201D\u9875\u9762\u65F6, \u5355\u51FB "\u6811" \u5C06\u663E\u793A\u6240\u6709\u7A0B\u5E8F\u5305\u7684\u5206\u5C42\u7ED3\u6784\u3002 doclet.Help_line_19=\u67E5\u770B\u7279\u5B9A\u7A0B\u5E8F\u5305, \u7C7B\u6216\u63A5\u53E3\u9875\u9762\u65F6, \u5355\u51FB "\u6811" \u5C06\u4EC5\u663E\u793A\u8BE5\u7A0B\u5E8F\u5305\u7684\u5206\u5C42\u7ED3\u6784\u3002 doclet.Help_line_20_with_deprecated_api_link={0} \u9875\u9762\u5217\u51FA\u4E86\u6240\u6709\u5DF2\u8FC7\u65F6\u7684 API\u3002\u4E00\u822C\u7531\u4E8E\u8FDB\u884C\u4E86\u6539\u8FDB\u5E76\u4E14\u901A\u5E38\u63D0\u4F9B\u4E86\u66FF\u4EE3\u7684 API, \u6240\u4EE5\u5EFA\u8BAE\u4E0D\u8981\u4F7F\u7528\u5DF2\u8FC7\u65F6\u7684 API\u3002\u5728\u5C06\u6765\u7684\u5B9E\u73B0\u8FC7\u7A0B\u4E2D, \u53EF\u80FD\u4F1A\u5220\u9664\u5DF2\u8FC7\u65F6\u7684 API\u3002 doclet.Help_line_21=\u7D22\u5F15 doclet.Help_line_22={0} \u5305\u542B\u6309\u5B57\u6BCD\u987A\u5E8F\u6392\u5217\u7684\u6240\u6709\u7C7B, \u63A5\u53E3, \u6784\u9020\u5668, \u65B9\u6CD5\u548C\u5B57\u6BB5\u7684\u5217\u8868\u3002 doclet.Help_line_23=\u4E0A\u4E00\u4E2A/\u4E0B\u4E00\u4E2A doclet.Help_line_24=\u8FD9\u4E9B\u94FE\u63A5\u4F7F\u60A8\u53EF\u4EE5\u8F6C\u81F3\u4E0B\u4E00\u4E2A\u6216\u4E0A\u4E00\u4E2A\u7C7B, \u63A5\u53E3, \u7A0B\u5E8F\u5305\u6216\u76F8\u5173\u9875\u9762\u3002 doclet.Help_line_25=\u6846\u67B6/\u65E0\u6846\u67B6 doclet.Help_line_26=\u8FD9\u4E9B\u94FE\u63A5\u7528\u4E8E\u663E\u793A\u548C\u9690\u85CF HTML \u6846\u67B6\u3002\u6240\u6709\u9875\u9762\u5747\u5177\u6709\u6709\u6846\u67B6\u548C\u65E0\u6846\u67B6\u4E24\u79CD\u663E\u793A\u65B9\u5F0F\u3002 doclet.Help_line_27={0}\u94FE\u63A5\u663E\u793A\u6240\u6709\u7C7B\u548C\u63A5\u53E3 (\u9664\u4E86\u975E\u9759\u6001\u5D4C\u5957\u7C7B\u578B)\u3002 doclet.Help_line_28=\u6BCF\u4E2A\u53EF\u5E8F\u5217\u5316\u6216\u53EF\u5916\u90E8\u5316\u7684\u7C7B\u90FD\u6709\u5176\u5E8F\u5217\u5316\u5B57\u6BB5\u548C\u65B9\u6CD5\u7684\u8BF4\u660E\u3002\u6B64\u4FE1\u606F\u5BF9\u91CD\u65B0\u5B9E\u73B0\u8005\u6709\u7528, \u800C\u5BF9\u4F7F\u7528 API \u7684\u5F00\u53D1\u8005\u5219\u6CA1\u6709\u4EC0\u4E48\u7528\u5904\u3002\u5C3D\u7BA1\u5BFC\u822A\u680F\u4E2D\u6CA1\u6709\u94FE\u63A5, \u4F46\u60A8\u53EF\u4EE5\u901A\u8FC7\u4E0B\u5217\u65B9\u5F0F\u83B7\u53D6\u6B64\u4FE1\u606F: \u8F6C\u81F3\u4EFB\u4F55\u5E8F\u5217\u5316\u7C7B, \u7136\u540E\u5355\u51FB\u7C7B\u8BF4\u660E\u7684 "\u53E6\u8BF7\u53C2\u9605" \u90E8\u5206\u4E2D\u7684 "\u5E8F\u5217\u5316\u8868\u683C"\u3002 doclet.Help_line_29={0}\u9875\u9762\u5217\u51FA\u4E86\u9759\u6001\u6700\u7EC8\u5B57\u6BB5\u53CA\u5176\u503C\u3002 doclet.Help_line_30=\u6B64\u5E2E\u52A9\u6587\u4EF6\u9002\u7528\u4E8E\u4F7F\u7528\u6807\u51C6 doclet \u751F\u6210\u7684 API \u6587\u6863\u3002 doclet.Help_enum_line_1=\u6BCF\u4E2A\u679A\u4E3E\u90FD\u6709\u5404\u81EA\u7684\u9875\u9762, \u5176\u4E2D\u5305\u542B\u4EE5\u4E0B\u90E8\u5206: doclet.Help_enum_line_2=\u679A\u4E3E\u58F0\u660E doclet.Help_enum_line_3=\u679A\u4E3E\u8BF4\u660E doclet.Help_annotation_type_line_1=\u6BCF\u4E2A\u6CE8\u91CA\u7C7B\u578B\u90FD\u6709\u5404\u81EA\u7684\u9875\u9762, \u5176\u4E2D\u5305\u542B\u4EE5\u4E0B\u90E8\u5206: doclet.Help_annotation_type_line_2=\u6CE8\u91CA\u7C7B\u578B\u58F0\u660E doclet.Help_annotation_type_line_3=\u6CE8\u91CA\u7C7B\u578B\u8BF4\u660E doclet.ClassUse_Packages.that.use.0=\u4F7F\u7528{0}\u7684\u7A0B\u5E8F\u5305 doclet.ClassUse_Uses.of.0.in.1={1}\u4E2D{0}\u7684\u4F7F\u7528 doclet.ClassUse_Classes.in.0.used.by.1={1}\u4F7F\u7528\u7684{0}\u4E2D\u7684\u7C7B doclet.ClassUse_PackageAnnotation=\u6CE8\u91CA\u7C7B\u578B\u4E3A{0}\u7684\u7A0B\u5E8F\u5305 doclet.ClassUse_Annotation=\u6CE8\u91CA\u7C7B\u578B\u4E3A{0}\u7684{1}\u4E2D\u7684\u7C7B doclet.ClassUse_TypeParameter=\u7C7B\u578B\u53C2\u6570\u7C7B\u578B\u4E3A{0}\u7684{1}\u4E2D\u7684\u7C7B doclet.ClassUse_MethodTypeParameter=\u7C7B\u578B\u53C2\u6570\u7C7B\u578B\u4E3A{0}\u7684{1}\u4E2D\u7684\u65B9\u6CD5 doclet.ClassUse_FieldTypeParameter=\u7C7B\u578B\u53C2\u6570\u7C7B\u578B\u4E3A{0}\u7684{1}\u4E2D\u7684\u5B57\u6BB5 doclet.ClassUse_FieldAnnotations=\u6CE8\u91CA\u7C7B\u578B\u4E3A{0}\u7684{1}\u4E2D\u7684\u5B57\u6BB5 doclet.ClassUse_MethodAnnotations=\u6CE8\u91CA\u7C7B\u578B\u4E3A{0}\u7684{1}\u4E2D\u7684\u65B9\u6CD5 doclet.ClassUse_MethodParameterAnnotations=\u6CE8\u91CA\u7C7B\u578B\u4E3A{0}\u7684{1}\u4E2D\u7684\u65B9\u6CD5\u53C2\u6570 doclet.ClassUse_MethodReturnTypeParameter=\u8FD4\u56DE\u53D8\u91CF\u7C7B\u578B\u4E3A{0}\u7684\u7C7B\u578B\u7684{1}\u4E2D\u7684\u65B9\u6CD5 doclet.ClassUse_Subclass={1}\u4E2D{0}\u7684\u5B50\u7C7B doclet.ClassUse_Subinterface={1}\u4E2D{0}\u7684\u5B50\u63A5\u53E3 doclet.ClassUse_ImplementingClass=\u5B9E\u73B0{0}\u7684{1}\u4E2D\u7684\u7C7B doclet.ClassUse_Field=\u58F0\u660E\u4E3A{0}\u7684{1}\u4E2D\u7684\u5B57\u6BB5 doclet.ClassUse_MethodReturn=\u8FD4\u56DE{0}\u7684{1}\u4E2D\u7684\u65B9\u6CD5 doclet.ClassUse_MethodArgs=\u53C2\u6570\u7C7B\u578B\u4E3A{0}\u7684{1}\u4E2D\u7684\u65B9\u6CD5 doclet.ClassUse_MethodArgsTypeParameters=\u7C7B\u578B\u53D8\u91CF\u7C7B\u578B\u4E3A{0}\u7684{1}\u4E2D\u7684\u65B9\u6CD5\u53C2\u6570 doclet.ClassUse_MethodThrows=\u629B\u51FA{0}\u7684{1}\u4E2D\u7684\u65B9\u6CD5 doclet.ClassUse_ConstructorAnnotations=\u6CE8\u91CA\u7C7B\u578B\u4E3A{0}\u7684{1}\u4E2D\u7684\u6784\u9020\u5668 doclet.ClassUse_ConstructorParameterAnnotations=\u6CE8\u91CA\u7C7B\u578B\u4E3A{0}\u7684{1}\u4E2D\u7684\u6784\u9020\u5668\u53C2\u6570 doclet.ClassUse_ConstructorArgs=\u53C2\u6570\u7C7B\u578B\u4E3A{0}\u7684{1}\u4E2D\u7684\u6784\u9020\u5668 doclet.ClassUse_ConstructorArgsTypeParameters=\u7C7B\u578B\u53D8\u91CF\u7C7B\u578B\u4E3A{0}\u7684{1}\u4E2D\u7684\u6784\u9020\u5668\u53C2\u6570 doclet.ClassUse_ConstructorThrows=\u629B\u51FA{0}\u7684{1}\u4E2D\u7684\u6784\u9020\u5668 doclet.ClassUse_No.usage.of.0=\u6CA1\u6709{0}\u7684\u7528\u6CD5 doclet.Window_ClassUse_Header={0} {1}\u7684\u4F7F\u7528 doclet.ClassUse_Title={0}\u7684\u4F7F\u7528 doclet.navClassUse=\u4F7F\u7528 doclet.Error_in_packagelist=\u4F7F\u7528 -group \u9009\u9879\u65F6\u51FA\u9519: {0} {1} doclet.Groupname_already_used=\u5728 -group \u9009\u9879\u4E2D, groupname \u5DF2\u4F7F\u7528: {0} doclet.Same_package_name_used=\u7A0B\u5E8F\u5305\u540D\u79F0\u5F62\u5F0F\u4F7F\u7528\u4E86\u4E24\u6B21: {0} doclet.exception_encountered=\u5904\u7406{1}\u65F6\u51FA\u73B0\u5F02\u5E38\u9519\u8BEF\n{0} doclet.usage=\u901A\u8FC7\u6807\u51C6 doclet \u63D0\u4F9B:\n-d \u8F93\u51FA\u6587\u4EF6\u7684\u76EE\u6807\u76EE\u5F55\n-use \u521B\u5EFA\u7C7B\u548C\u7A0B\u5E8F\u5305\u7528\u6CD5\u9875\u9762\n-version \u5305\u542B @version \u6BB5\n-author \u5305\u542B @author \u6BB5\n-docfilessubdirs \u9012\u5F52\u590D\u5236\u6587\u6863\u6587\u4EF6\u5B50\u76EE\u5F55\n-splitindex \u5C06\u7D22\u5F15\u5206\u4E3A\u6BCF\u4E2A\u5B57\u6BCD\u5BF9\u5E94\u4E00\u4E2A\u6587\u4EF6\n-windowtitle \u6587\u6863\u7684\u6D4F\u89C8\u5668\u7A97\u53E3\u6807\u9898\n-doctitle \u5305\u542B\u6982\u89C8\u9875\u9762\u7684\u6807\u9898\n-header \u5305\u542B\u6BCF\u4E2A\u9875\u9762\u7684\u9875\u7709\u6587\u672C\n-footer \u5305\u542B\u6BCF\u4E2A\u9875\u9762\u7684\u9875\u811A\u6587\u672C\n-top \u5305\u542B\u6BCF\u4E2A\u9875\u9762\u7684\u9876\u90E8\u6587\u672C\n-bottom \u5305\u542B\u6BCF\u4E2A\u9875\u9762\u7684\u5E95\u90E8\u6587\u672C\n-link \u521B\u5EFA\u6307\u5411\u4F4D\u4E8E \u7684 javadoc \u8F93\u51FA\u7684\u94FE\u63A5\n-linkoffline \u5229\u7528\u4F4D\u4E8E \u7684\u7A0B\u5E8F\u5305\u5217\u8868\u94FE\u63A5\u81F3\u4F4D\u4E8E \u7684\u6587\u6863\n-excludedocfilessubdir :.. \u6392\u9664\u5177\u6709\u7ED9\u5B9A\u540D\u79F0\u7684\u6240\u6709\u6587\u6863\u6587\u4EF6\u5B50\u76EE\u5F55\u3002\n-group :.. \u5728\u6982\u89C8\u9875\u9762\u4E2D, \u5C06\u6307\u5B9A\u7684\u7A0B\u5E8F\u5305\u5206\u7EC4\n-nocomment \u4E0D\u751F\u6210\u8BF4\u660E\u548C\u6807\u8BB0, \u53EA\u751F\u6210\u58F0\u660E\u3002\n-nodeprecated \u4E0D\u5305\u542B @deprecated \u4FE1\u606F\n-noqualifier ::... \u8F93\u51FA\u4E2D\u4E0D\u5305\u62EC\u9650\u5B9A\u7B26\u7684\u5217\u8868\u3002\n-nosince \u4E0D\u5305\u542B @since \u4FE1\u606F\n-notimestamp \u4E0D\u5305\u542B\u9690\u85CF\u65F6\u95F4\u6233\n-nodeprecatedlist \u4E0D\u751F\u6210\u5DF2\u8FC7\u65F6\u7684\u5217\u8868\n-notree \u4E0D\u751F\u6210\u7C7B\u5206\u5C42\u7ED3\u6784\n-noindex \u4E0D\u751F\u6210\u7D22\u5F15\n-nohelp \u4E0D\u751F\u6210\u5E2E\u52A9\u94FE\u63A5\n-nonavbar \u4E0D\u751F\u6210\u5BFC\u822A\u680F\n-serialwarn \u751F\u6210\u6709\u5173 @serial \u6807\u8BB0\u7684\u8B66\u544A\n-tag ::
\u6307\u5B9A\u5355\u4E2A\u53C2\u6570\u5B9A\u5236\u6807\u8BB0\n-taglet \u8981\u6CE8\u518C\u7684 Taglet \u7684\u5168\u9650\u5B9A\u540D\u79F0\n-tagletpath Taglet \u7684\u8DEF\u5F84\n-Xdocrootparent \u5C06\u6587\u6863\u6CE8\u91CA\u4E2D\u51FA\u73B0\u7684\u6240\u6709\u540E\u8DDF /.. \u7684 @docRoot \u66FF\u6362\u4E3A \n-charset \u7528\u4E8E\u8DE8\u5E73\u53F0\u67E5\u770B\u751F\u6210\u7684\u6587\u6863\u7684\u5B57\u7B26\u96C6\u3002\n-helpfile \u5305\u542B\u5E2E\u52A9\u94FE\u63A5\u6240\u94FE\u63A5\u5230\u7684\u6587\u4EF6\n-linksource \u4EE5 HTML \u683C\u5F0F\u751F\u6210\u6E90\u6587\u4EF6\n-sourcetab \u6307\u5B9A\u6E90\u4E2D\u6BCF\u4E2A\u5236\u8868\u7B26\u5360\u636E\u7684\u7A7A\u683C\u6570\n-keywords \u4F7F\u7A0B\u5E8F\u5305, \u7C7B\u548C\u6210\u5458\u4FE1\u606F\u9644\u5E26 HTML \u5143\u6807\u8BB0\n-stylesheetfile \u7528\u4E8E\u66F4\u6539\u751F\u6210\u6587\u6863\u7684\u6837\u5F0F\u7684\u6587\u4EF6\n-docencoding \u8F93\u51FA\u7F16\u7801\u540D\u79F0 ././@LongLink0000000000000000000000000000015400000000000011215 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/AbstractDoclet.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/AbstractDocl0000644000000000000000000001622012214026367032177 0ustar 00000000000000/* * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.internal.toolkit; import com.sun.javadoc.*; import com.sun.tools.doclets.internal.toolkit.builders.*; import com.sun.tools.doclets.internal.toolkit.util.*; /** * An abstract implementation of a Doclet. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Jamie Ho */ public abstract class AbstractDoclet { /** * The global configuration information for this run. */ public Configuration configuration; /** * The only doclet that may use this toolkit is {@value} */ private static final String TOOLKIT_DOCLET_NAME = com.sun.tools.doclets.formats.html.HtmlDoclet.class.getName(); /** * Verify that the only doclet that is using this toolkit is * {@value #TOOLKIT_DOCLET_NAME}. */ private boolean isValidDoclet(AbstractDoclet doclet) { if (! doclet.getClass().getName().equals(TOOLKIT_DOCLET_NAME)) { configuration.message.error("doclet.Toolkit_Usage_Violation", TOOLKIT_DOCLET_NAME); return false; } return true; } /** * The method that starts the execution of the doclet. * * @param doclet the doclet to start the execution for. * @param root the {@link RootDoc} that points to the source to document. * @return true if the doclet executed without error. False otherwise. */ public boolean start(AbstractDoclet doclet, RootDoc root) { configuration = configuration(); configuration.root = root; if (! isValidDoclet(doclet)) { return false; } try { doclet.startGeneration(root); } catch (Configuration.Fault f) { root.printError(f.getMessage()); return false; } catch (Exception exc) { exc.printStackTrace(); return false; } return true; } /** * Indicate that this doclet supports the 1.5 language features. * @return JAVA_1_5, indicating that the new features are supported. */ public static LanguageVersion languageVersion() { return LanguageVersion.JAVA_1_5; } /** * Create the configuration instance and returns it. * @return the configuration of the doclet. */ public abstract Configuration configuration(); /** * Start the generation of files. Call generate methods in the individual * writers, which will in turn generate the documentation files. Call the * TreeWriter generation first to ensure the Class Hierarchy is built * first and then can be used in the later generation. * * @see com.sun.javadoc.RootDoc */ private void startGeneration(RootDoc root) throws Configuration.Fault, Exception { if (root.classes().length == 0) { configuration.message. error("doclet.No_Public_Classes_To_Document"); return; } configuration.setOptions(); configuration.getDocletSpecificMsg().notice("doclet.build_version", configuration.getDocletSpecificBuildDate()); ClassTree classtree = new ClassTree(configuration, configuration.nodeprecated); generateClassFiles(root, classtree); Util.copyDocFiles(configuration, DocPaths.DOC_FILES); PackageListWriter.generate(configuration); generatePackageFiles(classtree); generateProfileFiles(); generateOtherFiles(root, classtree); configuration.tagletManager.printReport(); } /** * Generate additional documentation that is added to the API documentation. * * @param root the RootDoc of source to document. * @param classtree the data structure representing the class tree. */ protected void generateOtherFiles(RootDoc root, ClassTree classtree) throws Exception { BuilderFactory builderFactory = configuration.getBuilderFactory(); AbstractBuilder constantsSummaryBuilder = builderFactory.getConstantsSummaryBuider(); constantsSummaryBuilder.build(); AbstractBuilder serializedFormBuilder = builderFactory.getSerializedFormBuilder(); serializedFormBuilder.build(); } /** * Generate the profile documentation. * */ protected abstract void generateProfileFiles() throws Exception; /** * Generate the package documentation. * * @param classtree the data structure representing the class tree. */ protected abstract void generatePackageFiles(ClassTree classtree) throws Exception; /** * Generate the class documentation. * * @param classtree the data structure representing the class tree. */ protected abstract void generateClassFiles(ClassDoc[] arr, ClassTree classtree); /** * Iterate through all classes and construct documentation for them. * * @param root the RootDoc of source to document. * @param classtree the data structure representing the class tree. */ protected void generateClassFiles(RootDoc root, ClassTree classtree) { generateClassFiles(classtree); PackageDoc[] packages = root.specifiedPackages(); for (int i = 0; i < packages.length; i++) { generateClassFiles(packages[i].allClasses(), classtree); } } /** * Generate the class files for single classes specified on the command line. * * @param classtree the data structure representing the class tree. */ private void generateClassFiles(ClassTree classtree) { String[] packageNames = configuration.classDocCatalog.packageNames(); for (int packageNameIndex = 0; packageNameIndex < packageNames.length; packageNameIndex++) { generateClassFiles(configuration.classDocCatalog.allClasses( packageNames[packageNameIndex]), classtree); } } } ././@LongLink0000000000000000000000000000020000000000000011205 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/AnnotationTypeOptionalMemberWriter.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/AnnotationTy0000644000000000000000000000401512214026367032260 0ustar 00000000000000/* * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.internal.toolkit; import com.sun.javadoc.*; /** * The interface for writing annotation type optional member output. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Jamie Ho * @author Bhavesh Patel (Modified) * @since 1.5 */ public interface AnnotationTypeOptionalMemberWriter extends AnnotationTypeRequiredMemberWriter { /** * Add the the default value documentation. * * @param member the member being documented * @param annotationDocTree content tree to which the default value will be added */ public void addDefaultValueInfo(MemberDoc member, Content annotationDocTree); } ././@LongLink0000000000000000000000000000020000000000000011205 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/AnnotationTypeRequiredMemberWriter.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/AnnotationTy0000644000000000000000000001034012214026367032256 0ustar 00000000000000/* * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.internal.toolkit; import java.io.*; import com.sun.javadoc.*; /** * The interface for writing annotation type required member output. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * * @author Jamie Ho * @author Bhavesh Patel (Modified) * @since 1.5 */ public interface AnnotationTypeRequiredMemberWriter { /** * Add the annotation type details tree header. * * @param classDoc the annotation type being documented * @param memberDetailsTree the content tree representing member details */ public void addAnnotationDetailsTreeHeader(ClassDoc classDoc, Content memberDetailsTree); /** * Get the annotation type documentation tree header. * * @param member the annotation type being documented * @param annotationDetailsTree the content tree representing annotation type details * @return content tree for the annotation type documentation header */ public Content getAnnotationDocTreeHeader(MemberDoc member, Content annotationDetailsTree); /** * Get the annotation type details tree. * * @param annotationDetailsTree the content tree representing annotation type details * @return content tree for the annotation type details */ public Content getAnnotationDetails(Content annotationDetailsTree); /** * Get the annotation type documentation. * * @param annotationDocTree the content tree representing annotation type documentation * @param isLastContent true if the content to be added is the last content * @return content tree for the annotation type documentation */ public Content getAnnotationDoc(Content annotationDocTree, boolean isLastContent); /** * Get the signature for the given member. * * @param member the member being documented * @return content tree for the annotation type signature */ public Content getSignature(MemberDoc member); /** * Add the deprecated output for the given member. * * @param member the member being documented * @param annotationDocTree content tree to which the deprecated information will be added */ public void addDeprecated(MemberDoc member, Content annotationDocTree); /** * Add the comments for the given member. * * @param member the member being documented * @param annotationDocTree the content tree to which the comments will be added */ public void addComments(MemberDoc member, Content annotationDocTree); /** * Add the tags for the given member. * * @param member the member being documented * @param annotationDocTree the content tree to which the tags will be added */ public void addTags(MemberDoc member, Content annotationDocTree); /** * Close the writer. */ public void close() throws IOException; } ././@LongLink0000000000000000000000000000016200000000000011214 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/AnnotationTypeWriter.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/AnnotationTy0000644000000000000000000001255012214026367032263 0ustar 00000000000000/* * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.internal.toolkit; import java.io.*; import com.sun.javadoc.*; /** * The interface for writing annotation type output. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Jamie Ho * @author Bhavesh Patel (Modified) * @since 1.5 */ public interface AnnotationTypeWriter { /** * Get the header of the page. * * @param header the header string to write * @return a content tree for the header documentation */ public Content getHeader(String header); /** * Get the annotation content header. * * @return annotation content header that needs to be added to the documentation */ public Content getAnnotationContentHeader(); /** * Get the annotation information tree header. * * @return annotation information tree header that needs to be added to the documentation */ public Content getAnnotationInfoTreeHeader(); /** * Get the annotation information. * * @param annotationInfoTree content tree containing the annotation information * @return a content tree for the annotation */ public Content getAnnotationInfo(Content annotationInfoTree); /** * Add the signature of the current annotation type. * * @param modifiers the modifiers for the signature * @param annotationInfoTree the annotation content tree to which the signature will be added */ public void addAnnotationTypeSignature(String modifiers, Content annotationInfoTree); /** * Build the annotation type description. * * @param annotationInfoTree content tree to which the description will be added */ public void addAnnotationTypeDescription(Content annotationInfoTree); /** * Add the tag information for the current annotation type. * * @param annotationInfoTree content tree to which the tag information will be added */ public void addAnnotationTypeTagInfo(Content annotationInfoTree); /** * If this annotation is deprecated, add the appropriate information. * * @param annotationInfoTree content tree to which the deprecated information will be added */ public void addAnnotationTypeDeprecationInfo (Content annotationInfoTree); /** * Add the annotation type details marker. * * @param memberDetails the content tree representing member details marker */ public void addAnnotationDetailsMarker(Content memberDetails); /** * Get the member tree header for the annotation type. * * @return a content tree for the member tree header */ public Content getMemberTreeHeader(); /** * Get the member tree. * * @param memberTree the content tree that will be modified and returned * @return a content tree for the member */ public Content getMemberTree(Content memberTree); /** * Get the member summary tree. * * @param memberTree the content tree that will be used to build the summary tree * @return a content tree for the member summary */ public Content getMemberSummaryTree(Content memberTree); /** * Get the member details tree. * * @param memberTree the content tree that will be used to build the details tree * @return a content tree for the member details */ public Content getMemberDetailsTree(Content memberTree); /** * Add the footer of the page. * * @param contentTree content tree to which the footer will be added */ public void addFooter(Content contentTree); /** * Print the document. * * @param contentTree content tree that will be printed as a document */ public void printDocument(Content contentTree) throws IOException; /** * Close the writer. */ public void close() throws IOException; /** * Return the {@link AnnotationTypeDoc} being documented. * * @return the AnnotationTypeDoc being documented. */ public AnnotationTypeDoc getAnnotationTypeDoc(); } ././@LongLink0000000000000000000000000000015100000000000011212 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/ClassWriter.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/ClassWriter.0000644000000000000000000001527312214026367032161 0ustar 00000000000000/* * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.internal.toolkit; import java.io.*; import com.sun.javadoc.*; /** * The interface for writing class output. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Jamie Ho * @author Bhavesh Patel (Modified) * @since 1.5 */ public interface ClassWriter { /** * Get the header of the page. * * @param header the header string to write * @return header content that needs to be added to the documentation */ public Content getHeader(String header); /** * Get the class content header. * * @return class content header that needs to be added to the documentation */ public Content getClassContentHeader(); /** * Add the class tree documentation. * * @param classContentTree class content tree to which the documentation will be added */ public void addClassTree(Content classContentTree); /** * Get the class information tree header. * * @return class informaion tree header that needs to be added to the documentation */ public Content getClassInfoTreeHeader(); /** * Add the type parameter information. * * @param classInfoTree content tree to which the documentation will be added */ public void addTypeParamInfo(Content classInfoTree); /** * Add all super interfaces if this is an interface. * * @param classInfoTree content tree to which the documentation will be added */ public void addSuperInterfacesInfo(Content classInfoTree); /** * Add all implemented interfaces if this is a class. * * @param classInfoTree content tree to which the documentation will be added */ public void addImplementedInterfacesInfo(Content classInfoTree); /** * Add all the classes that extend this one. * * @param classInfoTree content tree to which the documentation will be added */ public void addSubClassInfo(Content classInfoTree); /** * Add all the interfaces that extend this one. * * @param classInfoTree content tree to which the documentation will be added */ public void addSubInterfacesInfo(Content classInfoTree); /** * If this is an interface, add all classes that implement this * interface. * * @param classInfoTree content tree to which the documentation will be added */ public void addInterfaceUsageInfo(Content classInfoTree); /** * If this is an functional interface, display appropriate message. * * @param classInfoTree content tree to which the documentation will be added */ public void addFunctionalInterfaceInfo(Content classInfoTree); /** * If this is an inner class or interface, add the enclosing class or * interface. * * @param classInfoTree content tree to which the documentation will be added */ public void addNestedClassInfo (Content classInfoTree); /** * Get the class information. * * @param classInfoTree content tree conatining the class information * @return a content tree for the class */ public Content getClassInfo(Content classInfoTree); /** * If this class is deprecated, add the appropriate information. * * @param classInfoTree content tree to which the documentation will be added */ public void addClassDeprecationInfo (Content classInfoTree); /** * Add the signature of the current class content tree. * * @param modifiers the modifiers for the signature * @param classInfoTree the class content tree to which the signature will be added */ public void addClassSignature(String modifiers, Content classInfoTree); /** * Build the class description. * * @param classInfoTree content tree to which the documentation will be added */ public void addClassDescription(Content classInfoTree); /** * Add the tag information for the current class. * * @param classInfoTree content tree to which the tag information will be added */ public void addClassTagInfo(Content classInfoTree); /** * Get the member tree header for the class. * * @return a content tree for the member tree header */ public Content getMemberTreeHeader(); /** * Add the footer of the page. * * @param contentTree content tree to which the footer will be added */ public void addFooter(Content contentTree); /** * Print the document. * * @param contentTree content tree that will be printed as a document */ public void printDocument(Content contentTree) throws IOException; /** * Close the writer. */ public void close() throws IOException; /** * Return the classDoc being documented. * * @return the classDoc being documented. */ public ClassDoc getClassDoc(); /** * Get the member summary tree. * * @param memberTree the content tree used to build the summary tree * @return a content tree for the member summary */ public Content getMemberSummaryTree(Content memberTree); /** * Get the member details tree. * * @param memberTree the content tree used to build the details tree * @return a content tree for the member details */ public Content getMemberDetailsTree(Content memberTree); } ././@LongLink0000000000000000000000000000015300000000000011214 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/Configuration.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/Configuratio0000644000000000000000000010164412214026367032270 0ustar 00000000000000/* * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.internal.toolkit; import java.io.*; import java.util.*; import java.util.regex.Matcher; import java.util.regex.Pattern; import com.sun.javadoc.*; import com.sun.tools.javac.sym.Profiles; import com.sun.tools.javac.jvm.Profile; import com.sun.tools.doclets.internal.toolkit.builders.BuilderFactory; import com.sun.tools.doclets.internal.toolkit.taglets.*; import com.sun.tools.doclets.internal.toolkit.util.*; import javax.tools.JavaFileManager; /** * Configure the output based on the options. Doclets should sub-class * Configuration, to configure and add their own options. This class contains * all user options which are supported by the 1.1 doclet and the standard * doclet. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Robert Field. * @author Atul Dambalkar. * @author Jamie Ho */ public abstract class Configuration { /** * Exception used to report a problem during setOptions. */ public static class Fault extends Exception { private static final long serialVersionUID = 0; Fault(String msg) { super(msg); } Fault(String msg, Exception cause) { super(msg, cause); } } /** * The factory for builders. */ protected BuilderFactory builderFactory; /** * The taglet manager. */ public TagletManager tagletManager; /** * The path to the builder XML input file. */ public String builderXMLPath; /** * The default path to the builder XML. */ private static final String DEFAULT_BUILDER_XML = "resources/doclet.xml"; /** * The path to Taglets */ public String tagletpath = ""; /** * This is true if option "-serialwarn" is used. Defualt value is false to * suppress excessive warnings about serial tag. */ public boolean serialwarn = false; /** * The specified amount of space between tab stops. */ public int sourcetab; public String tabSpaces; /** * True if we should generate browsable sources. */ public boolean linksource = false; /** * True if command line option "-nosince" is used. Default value is * false. */ public boolean nosince = false; /** * True if we should recursively copy the doc-file subdirectories */ public boolean copydocfilesubdirs = false; /** * The META charset tag used for cross-platform viewing. */ public String charset = ""; /** * True if user wants to add member names as meta keywords. * Set to false because meta keywords are ignored in general * by most Internet search engines. */ public boolean keywords = false; /** * The meta tag keywords instance. */ public final MetaKeywords metakeywords = new MetaKeywords(this); /** * The list of doc-file subdirectories to exclude */ protected Set excludedDocFileDirs; /** * The list of qualifiers to exclude */ protected Set excludedQualifiers; /** * The Root of the generated Program Structure from the Doclet API. */ public RootDoc root; /** * Destination directory name, in which doclet will generate the entire * documentation. Default is current directory. */ public String destDirName = ""; /** * Destination directory name, in which doclet will copy the doc-files to. */ public String docFileDestDirName = ""; /** * Encoding for this document. Default is default encoding for this * platform. */ public String docencoding = null; /** * True if user wants to suppress descriptions and tags. */ public boolean nocomment = false; /** * Encoding for this document. Default is default encoding for this * platform. */ public String encoding = null; /** * Generate author specific information for all the classes if @author * tag is used in the doc comment and if -author option is used. * showauthor is set to true if -author option is used. * Default is don't show author information. */ public boolean showauthor = false; /** * Generate documentation for JavaFX getters and setters automatically * by copying it from the appropriate property definition. */ public boolean javafx = false; /** * Generate version specific information for the all the classes * if @version tag is used in the doc comment and if -version option is * used. showversion is set to true if -version option is * used.Default is don't show version information. */ public boolean showversion = false; /** * Sourcepath from where to read the source files. Default is classpath. * */ public String sourcepath = ""; /** * Argument for command line option "-Xprofilespath". */ public String profilespath = ""; /** * Generate profiles documentation if profilespath is set and valid profiles * are present. */ public boolean showProfiles = false; /** * Don't generate deprecated API information at all, if -nodeprecated * option is used. nodepracted is set to true if * -nodeprecated option is used. Default is generate deprected API * information. */ public boolean nodeprecated = false; /** * The catalog of classes specified on the command-line */ public ClassDocCatalog classDocCatalog; /** * Message Retriever for the doclet, to retrieve message from the resource * file for this Configuration, which is common for 1.1 and standard * doclets. * * TODO: Make this private!!! */ public MessageRetriever message = null; /** * True if user wants to suppress time stamp in output. * Default is false. */ public boolean notimestamp= false; /** * The package grouping instance. */ public final Group group = new Group(this); /** * The tracker of external package links. */ public final Extern extern = new Extern(this); /** * Return the build date for the doclet. */ public abstract String getDocletSpecificBuildDate(); /** * This method should be defined in all those doclets(configurations), * which want to derive themselves from this Configuration. This method * can be used to set its own command line options. * * @param options The array of option names and values. * @throws DocletAbortException */ public abstract void setSpecificDocletOptions(String[][] options) throws Fault; /** * Return the doclet specific {@link MessageRetriever} * @return the doclet specific MessageRetriever. */ public abstract MessageRetriever getDocletSpecificMsg(); /** * A profiles object used to access profiles across various pages. */ public Profiles profiles; /** * An map of the profiles to packages. */ public Map profilePackages; /** * An array of the packages specified on the command-line merged * with the array of packages that contain the classes specified on the * command-line. The array is sorted. */ public PackageDoc[] packages; /** * Constructor. Constructs the message retriever with resource file. */ public Configuration() { message = new MessageRetriever(this, "com.sun.tools.doclets.internal.toolkit.resources.doclets"); excludedDocFileDirs = new HashSet(); excludedQualifiers = new HashSet(); setTabWidth(DocletConstants.DEFAULT_TAB_STOP_LENGTH); } /** * Return the builder factory for this doclet. * * @return the builder factory for this doclet. */ public BuilderFactory getBuilderFactory() { if (builderFactory == null) { builderFactory = new BuilderFactory(this); } return builderFactory; } /** * This method should be defined in all those doclets * which want to inherit from this Configuration. This method * should return the number of arguments to the command line * option (including the option name). For example, * -notimestamp is a single-argument option, so this method would * return 1. * * @param option Command line option under consideration. * @return number of arguments to option (including the * option name). Zero return means option not known. * Negative value means error occurred. */ public int optionLength(String option) { option = option.toLowerCase(); if (option.equals("-author") || option.equals("-docfilessubdirs") || option.equals("-javafx") || option.equals("-keywords") || option.equals("-linksource") || option.equals("-nocomment") || option.equals("-nodeprecated") || option.equals("-nosince") || option.equals("-notimestamp") || option.equals("-quiet") || option.equals("-xnodate") || option.equals("-version")) { return 1; } else if (option.equals("-d") || option.equals("-docencoding") || option.equals("-encoding") || option.equals("-excludedocfilessubdir") || option.equals("-link") || option.equals("-sourcetab") || option.equals("-noqualifier") || option.equals("-output") || option.equals("-sourcepath") || option.equals("-tag") || option.equals("-taglet") || option.equals("-tagletpath") || option.equals("-xprofilespath")) { return 2; } else if (option.equals("-group") || option.equals("-linkoffline")) { return 3; } else { return -1; // indicate we don't know about it } } /** * Perform error checking on the given options. * * @param options the given options to check. * @param reporter the reporter used to report errors. */ public abstract boolean validOptions(String options[][], DocErrorReporter reporter); private void initProfiles() throws IOException { profiles = Profiles.read(new File(profilespath)); // Generate profiles documentation only is profilespath is set and if // profiles is not null and profiles count is 1 or more. showProfiles = (!profilespath.isEmpty() && profiles != null && profiles.getProfileCount() > 0); } private void initProfilePackages() throws IOException { profilePackages = new HashMap(); ArrayList results; Map packageIndex = new HashMap(); for (int i = 0; i < packages.length; i++) { PackageDoc pkg = packages[i]; packageIndex.put(pkg.name(), pkg); } for (int i = 1; i < profiles.getProfileCount(); i++) { Set profPkgs = profiles.getPackages(i); results = new ArrayList(); for (String packageName : profPkgs) { packageName = packageName.replace("/", "."); PackageDoc profPkg = packageIndex.get(packageName); if (profPkg != null) { results.add(profPkg); } } Collections.sort(results); PackageDoc[] profilePkgs = results.toArray(new PackageDoc[]{}); profilePackages.put(Profile.lookup(i).name, profilePkgs); } } private void initPackageArray() { Set set = new HashSet(Arrays.asList(root.specifiedPackages())); ClassDoc[] classes = root.specifiedClasses(); for (int i = 0; i < classes.length; i++) { set.add(classes[i].containingPackage()); } ArrayList results = new ArrayList(set); Collections.sort(results); packages = results.toArray(new PackageDoc[] {}); } /** * Set the command line options supported by this configuration. * * @param options the two dimensional array of options. */ public void setOptions(String[][] options) throws Fault { LinkedHashSet customTagStrs = new LinkedHashSet(); // Some options, specifically -link and -linkoffline, require that // the output directory has already been created: so do that first. for (int oi = 0; oi < options.length; ++oi) { String[] os = options[oi]; String opt = os[0].toLowerCase(); if (opt.equals("-d")) { destDirName = addTrailingFileSep(os[1]); docFileDestDirName = destDirName; ensureOutputDirExists(); break; } } for (int oi = 0; oi < options.length; ++oi) { String[] os = options[oi]; String opt = os[0].toLowerCase(); if (opt.equals("-docfilessubdirs")) { copydocfilesubdirs = true; } else if (opt.equals("-docencoding")) { docencoding = os[1]; } else if (opt.equals("-encoding")) { encoding = os[1]; } else if (opt.equals("-author")) { showauthor = true; } else if (opt.equals("-javafx")) { javafx = true; } else if (opt.equals("-nosince")) { nosince = true; } else if (opt.equals("-version")) { showversion = true; } else if (opt.equals("-nodeprecated")) { nodeprecated = true; } else if (opt.equals("-sourcepath")) { sourcepath = os[1]; } else if ((opt.equals("-classpath") || opt.equals("-cp")) && sourcepath.length() == 0) { sourcepath = os[1]; } else if (opt.equals("-excludedocfilessubdir")) { addToSet(excludedDocFileDirs, os[1]); } else if (opt.equals("-noqualifier")) { addToSet(excludedQualifiers, os[1]); } else if (opt.equals("-linksource")) { linksource = true; } else if (opt.equals("-sourcetab")) { linksource = true; try { setTabWidth(Integer.parseInt(os[1])); } catch (NumberFormatException e) { //Set to -1 so that warning will be printed //to indicate what is valid argument. sourcetab = -1; } if (sourcetab <= 0) { message.warning("doclet.sourcetab_warning"); setTabWidth(DocletConstants.DEFAULT_TAB_STOP_LENGTH); } } else if (opt.equals("-notimestamp")) { notimestamp = true; } else if (opt.equals("-nocomment")) { nocomment = true; } else if (opt.equals("-tag") || opt.equals("-taglet")) { customTagStrs.add(os); } else if (opt.equals("-tagletpath")) { tagletpath = os[1]; } else if (opt.equals("-xprofilespath")) { profilespath = os[1]; } else if (opt.equals("-keywords")) { keywords = true; } else if (opt.equals("-serialwarn")) { serialwarn = true; } else if (opt.equals("-group")) { group.checkPackageGroups(os[1], os[2]); } else if (opt.equals("-link")) { String url = os[1]; extern.link(url, url, root, false); } else if (opt.equals("-linkoffline")) { String url = os[1]; String pkglisturl = os[2]; extern.link(url, pkglisturl, root, true); } } if (sourcepath.length() == 0) { sourcepath = System.getProperty("env.class.path") == null ? "" : System.getProperty("env.class.path"); } if (docencoding == null) { docencoding = encoding; } classDocCatalog = new ClassDocCatalog(root.specifiedClasses(), this); initTagletManager(customTagStrs); } /** * Set the command line options supported by this configuration. * * @throws DocletAbortException */ public void setOptions() throws Fault { initPackageArray(); setOptions(root.options()); if (!profilespath.isEmpty()) { try { initProfiles(); initProfilePackages(); } catch (Exception e) { throw new DocletAbortException(); } } setSpecificDocletOptions(root.options()); } private void ensureOutputDirExists() throws Fault { DocFile destDir = DocFile.createFileForDirectory(this, destDirName); if (!destDir.exists()) { //Create the output directory (in case it doesn't exist yet) root.printNotice(getText("doclet.dest_dir_create", destDirName)); destDir.mkdirs(); } else if (!destDir.isDirectory()) { throw new Fault(getText( "doclet.destination_directory_not_directory_0", destDir.getPath())); } else if (!destDir.canWrite()) { throw new Fault(getText( "doclet.destination_directory_not_writable_0", destDir.getPath())); } } /** * Initialize the taglet manager. The strings to initialize the simple custom tags should * be in the following format: "[tag name]:[location str]:[heading]". * @param customTagStrs the set two dimensional arrays of strings. These arrays contain * either -tag or -taglet arguments. */ private void initTagletManager(Set customTagStrs) { tagletManager = tagletManager == null ? new TagletManager(nosince, showversion, showauthor, javafx, message) : tagletManager; String[] args; for (Iterator it = customTagStrs.iterator(); it.hasNext(); ) { args = it.next(); if (args[0].equals("-taglet")) { tagletManager.addCustomTag(args[1], getFileManager(), tagletpath); continue; } String[] tokens = tokenize(args[1], TagletManager.SIMPLE_TAGLET_OPT_SEPARATOR, 3); if (tokens.length == 1) { String tagName = args[1]; if (tagletManager.isKnownCustomTag(tagName)) { //reorder a standard tag tagletManager.addNewSimpleCustomTag(tagName, null, ""); } else { //Create a simple tag with the heading that has the same name as the tag. StringBuilder heading = new StringBuilder(tagName + ":"); heading.setCharAt(0, Character.toUpperCase(tagName.charAt(0))); tagletManager.addNewSimpleCustomTag(tagName, heading.toString(), "a"); } } else if (tokens.length == 2) { //Add simple taglet without heading, probably to excluding it in the output. tagletManager.addNewSimpleCustomTag(tokens[0], tokens[1], ""); } else if (tokens.length >= 3) { tagletManager.addNewSimpleCustomTag(tokens[0], tokens[2], tokens[1]); } else { message.error("doclet.Error_invalid_custom_tag_argument", args[1]); } } } /** * Given a string, return an array of tokens. The separator can be escaped * with the '\' character. The '\' character may also be escaped by the * '\' character. * * @param s the string to tokenize. * @param separator the separator char. * @param maxTokens the maximum number of tokens returned. If the * max is reached, the remaining part of s is appended * to the end of the last token. * * @return an array of tokens. */ private String[] tokenize(String s, char separator, int maxTokens) { List tokens = new ArrayList(); StringBuilder token = new StringBuilder (); boolean prevIsEscapeChar = false; for (int i = 0; i < s.length(); i += Character.charCount(i)) { int currentChar = s.codePointAt(i); if (prevIsEscapeChar) { // Case 1: escaped character token.appendCodePoint(currentChar); prevIsEscapeChar = false; } else if (currentChar == separator && tokens.size() < maxTokens-1) { // Case 2: separator tokens.add(token.toString()); token = new StringBuilder(); } else if (currentChar == '\\') { // Case 3: escape character prevIsEscapeChar = true; } else { // Case 4: regular character token.appendCodePoint(currentChar); } } if (token.length() > 0) { tokens.add(token.toString()); } return tokens.toArray(new String[] {}); } private void addToSet(Set s, String str){ StringTokenizer st = new StringTokenizer(str, ":"); String current; while(st.hasMoreTokens()){ current = st.nextToken(); s.add(current); } } /** * Add a trailing file separator, if not found. Remove superfluous * file separators if any. Preserve the front double file separator for * UNC paths. * * @param path Path under consideration. * @return String Properly constructed path string. */ public static String addTrailingFileSep(String path) { String fs = System.getProperty("file.separator"); String dblfs = fs + fs; int indexDblfs; while ((indexDblfs = path.indexOf(dblfs, 1)) >= 0) { path = path.substring(0, indexDblfs) + path.substring(indexDblfs + fs.length()); } if (!path.endsWith(fs)) path += fs; return path; } /** * This checks for the validity of the options used by the user. * This works exactly like * {@link com.sun.javadoc.Doclet#validOptions(String[][], * DocErrorReporter)}. This will validate the options which are shared * by our doclets. For example, this method will flag an error using * the DocErrorReporter if user has used "-nohelp" and "-helpfile" option * together. * * @param options options used on the command line. * @param reporter used to report errors. * @return true if all the options are valid. */ public boolean generalValidOptions(String options[][], DocErrorReporter reporter) { boolean docencodingfound = false; String encoding = ""; for (int oi = 0; oi < options.length; oi++) { String[] os = options[oi]; String opt = os[0].toLowerCase(); if (opt.equals("-docencoding")) { docencodingfound = true; if (!checkOutputFileEncoding(os[1], reporter)) { return false; } } else if (opt.equals("-encoding")) { encoding = os[1]; } } if (!docencodingfound && encoding.length() > 0) { if (!checkOutputFileEncoding(encoding, reporter)) { return false; } } return true; } /** * Check the validity of the given Source or Output File encoding on this * platform. * * @param docencoding output file encoding. * @param reporter used to report errors. */ private boolean checkOutputFileEncoding(String docencoding, DocErrorReporter reporter) { OutputStream ost= new ByteArrayOutputStream(); OutputStreamWriter osw = null; try { osw = new OutputStreamWriter(ost, docencoding); } catch (UnsupportedEncodingException exc) { reporter.printError(getText("doclet.Encoding_not_supported", docencoding)); return false; } finally { try { if (osw != null) { osw.close(); } } catch (IOException exc) { } } return true; } /** * Return true if the given doc-file subdirectory should be excluded and * false otherwise. * @param docfilesubdir the doc-files subdirectory to check. */ public boolean shouldExcludeDocFileDir(String docfilesubdir){ if (excludedDocFileDirs.contains(docfilesubdir)) { return true; } else { return false; } } /** * Return true if the given qualifier should be excluded and false otherwise. * @param qualifier the qualifier to check. */ public boolean shouldExcludeQualifier(String qualifier){ if (excludedQualifiers.contains("all") || excludedQualifiers.contains(qualifier) || excludedQualifiers.contains(qualifier + ".*")) { return true; } else { int index = -1; while ((index = qualifier.indexOf(".", index + 1)) != -1) { if (excludedQualifiers.contains(qualifier.substring(0, index + 1) + "*")) { return true; } } return false; } } /** * Return the qualified name of the ClassDoc if it's qualifier is not excluded. Otherwise, * return the unqualified ClassDoc name. * @param cd the ClassDoc to check. */ public String getClassName(ClassDoc cd) { PackageDoc pd = cd.containingPackage(); if (pd != null && shouldExcludeQualifier(cd.containingPackage().name())) { return cd.name(); } else { return cd.qualifiedName(); } } public String getText(String key) { try { //Check the doclet specific properties file. return getDocletSpecificMsg().getText(key); } catch (Exception e) { //Check the shared properties file. return message.getText(key); } } public String getText(String key, String a1) { try { //Check the doclet specific properties file. return getDocletSpecificMsg().getText(key, a1); } catch (Exception e) { //Check the shared properties file. return message.getText(key, a1); } } public String getText(String key, String a1, String a2) { try { //Check the doclet specific properties file. return getDocletSpecificMsg().getText(key, a1, a2); } catch (Exception e) { //Check the shared properties file. return message.getText(key, a1, a2); } } public String getText(String key, String a1, String a2, String a3) { try { //Check the doclet specific properties file. return getDocletSpecificMsg().getText(key, a1, a2, a3); } catch (Exception e) { //Check the shared properties file. return message.getText(key, a1, a2, a3); } } public abstract Content newContent(); /** * Get the configuration string as a content. * * @param key the key to look for in the configuration file * @return a content tree for the text */ public Content getResource(String key) { Content c = newContent(); c.addContent(getText(key)); return c; } /** * Get the configuration string as a content. * * @param key the key to look for in the configuration file * @param o string or content argument added to configuration text * @return a content tree for the text */ public Content getResource(String key, Object o) { return getResource(key, o, null, null); } /** * Get the configuration string as a content. * * @param key the key to look for in the configuration file * @param o string or content argument added to configuration text * @return a content tree for the text */ public Content getResource(String key, Object o1, Object o2) { return getResource(key, o1, o2, null); } /** * Get the configuration string as a content. * * @param key the key to look for in the configuration file * @param o1 string or content argument added to configuration text * @param o2 string or content argument added to configuration text * @return a content tree for the text */ public Content getResource(String key, Object o0, Object o1, Object o2) { Content c = newContent(); Pattern p = Pattern.compile("\\{([012])\\}"); String text = getText(key); Matcher m = p.matcher(text); int start = 0; while (m.find(start)) { c.addContent(text.substring(start, m.start())); Object o = null; switch (m.group(1).charAt(0)) { case '0': o = o0; break; case '1': o = o1; break; case '2': o = o2; break; } if (o == null) { c.addContent("{" + m.group(1) + "}"); } else if (o instanceof String) { c.addContent((String) o); } else if (o instanceof Content) { c.addContent((Content) o); } start = m.end(); } c.addContent(text.substring(start)); return c; } /** * Return true if the ClassDoc element is getting documented, depending upon * -nodeprecated option and the deprecation information. Return true if * -nodeprecated is not used. Return false if -nodeprecated is used and if * either ClassDoc element is deprecated or the containing package is deprecated. * * @param cd the ClassDoc for which the page generation is checked */ public boolean isGeneratedDoc(ClassDoc cd) { if (!nodeprecated) { return true; } return !(Util.isDeprecated(cd) || Util.isDeprecated(cd.containingPackage())); } /** * Return the doclet specific instance of a writer factory. * @return the {@link WriterFactory} for the doclet. */ public abstract WriterFactory getWriterFactory(); /** * Return the input stream to the builder XML. * * @return the input steam to the builder XML. * @throws FileNotFoundException when the given XML file cannot be found. */ public InputStream getBuilderXML() throws IOException { return builderXMLPath == null ? Configuration.class.getResourceAsStream(DEFAULT_BUILDER_XML) : DocFile.createFileForInput(this, builderXMLPath).openInputStream(); } /** * Return the Locale for this document. */ public abstract Locale getLocale(); /** * Return the current file manager. */ public abstract JavaFileManager getFileManager(); /** * Return the comparator that will be used to sort member documentation. * To no do any sorting, return null. * * @return the {@link java.util.Comparator} used to sort members. */ public abstract Comparator getMemberComparator(); private void setTabWidth(int n) { sourcetab = n; tabSpaces = String.format("%" + n + "s", ""); } public abstract boolean showMessage(SourcePosition pos, String key); } ././@LongLink0000000000000000000000000000016400000000000011216 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/ConstantsSummaryWriter.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/ConstantsSum0000644000000000000000000001237512214026367032302 0ustar 00000000000000/* * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.internal.toolkit; import java.io.*; import java.util.*; import com.sun.javadoc.*; /** * The interface for writing constants summary output. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Jamie Ho * @author Bhavesh Patel (Modified) * @since 1.5 */ public interface ConstantsSummaryWriter { /** * Close the writer. */ public abstract void close() throws IOException; /** * Get the header for the constant summary documentation. * * @return header that needs to be added to the documentation */ public abstract Content getHeader(); /** * Get the header for the constant content list. * * @return content header that needs to be added to the documentation */ public abstract Content getContentsHeader(); /** * Adds the given package name link to the constant content list tree. * * @param pkg the {@link PackageDoc} to index. * @param parsedPackageName the parsed package name. We only Write the * first 2 directory levels of the package * name. For example, java.lang.ref would be * indexed as java.lang.*. * @param WriteedPackageHeaders the set of package headers that have already * been indexed. We don't want to index * something more than once. * @param contentListTree the content tree to which the link will be added */ public abstract void addLinkToPackageContent(PackageDoc pkg, String parsedPackageName, Set WriteedPackageHeaders, Content contentListTree); /** * Get the content list to be added to the documentation tree. * * @param contentListTree the content that will be added to the list * @return content list that will be added to the documentation tree */ public abstract Content getContentsList(Content contentListTree); /** * Get the constant summaries for the document. * * @return constant summaries header to be added to the documentation tree */ public abstract Content getConstantSummaries(); /** * Adds the given package name. * * @param pkg the {@link PackageDoc} to index. * @param parsedPackageName the parsed package name. We only Write the * first 2 directory levels of the package * name. For example, java.lang.ref would be * indexed as java.lang.*. * @param summariesTree the documentation tree to which the package name will * be written */ public abstract void addPackageName(PackageDoc pkg, String parsedPackageName, Content summariesTree); /** * Get the class summary header for the constants summary. * * @return the header content for the class constants summary */ public abstract Content getClassConstantHeader(); /** * Adds the constant member table to the documentation tree. * * @param cd the class whose constants are being documented. * @param fields the constants being documented. * @param classConstantTree the documentation tree to which theconstant member * table content will be added */ public abstract void addConstantMembers(ClassDoc cd, List fields, Content classConstantTree); /** * Adds the footer for the summary documentation. * * @param contentTree content tree to which the footer will be added */ public abstract void addFooter(Content contentTree); /** * Print the constants summary document. * * @param contentTree content tree which should be printed */ public abstract void printDocument(Content contentTree) throws IOException; } ././@LongLink0000000000000000000000000000015700000000000011220 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/ConstructorWriter.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/ConstructorW0000644000000000000000000001105612214026367032310 0ustar 00000000000000/* * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.internal.toolkit; import java.io.*; import com.sun.javadoc.*; /** * The interface for writing constructor output. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Jamie Ho * @author Bhavesh Patel (Modified) * @since 1.5 */ public interface ConstructorWriter { /** * Get the constructor details tree header. * * @param classDoc the class being documented * @param memberDetailsTree the content tree representing member details * @return content tree for the constructor details header */ public Content getConstructorDetailsTreeHeader(ClassDoc classDoc, Content memberDetailsTree); /** * Get the constructor documentation tree header. * * @param constructor the constructor being documented * @param constructorDetailsTree the content tree representing constructor details * @return content tree for the constructor documentation header */ public Content getConstructorDocTreeHeader(ConstructorDoc constructor, Content constructorDetailsTree); /** * Get the signature for the given constructor. * * @param constructor the constructor being documented * @return content tree for the constructor signature */ public Content getSignature(ConstructorDoc constructor); /** * Add the deprecated output for the given constructor. * * @param constructor the constructor being documented * @param constructorDocTree content tree to which the deprecated information will be added */ public void addDeprecated(ConstructorDoc constructor, Content constructorDocTree); /** * Add the comments for the given constructor. * * @param constructor the constructor being documented * @param constructorDocTree the content tree to which the comments will be added */ public void addComments(ConstructorDoc constructor, Content constructorDocTree); /** * Add the tags for the given constructor. * * @param constructor the constructor being documented * @param constructorDocTree the content tree to which the tags will be added */ public void addTags(ConstructorDoc constructor, Content constructorDocTree); /** * Get the constructor details tree. * * @param memberDetailsTree the content tree representing member details * @return content tree for the constructor details */ public Content getConstructorDetails(Content memberDetailsTree); /** * Get the constructor documentation. * * @param constructorDocTree the content tree representing constructor documentation * @param isLastContent true if the content to be added is the last content * @return content tree for the constructor documentation */ public Content getConstructorDoc(Content constructorDocTree, boolean isLastContent); /** * Let the writer know whether a non public constructor was found. * * @param foundNonPubConstructor true if we found a non public constructor. */ public void setFoundNonPubConstructor(boolean foundNonPubConstructor); /** * Close the writer. */ public void close() throws IOException; } libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/Content.java0000644000000000000000000000703412214026367032167 0ustar 00000000000000/* * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.internal.toolkit; import java.io.IOException; import java.io.StringWriter; import java.io.Writer; import com.sun.tools.doclets.internal.toolkit.util.*; /** * A class to create content for javadoc output pages. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Bhavesh Patel */ public abstract class Content { /** * Returns a string representation of the content. * * @return string representation of the content */ @Override public String toString() { StringWriter out = new StringWriter(); try { write(out, true); } catch (IOException e) { // cannot happen from StringWriter throw new DocletAbortException(); } return out.toString(); } /** * Adds content to the existing content. * * @param content content that needs to be added */ public abstract void addContent(Content content); /** * Adds a string content to the existing content. * * @param stringContent the string content to be added */ public abstract void addContent(String stringContent); /** * Writes content to a writer. * */ public abstract boolean write(Writer writer, boolean atNewline) throws IOException ; /** * Returns true if the content is empty. * * @return true if no content to be displayed else return false */ public abstract boolean isEmpty(); /** * Returns true if the content is valid. * * @return true if the content is valid else return false */ public boolean isValid() { return !isEmpty(); } /** * Return the number of characters of plain text content in this object * (optional operation.) * @return the number of characters of plain text content in this */ public int charCount() { return 0; } /** * Checks for null values. * * @param t reference type to check for null values * @return the reference type if not null or else throws a null pointer exception */ protected static T nullCheck(T t) { t.getClass(); return t; } } ././@LongLink0000000000000000000000000000016000000000000011212 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/EnumConstantWriter.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/EnumConstant0000644000000000000000000001052012214026367032245 0ustar 00000000000000/* * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.internal.toolkit; import java.io.*; import com.sun.javadoc.*; /** * The interface for writing enum constant output. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Jamie Ho * @author Bhavesh Patel (Modified) * @since 1.5 */ public interface EnumConstantWriter { /** * Get the enum constants details tree header. * * @param classDoc the class being documented * @param memberDetailsTree the content tree representing member details * @return content tree for the enum constants details header */ public Content getEnumConstantsDetailsTreeHeader(ClassDoc classDoc, Content memberDetailsTree); /** * Get the enum constants documentation tree header. * * @param enumConstant the enum constant being documented * @param enumConstantsDetailsTree the content tree representing enum constant details * @return content tree for the enum constant documentation header */ public Content getEnumConstantsTreeHeader(FieldDoc enumConstant, Content enumConstantsDetailsTree); /** * Get the signature for the given enum constant. * * @param enumConstant the enum constant being documented * @return content tree for the enum constant signature */ public Content getSignature(FieldDoc enumConstant); /** * Add the deprecated output for the given enum constant. * * @param enumConstant the enum constant being documented * @param enumConstantsTree content tree to which the deprecated information will be added */ public void addDeprecated(FieldDoc enumConstant, Content enumConstantsTree); /** * Add the comments for the given enum constant. * * @param enumConstant the enum constant being documented * @param enumConstantsTree the content tree to which the comments will be added */ public void addComments(FieldDoc enumConstant, Content enumConstantsTree); /** * Add the tags for the given enum constant. * * @param enumConstant the enum constant being documented * @param enumConstantsTree the content tree to which the tags will be added */ public void addTags(FieldDoc enumConstant, Content enumConstantsTree); /** * Get the enum constants details tree. * * @param memberDetailsTree the content tree representing member details * @return content tree for the enum constant details */ public Content getEnumConstantsDetails(Content memberDetailsTree); /** * Get the enum constants documentation. * * @param enumConstantsTree the content tree representing enum constants documentation * @param isLastContent true if the content to be added is the last content * @return content tree for the enum constants documentation */ public Content getEnumConstants(Content enumConstantsTree, boolean isLastContent); /** * Close the writer. */ public void close() throws IOException; } ././@LongLink0000000000000000000000000000015100000000000011212 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/FieldWriter.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/FieldWriter.0000644000000000000000000001001012214026367032117 0ustar 00000000000000/* * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.internal.toolkit; import java.io.*; import com.sun.javadoc.*; /** * The interface for writing field output. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Jamie Ho * @author Bhavesh Patel (Modified) * @since 1.5 */ public interface FieldWriter { /** * Get the field details tree header. * * @param classDoc the class being documented * @param memberDetailsTree the content tree representing member details * @return content tree for the field details header */ public Content getFieldDetailsTreeHeader(ClassDoc classDoc, Content memberDetailsTree); /** * Get the field documentation tree header. * * @param field the constructor being documented * @param fieldDetailsTree the content tree representing field details * @return content tree for the field documentation header */ public Content getFieldDocTreeHeader(FieldDoc field, Content fieldDetailsTree); /** * Get the signature for the given field. * * @param field the field being documented * @return content tree for the field signature */ public Content getSignature(FieldDoc field); /** * Add the deprecated output for the given field. * * @param field the field being documented * @param fieldDocTree content tree to which the deprecated information will be added */ public void addDeprecated(FieldDoc field, Content fieldDocTree); /** * Add the comments for the given field. * * @param field the field being documented * @param fieldDocTree the content tree to which the comments will be added */ public void addComments(FieldDoc field, Content fieldDocTree); /** * Add the tags for the given field. * * @param field the field being documented * @param fieldDocTree the content tree to which the tags will be added */ public void addTags(FieldDoc field, Content fieldDocTree); /** * Get the field details tree. * * @param memberDetailsTree the content tree representing member details * @return content tree for the field details */ public Content getFieldDetails(Content memberDetailsTree); /** * Get the field documentation. * * @param fieldDocTree the content tree representing field documentation * @param isLastContent true if the content to be added is the last content * @return content tree for the field documentation */ public Content getFieldDoc(Content fieldDocTree, boolean isLastContent); /** * Close the writer. */ public void close() throws IOException; } ././@LongLink0000000000000000000000000000016100000000000011213 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/MemberSummaryWriter.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/MemberSummar0000644000000000000000000001053212214026367032226 0ustar 00000000000000/* * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.internal.toolkit; import java.io.*; import java.util.*; import com.sun.javadoc.*; /** * The interface for writing member summary output. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Jamie Ho * @author Bhavesh Patel (Modified) * @since 1.5 */ public interface MemberSummaryWriter { /** * Get the member summary header for the given class. * * @param classDoc the class the summary belongs to * @param memberSummaryTree the content tree to which the member summary will be added * @return a content tree for the member summary header */ public Content getMemberSummaryHeader(ClassDoc classDoc, Content memberSummaryTree); /** * Get the summary table for the given class. * * @param classDoc the class the summary table belongs to * @param tableContents list of contents that will be added to the summary table * @return a content tree for the member summary table */ public Content getSummaryTableTree(ClassDoc classDoc, List tableContents); /** * Add the member summary for the given class and member. * * @param classDoc the class the summary belongs to * @param member the member that is documented * @param firstSentenceTags the tags for the sentence being documented * @param tableContents list of contents to which the summary will be added * @param counter the counter for determining id and style for the table row */ public void addMemberSummary(ClassDoc classDoc, ProgramElementDoc member, Tag[] firstSentenceTags, List tableContents, int counter); /** * Get the inherited member summary header for the given class. * * @param classDoc the class the summary belongs to * @return a content tree containing the inherited summary header */ public Content getInheritedSummaryHeader(ClassDoc classDoc); /** * Add the inherited member summary for the given class and member. * * @param classDoc the class the inherited member belongs to * @param member the inherited member that is being documented * @param isFirst true if this is the first member in the list * @param isLast true if this is the last member in the list * @param linksTree the content tree to which the links will be added */ public void addInheritedMemberSummary(ClassDoc classDoc, ProgramElementDoc member, boolean isFirst, boolean isLast, Content linksTree); /** * Get inherited summary links. * * @return a content tree conatining the inherited summary links */ public Content getInheritedSummaryLinksTree(); /** * Get the member tree. * * @param memberTree the content tree representating the member * @return a content tree for the member */ public Content getMemberTree(Content memberTree); /** * Close the writer. */ public void close() throws IOException; } ././@LongLink0000000000000000000000000000015200000000000011213 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/MethodWriter.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/MethodWriter0000644000000000000000000001020312214026367032242 0ustar 00000000000000/* * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.internal.toolkit; import java.io.*; import com.sun.javadoc.*; /** * The interface for writing method output. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Jamie Ho * @author Bhavesh Patel (Modified) * @since 1.5 */ public interface MethodWriter { /** * Get the method details tree header. * * @param classDoc the class being documented * @param memberDetailsTree the content tree representing member details * @return content tree for the method details header */ public Content getMethodDetailsTreeHeader(ClassDoc classDoc, Content memberDetailsTree); /** * Get the method documentation tree header. * * @param method the method being documented * @param methodDetailsTree the content tree representing method details * @return content tree for the method documentation header */ public Content getMethodDocTreeHeader(MethodDoc method, Content methodDetailsTree); /** * Get the signature for the given method. * * @param method the method being documented * @return content tree for the method signature */ public Content getSignature(MethodDoc method); /** * Add the deprecated output for the given method. * * @param method the method being documented * @param methodDocTree content tree to which the deprecated information will be added */ public void addDeprecated(MethodDoc method, Content methodDocTree); /** * Add the comments for the given method. * * @param holder the holder type (not erasure) of the method * @param method the method being documented * @param methodDocTree the content tree to which the comments will be added */ public void addComments(Type holder, MethodDoc method, Content methodDocTree); /** * Add the tags for the given method. * * @param method the method being documented * @param methodDocTree the content tree to which the tags will be added */ public void addTags(MethodDoc method, Content methodDocTree); /** * Get the method details tree. * * @param methodDetailsTree the content tree representing method details * @return content tree for the method details */ public Content getMethodDetails(Content methodDetailsTree); /** * Get the method documentation. * * @param methodDocTree the content tree representing method documentation * @param isLastContent true if the content to be added is the last content * @return content tree for the method documentation */ public Content getMethodDoc(Content methodDocTree, boolean isLastContent); /** * Close the writer. */ public void close() throws IOException; } ././@LongLink0000000000000000000000000000015700000000000011220 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/NestedClassWriter.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/NestedClassW0000644000000000000000000000333412214026367032173 0ustar 00000000000000/* * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.internal.toolkit; import java.io.*; /** * The interface for writing class output. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Jamie Ho * @author Bhavesh Patel (Modified) * @since 1.5 */ public interface NestedClassWriter { /** * Close the writer. */ public void close() throws IOException; } ././@LongLink0000000000000000000000000000016200000000000011214 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/PackageSummaryWriter.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/PackageSumma0000644000000000000000000000762512214026367032201 0ustar 00000000000000/* * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.internal.toolkit; import java.io.*; import com.sun.javadoc.*; /** * The interface for writing package summary output. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Jamie Ho * @author Bhavesh Patel (Modified) * @since 1.5 */ public interface PackageSummaryWriter { /** * Get the header for the summary. * * @param heading Package name. * @return the header to be added to the content tree */ public abstract Content getPackageHeader(String heading); /** * Get the header for the package content. * * @return a content tree for the package content header */ public abstract Content getContentHeader(); /** * Get the header for the package summary. * * @return a content tree with the package summary header */ public abstract Content getSummaryHeader(); /** * Adds the table of classes to the documentation tree. * * @param classes the array of classes to document. * @param label the label for this table. * @param tableSummary the summary string for the table * @param tableHeader array of table headers * @param summaryContentTree the content tree to which the summaries will be added */ public abstract void addClassesSummary(ClassDoc[] classes, String label, String tableSummary, String[] tableHeader, Content summaryContentTree); /** * Adds the package description from the "packages.html" file to the documentation * tree. * * @param packageContentTree the content tree to which the package description * will be added */ public abstract void addPackageDescription(Content packageContentTree); /** * Adds the tag information from the "packages.html" file to the documentation * tree. * * @param packageContentTree the content tree to which the package tags will * be added */ public abstract void addPackageTags(Content packageContentTree); /** * Adds the footer to the documentation tree. * * @param contentTree the tree to which the footer will be added */ public abstract void addPackageFooter(Content contentTree); /** * Print the package summary document. * * @param contentTree the content tree that will be printed */ public abstract void printDocument(Content contentTree) throws IOException; /** * Close the writer. */ public abstract void close() throws IOException; } ././@LongLink0000000000000000000000000000017100000000000011214 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/ProfilePackageSummaryWriter.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/ProfilePacka0000644000000000000000000000754112214026367032200 0ustar 00000000000000/* * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.internal.toolkit; import java.io.*; import com.sun.javadoc.*; /** * The interface for writing profile package summary output. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Bhavesh Patel */ public interface ProfilePackageSummaryWriter { /** * Get the header for the summary. * * @param heading Package name. * @return the header to be added to the content tree */ public abstract Content getPackageHeader(String heading); /** * Get the header for the content. * * @return a content tree for the content header */ public abstract Content getContentHeader(); /** * Get the header for the package summary. * * @return a content tree with the package summary header */ public abstract Content getSummaryHeader(); /** * Adds the table of classes to the documentation tree. * * @param classes the array of classes to document. * @param label the label for this table. * @param tableSummary the summary string for the table * @param tableHeader array of table headers * @param summaryContentTree the content tree to which the summaries will be added */ public abstract void addClassesSummary(ClassDoc[] classes, String label, String tableSummary, String[] tableHeader, Content summaryContentTree); /** * Adds the package description from the "packages.html" file to the documentation * tree. * * @param packageContentTree the content tree to which the package description * will be added */ public abstract void addPackageDescription(Content packageContentTree); /** * Adds the tag information from the "packages.html" file to the documentation * tree. * * @param packageContentTree the content tree to which the package tags will * be added */ public abstract void addPackageTags(Content packageContentTree); /** * Adds the footer to the documentation tree. * * @param contentTree the tree to which the footer will be added */ public abstract void addPackageFooter(Content contentTree); /** * Print the package summary document. * * @param contentTree the content tree that will be printed */ public abstract void printDocument(Content contentTree) throws IOException; /** * Close the writer. */ public abstract void close() throws IOException; } ././@LongLink0000000000000000000000000000016200000000000011214 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/ProfileSummaryWriter.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/ProfileSumma0000644000000000000000000000760212214026367032241 0ustar 00000000000000/* * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.internal.toolkit; import java.io.*; import com.sun.javadoc.*; /** * The interface for writing profile summary output. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Bhavesh Patel */ public interface ProfileSummaryWriter { /** * Get the header for the summary. * * @param heading profile name. * @return the header to be added to the content tree */ public abstract Content getProfileHeader(String heading); /** * Get the header for the profile content. * * @return a content tree for the profile content header */ public abstract Content getContentHeader(); /** * Get the header for the summary header. * * @return a content tree with the summary header */ public abstract Content getSummaryHeader(); /** * Get the header for the summary tree. * * @param summaryContentTree the content tree. * @return a content tree with the summary tree */ public abstract Content getSummaryTree(Content summaryContentTree); /** * Get the header for the package summary header. * * @return a content tree with the package summary header */ public abstract Content getPackageSummaryHeader(PackageDoc pkg); /** * Get the header for the package summary tree. * * @return a content tree with the package summary */ public abstract Content getPackageSummaryTree(Content packageSummaryContentTree); /** * Adds the table of classes to the documentation tree. * * @param classes the array of classes to document. * @param label the label for this table. * @param tableSummary the summary string for the table * @param tableHeader array of table headers * @param packageSummaryContentTree the content tree to which the summaries will be added */ public abstract void addClassesSummary(ClassDoc[] classes, String label, String tableSummary, String[] tableHeader, Content packageSummaryContentTree); /** * Adds the footer to the documentation tree. * * @param contentTree the tree to which the footer will be added */ public abstract void addProfileFooter(Content contentTree); /** * Print the profile summary document. * * @param contentTree the content tree that will be printed */ public abstract void printDocument(Content contentTree) throws IOException; /** * Close the writer. */ public abstract void close() throws IOException; } ././@LongLink0000000000000000000000000000015400000000000011215 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/PropertyWriter.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/PropertyWrit0000644000000000000000000001022112214026367032317 0ustar 00000000000000/* * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.internal.toolkit; import java.io.*; import com.sun.javadoc.*; /** * The interface for writing property output. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Jamie Ho * @author Bhavesh Patel (Modified) * @since 1.7 */ public interface PropertyWriter { /** * Get the property details tree header. * * @param classDoc the class being documented * @param memberDetailsTree the content tree representing member details * @return content tree for the property details header */ public Content getPropertyDetailsTreeHeader(ClassDoc classDoc, Content memberDetailsTree); /** * Get the property documentation tree header. * * @param property the property being documented * @param propertyDetailsTree the content tree representing property details * @return content tree for the property documentation header */ public Content getPropertyDocTreeHeader(MethodDoc property, Content propertyDetailsTree); /** * Get the signature for the given property. * * @param property the property being documented * @return content tree for the property signature */ public Content getSignature(MethodDoc property); /** * Add the deprecated output for the given property. * * @param property the property being documented * @param propertyDocTree content tree to which the deprecated information will be added */ public void addDeprecated(MethodDoc property, Content propertyDocTree); /** * Add the comments for the given property. * * @param property the property being documented * @param propertyDocTree the content tree to which the comments will be added */ public void addComments(MethodDoc property, Content propertyDocTree); /** * Add the tags for the given property. * * @param property the property being documented * @param propertyDocTree the content tree to which the tags will be added */ public void addTags(MethodDoc property, Content propertyDocTree); /** * Get the property details tree. * * @param memberDetailsTree the content tree representing member details * @return content tree for the property details */ public Content getPropertyDetails(Content memberDetailsTree); /** * Get the property documentation. * * @param propertyDocTree the content tree representing property documentation * @param isLastContent true if the content to be added is the last content * @return content tree for the property documentation */ public Content getPropertyDoc(Content propertyDocTree, boolean isLastContent); /** * Close the writer. */ public void close() throws IOException; } ././@LongLink0000000000000000000000000000016200000000000011214 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/SerializedFormWriter.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/SerializedFo0000644000000000000000000002432212214026367032214 0ustar 00000000000000/* * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.internal.toolkit; import java.io.*; import com.sun.javadoc.*; /** * The interface for writing serialized form output. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Jamie Ho * @since 1.5 */ public interface SerializedFormWriter { /** * Get the header. * * @param header the header to write. * @return the header content tree */ public Content getHeader(String header); /** * Get the serialized form summaries header. * * @return the serialized form summary header tree */ public Content getSerializedSummariesHeader(); /** * Get the package serialized form header. * * @return the package serialized form header tree */ public Content getPackageSerializedHeader(); /** * Get the given package header. * * @param packageName the package header to write * @return a content tree for the package header */ public Content getPackageHeader(String packageName); /** * Get the serialized class header. * * @return a content tree for the serialized class header */ public Content getClassSerializedHeader(); /** * Get the heading for the serializable class. * * @param classDoc the class being processed * @return a content tree for the class heading */ public Content getClassHeader(ClassDoc classDoc); /** * Get the serial UID info header. * * @return a content tree for the serial uid info header */ public Content getSerialUIDInfoHeader(); /** * Adds the serial UID info. * * @param header the header that will show up before the UID. * @param serialUID the serial UID to print. * @param serialUidTree the serial UID tree to which the content will be added. */ public void addSerialUIDInfo(String header, String serialUID, Content serialUidTree); /** * Get the class serialize content header. * * @return a content tree for the class serialize content header */ public Content getClassContentHeader(); /** * Return an instance of a SerialFieldWriter. * * @return an instance of a SerialFieldWriter. */ public SerialFieldWriter getSerialFieldWriter(ClassDoc classDoc); /** * Return an instance of a SerialMethodWriter. * * @return an instance of a SerialMethodWriter. */ public SerialMethodWriter getSerialMethodWriter(ClassDoc classDoc); /** * Close the writer. */ public abstract void close() throws IOException; /** * Get the serialized content. * * @param serializedTreeContent content for serialized data * @return a content tree for serialized information */ public Content getSerializedContent(Content serializedTreeContent); /** * Add the footer. * * @param serializedTree the serialized tree to be added */ public void addFooter(Content serializedTree); /** * Print the serialized form document. * * @param serializedTree the content tree that will be printed */ public abstract void printDocument(Content serializedTree) throws IOException; /** * Write the serialized form for a given field. */ public interface SerialFieldWriter { /** * Get the serializable field header. * * @return serialized fields header content tree */ public Content getSerializableFieldsHeader(); /** * Get the field content header. * * @param isLastContent true if this is the last content to be documented * @return fields header content tree */ public Content getFieldsContentHeader(boolean isLastContent); /** * Get the fields content. * * @param heading the heading to write. * @param contentTree content tree to which the heading will be added * @return serializable fields content tree */ public Content getSerializableFields(String heading, Content contentTree); /** * Adds the deprecated information for this member. * * @param field the field to document. * @param contentTree content tree to which the deprecated information will be added */ public void addMemberDeprecatedInfo(FieldDoc field, Content contentTree); /** * Adds the description text for this member. * * @param field the field to document. * @param contentTree content tree to which the member description will be added */ public void addMemberDescription(FieldDoc field, Content contentTree); /** * Adds the description text for this member represented by the tag. * * @param serialFieldTag the field to document (represented by tag). * @param contentTree content tree to which the member description will be added */ public void addMemberDescription(SerialFieldTag serialFieldTag, Content contentTree); /** * Adds the tag information for this member. * * @param field the field to document. * @param contentTree content tree to which the member tags will be added */ public void addMemberTags(FieldDoc field, Content contentTree); /** * Adds the member header. * * @param fieldType the type of the field. * @param fieldTypeStr the type of the field in string format. We will * print this out if we can't link to the type. * @param fieldDimensions the dimensions of the field. * @param fieldName the name of the field. * @param contentTree content tree to which the member header will be added */ public void addMemberHeader(ClassDoc fieldType, String fieldTypeStr, String fieldDimensions, String fieldName, Content contentTree); /** * Check to see if overview details should be printed. If * nocomment option set or if there is no text to be printed * for deprecation info, inline comment or tags, * do not print overview details. * * @param field the field to check overview details for. * @return true if overview details need to be printed */ public boolean shouldPrintOverview(FieldDoc field); } /** * Write the serialized form for a given field. */ public interface SerialMethodWriter { /** * Get the serializable method header. * * @return serializable methods content tree */ public Content getSerializableMethodsHeader(); /** * Get the method content header. * * @param isLastContent true if this is the last content to be documented * @return methods content tree */ public Content getMethodsContentHeader(boolean isLastContent); /** * Write the given heading. * * @param heading the heading to write * @param serializableMethodTree content tree which will be added * @return serializable methods content tree */ public Content getSerializableMethods(String heading, Content serializableMethodTree); /** * Write a warning that no serializable methods exist. * * @param msg the warning to print * @return no customization message tree */ public Content getNoCustomizationMsg(String msg); /** * Adds the header. * * @param member the member to write the header for * @param methodsContentTree content tree to which the header will be added */ public void addMemberHeader(MethodDoc member, Content methodsContentTree); /** * Adds the deprecated information for this member. * * @param member the member to write the deprecated information for * @param methodsContentTree content tree to which the deprecated * information will be added */ public void addDeprecatedMemberInfo(MethodDoc member, Content methodsContentTree); /** * Adds the description for this member. * * @param member the member to write the information for * @param methodsContentTree content tree to which the member * information will be added */ public void addMemberDescription(MethodDoc member, Content methodsContentTree); /** * Adds the tag information for this member. * * @param member the member to write the tags information for * @param methodsContentTree content tree to which the tags * information will be added */ public void addMemberTags(MethodDoc member, Content methodsContentTree); } } ././@LongLink0000000000000000000000000000015300000000000011214 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/WriterFactory.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/WriterFactor0000644000000000000000000002226712214026367032255 0ustar 00000000000000/* * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.internal.toolkit; import com.sun.javadoc.*; import com.sun.tools.javac.jvm.Profile; import com.sun.tools.doclets.internal.toolkit.util.*; /** * The interface for a factory creates writers. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Jamie Ho * @since 1.4 */ public interface WriterFactory { /** * Return the writer for the constant summary. * * @return the writer for the constant summary. Return null if this * writer is not supported by the doclet. */ public abstract ConstantsSummaryWriter getConstantsSummaryWriter() throws Exception; /** * Return the writer for the package summary. * * @param packageDoc the package being documented. * @param prevPkg the previous package that was documented. * @param nextPkg the next package being documented. * @return the writer for the package summary. Return null if this * writer is not supported by the doclet. */ public abstract PackageSummaryWriter getPackageSummaryWriter(PackageDoc packageDoc, PackageDoc prevPkg, PackageDoc nextPkg) throws Exception; /** * Return the writer for the profile summary. * * @param profile the profile being documented. * @param prevProfile the previous profile that was documented. * @param nextProfile the next profile being documented. * @return the writer for the profile summary. Return null if this * writer is not supported by the doclet. */ public abstract ProfileSummaryWriter getProfileSummaryWriter(Profile profile, Profile prevProfile, Profile nextProfile) throws Exception; /** * Return the writer for the profile package summary. * * @param packageDoc the profile package being documented. * @param prevPkg the previous profile package that was documented. * @param nextPkg the next profile package being documented. * @param profile the profile being documented. * @return the writer for the profile package summary. Return null if this * writer is not supported by the doclet. */ public abstract ProfilePackageSummaryWriter getProfilePackageSummaryWriter( PackageDoc packageDoc, PackageDoc prevPkg, PackageDoc nextPkg, Profile profile) throws Exception; /** * Return the writer for a class. * * @param classDoc the class being documented. * @param prevClass the previous class that was documented. * @param nextClass the next class being documented. * @param classTree the class tree. * @return the writer for the class. Return null if this * writer is not supported by the doclet. */ public abstract ClassWriter getClassWriter(ClassDoc classDoc, ClassDoc prevClass, ClassDoc nextClass, ClassTree classTree) throws Exception; /** * Return the writer for an annotation type. * * @param annotationType the type being documented. * @param prevType the previous type that was documented. * @param nextType the next type being documented. * @return the writer for the annotation type. Return null if this * writer is not supported by the doclet. */ public abstract AnnotationTypeWriter getAnnotationTypeWriter( AnnotationTypeDoc annotationType, Type prevType, Type nextType) throws Exception; /** * Return the method writer for a given class. * * @param classWriter the writer for the class being documented. * @return the method writer for the give class. Return null if this * writer is not supported by the doclet. */ public abstract MethodWriter getMethodWriter(ClassWriter classWriter) throws Exception; /** * Return the annotation type optional member writer for a given annotation * type. * * @param annotationTypeWriter the writer for the annotation type * being documented. * @return the member writer for the given annotation type. Return null if * this writer is not supported by the doclet. */ public abstract AnnotationTypeOptionalMemberWriter getAnnotationTypeOptionalMemberWriter( AnnotationTypeWriter annotationTypeWriter) throws Exception; /** * Return the annotation type required member writer for a given annotation type. * * @param annotationTypeWriter the writer for the annotation type * being documented. * @return the member writer for the given annotation type. Return null if * this writer is not supported by the doclet. */ public abstract AnnotationTypeRequiredMemberWriter getAnnotationTypeRequiredMemberWriter( AnnotationTypeWriter annotationTypeWriter) throws Exception; /** * Return the enum constant writer for a given class. * * @param classWriter the writer for the class being documented. * @return the enum constant writer for the give class. Return null if this * writer is not supported by the doclet. */ public abstract EnumConstantWriter getEnumConstantWriter( ClassWriter classWriter) throws Exception; /** * Return the field writer for a given class. * * @param classWriter the writer for the class being documented. * @return the field writer for the give class. Return null if this * writer is not supported by the doclet. */ public abstract FieldWriter getFieldWriter(ClassWriter classWriter) throws Exception; /** * Return the property writer for a given class. * * @param classWriter the writer for the class being documented. * @return the property writer for the give class. Return null if this * writer is not supported by the doclet. */ public abstract PropertyWriter getPropertyWriter(ClassWriter classWriter) throws Exception; /** * Return the constructor writer for a given class. * * @param classWriter the writer for the class being documented. * @return the method writer for the give class. Return null if this * writer is not supported by the doclet. */ public abstract ConstructorWriter getConstructorWriter( ClassWriter classWriter) throws Exception; /** * Return the specified member summary writer for a given class. * * @param classWriter the writer for the class being documented. * @param memberType the {@link VisibleMemberMap} member type indicating * the type of member summary that should be returned. * @return the summary writer for the give class. Return null if this * writer is not supported by the doclet. * * @see VisibleMemberMap * @throws IllegalArgumentException if memberType is unknown. */ public abstract MemberSummaryWriter getMemberSummaryWriter( ClassWriter classWriter, int memberType) throws Exception; /** * Return the specified member summary writer for a given annotation type. * * @param annotationTypeWriter the writer for the annotation type being * documented. * @param memberType the {@link VisibleMemberMap} member type indicating * the type of member summary that should be returned. * @return the summary writer for the give class. Return null if this * writer is not supported by the doclet. * * @see VisibleMemberMap * @throws IllegalArgumentException if memberType is unknown. */ public abstract MemberSummaryWriter getMemberSummaryWriter( AnnotationTypeWriter annotationTypeWriter, int memberType) throws Exception; /** * Return the writer for the serialized form. * * @return the writer for the serialized form. */ public SerializedFormWriter getSerializedFormWriter() throws Exception; } ././@LongLink0000000000000000000000000000016600000000000011220 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AbstractBuilder.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/Abs0000644000000000000000000001477612214026367032166 0ustar 00000000000000/* * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.internal.toolkit.builders; import java.io.*; import java.lang.reflect.*; import java.util.*; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.*; /** * The superclass for all builders. A builder is a class that provides * the structure and content of API documentation. A builder is completely * doclet independent which means that any doclet can use builders to * construct documentation, as long as it impelements the appropriate * writer interfaces. For example, if a doclet wanted to use * {@link ConstantsSummaryBuilder} to build a constant summary, all it has to * do is implement the ConstantsSummaryWriter interface and pass it to the * builder using a WriterFactory. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Jamie Ho * @since 1.5 */ public abstract class AbstractBuilder { public static class Context { /** * The configuration used in this run of the doclet. */ final Configuration configuration; /** * Keep track of which packages we have seen for * efficiency purposes. We don't want to copy the * doc files multiple times for a single package. */ final Set containingPackagesSeen; /** * Shared parser for the builder XML file */ final LayoutParser layoutParser; Context(Configuration configuration, Set containingPackagesSeen, LayoutParser layoutParser) { this.configuration = configuration; this.containingPackagesSeen = containingPackagesSeen; this.layoutParser = layoutParser; } } /** * The configuration used in this run of the doclet. */ protected final Configuration configuration; /** * Keep track of which packages we have seen for * efficiency purposes. We don't want to copy the * doc files multiple times for a single package. */ protected final Set containingPackagesSeen; protected final LayoutParser layoutParser; /** * True if we want to print debug output. */ protected static final boolean DEBUG = false; /** * Construct a Builder. * @param configuration the configuration used in this run * of the doclet. */ public AbstractBuilder(Context c) { this.configuration = c.configuration; this.containingPackagesSeen = c.containingPackagesSeen; this.layoutParser = c.layoutParser; } /** * Return the name of this builder. * * @return the name of the builder. */ public abstract String getName(); /** * Build the documentation. * * @throws IOException there was a problem writing the output. */ public abstract void build() throws IOException; /** * Build the documentation, as specified by the given XML element. * * @param node the XML element that specifies which component to document. * @param contentTree content tree to which the documentation will be added */ protected void build(XMLNode node, Content contentTree) { String component = node.name; try { invokeMethod("build" + component, new Class[]{XMLNode.class, Content.class}, new Object[]{node, contentTree}); } catch (NoSuchMethodException e) { e.printStackTrace(); configuration.root.printError("Unknown element: " + component); throw new DocletAbortException(); } catch (InvocationTargetException e) { e.getCause().printStackTrace(); } catch (Exception e) { e.printStackTrace(); configuration.root.printError("Exception " + e.getClass().getName() + " thrown while processing element: " + component); throw new DocletAbortException(); } } /** * Build the documentation, as specified by the children of the given XML element. * * @param node the XML element that specifies which components to document. * @param contentTree content tree to which the documentation will be added */ protected void buildChildren(XMLNode node, Content contentTree) { for (XMLNode child : node.children) build(child, contentTree); } /** * Given the name and parameters, invoke the method in the builder. This * method is required to invoke the appropriate build method as instructed * by the builder XML file. * * @param methodName the name of the method that we would like to invoke. * @param paramClasses the types for each parameter. * @param params the parameters of the method. */ protected void invokeMethod(String methodName, Class[] paramClasses, Object[] params) throws Exception { if (DEBUG) { configuration.root.printError("DEBUG: " + this.getClass().getName() + "." + methodName); } Method method = this.getClass().getMethod(methodName, paramClasses); method.invoke(this, params); } } ././@LongLink0000000000000000000000000000017400000000000011217 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AbstractMemberBuilder.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/Abs0000644000000000000000000000615212214026367032153 0ustar 00000000000000/* * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.internal.toolkit.builders; import java.util.Set; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.*; /** * The superclass for all member builders. Member builders are only executed * within Class Builders. They essentially build sub-components. For example, * method documentation is a sub-component of class documentation. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Jamie Ho * @since 1.5 */ public abstract class AbstractMemberBuilder extends AbstractBuilder { /** * Construct a SubBuilder. * @param configuration the configuration used in this run * of the doclet. */ public AbstractMemberBuilder(Context context) { super(context); } /** * This method is not supported by sub-builders. * * @throws DocletAbortException this method will always throw a * DocletAbortException because it is not supported. */ public void build() throws DocletAbortException { //You may not call the build method in a subbuilder. throw new DocletAbortException(); } /** * Build the sub component if there is anything to document. * * @param node the XML element that specifies which components to document. * @param contentTree content tree to which the documentation will be added */ @Override public void build(XMLNode node, Content contentTree) { if (hasMembersToDocument()) { super.build(node, contentTree); } } /** * Return true if this subbuilder has anything to document. * * @return true if this subbuilder has anything to document. */ public abstract boolean hasMembersToDocument(); } ././@LongLink0000000000000000000000000000017400000000000011217 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeBuilder.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/Ann0000644000000000000000000002361312214026367032163 0ustar 00000000000000/* * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.internal.toolkit.builders; import java.io.*; import java.util.*; import com.sun.javadoc.*; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.*; /** * Builds the summary for a given annotation type. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Jamie Ho * @author Bhavesh Patel (Modified) * @since 1.5 */ public class AnnotationTypeBuilder extends AbstractBuilder { /** * The root element of the annotation type XML is {@value}. */ public static final String ROOT = "AnnotationTypeDoc"; /** * The annotation type being documented. */ private final AnnotationTypeDoc annotationTypeDoc; /** * The doclet specific writer. */ private final AnnotationTypeWriter writer; /** * The content tree for the annotation documentation. */ private Content contentTree; /** * Construct a new ClassBuilder. * * @param context the build context. * @param annotationTypeDoc the class being documented. * @param writer the doclet specific writer. */ private AnnotationTypeBuilder(Context context, AnnotationTypeDoc annotationTypeDoc, AnnotationTypeWriter writer) { super(context); this.annotationTypeDoc = annotationTypeDoc; this.writer = writer; } /** * Construct a new ClassBuilder. * * @param context the build context. * @param annotationTypeDoc the class being documented. * @param writer the doclet specific writer. */ public static AnnotationTypeBuilder getInstance(Context context, AnnotationTypeDoc annotationTypeDoc, AnnotationTypeWriter writer) throws Exception { return new AnnotationTypeBuilder(context, annotationTypeDoc, writer); } /** * {@inheritDoc} */ public void build() throws IOException { build(layoutParser.parseXML(ROOT), contentTree); } /** * {@inheritDoc} */ public String getName() { return ROOT; } /** * Build the annotation type documentation. * * @param node the XML element that specifies which components to document * @param contentTree the content tree to which the documentation will be added */ public void buildAnnotationTypeDoc(XMLNode node, Content contentTree) throws Exception { contentTree = writer.getHeader(configuration.getText("doclet.AnnotationType") + " " + annotationTypeDoc.name()); Content annotationContentTree = writer.getAnnotationContentHeader(); buildChildren(node, annotationContentTree); contentTree.addContent(annotationContentTree); writer.addFooter(contentTree); writer.printDocument(contentTree); writer.close(); copyDocFiles(); } /** * Copy the doc files for the current ClassDoc if necessary. */ private void copyDocFiles() { PackageDoc containingPackage = annotationTypeDoc.containingPackage(); if((configuration.packages == null || Arrays.binarySearch(configuration.packages, containingPackage) < 0) && ! containingPackagesSeen.contains(containingPackage.name())){ //Only copy doc files dir if the containing package is not //documented AND if we have not documented a class from the same //package already. Otherwise, we are making duplicate copies. Util.copyDocFiles(configuration, containingPackage); containingPackagesSeen.add(containingPackage.name()); } } /** * Build the annotation information tree documentation. * * @param node the XML element that specifies which components to document * @param annotationContentTree the content tree to which the documentation will be added */ public void buildAnnotationTypeInfo(XMLNode node, Content annotationContentTree) { Content annotationInfoTree = writer.getAnnotationInfoTreeHeader(); buildChildren(node, annotationInfoTree); annotationContentTree.addContent(writer.getAnnotationInfo(annotationInfoTree)); } /** * If this annotation is deprecated, build the appropriate information. * * @param node the XML element that specifies which components to document * @param annotationInfoTree the content tree to which the documentation will be added */ public void buildDeprecationInfo (XMLNode node, Content annotationInfoTree) { writer.addAnnotationTypeDeprecationInfo(annotationInfoTree); } /** * Build the signature of the current annotation type. * * @param node the XML element that specifies which components to document * @param annotationInfoTree the content tree to which the documentation will be added */ public void buildAnnotationTypeSignature(XMLNode node, Content annotationInfoTree) { StringBuilder modifiers = new StringBuilder( annotationTypeDoc.modifiers() + " "); writer.addAnnotationTypeSignature(Util.replaceText( modifiers.toString(), "interface", "@interface"), annotationInfoTree); } /** * Build the annotation type description. * * @param node the XML element that specifies which components to document * @param annotationInfoTree the content tree to which the documentation will be added */ public void buildAnnotationTypeDescription(XMLNode node, Content annotationInfoTree) { writer.addAnnotationTypeDescription(annotationInfoTree); } /** * Build the tag information for the current annotation type. * * @param node the XML element that specifies which components to document * @param annotationInfoTree the content tree to which the documentation will be added */ public void buildAnnotationTypeTagInfo(XMLNode node, Content annotationInfoTree) { writer.addAnnotationTypeTagInfo(annotationInfoTree); } /** * Build the member summary contents of the page. * * @param node the XML element that specifies which components to document * @param annotationContentTree the content tree to which the documentation will be added */ public void buildMemberSummary(XMLNode node, Content annotationContentTree) throws Exception { Content memberSummaryTree = writer.getMemberTreeHeader(); configuration.getBuilderFactory(). getMemberSummaryBuilder(writer).buildChildren(node, memberSummaryTree); annotationContentTree.addContent(writer.getMemberSummaryTree(memberSummaryTree)); } /** * Build the member details contents of the page. * * @param node the XML element that specifies which components to document * @param annotationContentTree the content tree to which the documentation will be added */ public void buildAnnotationTypeMemberDetails(XMLNode node, Content annotationContentTree) { Content memberDetailsTree = writer.getMemberTreeHeader(); buildChildren(node, memberDetailsTree); if (memberDetailsTree.isValid()) { Content memberDetails = writer.getMemberTreeHeader(); writer.addAnnotationDetailsMarker(memberDetails); memberDetails.addContent(writer.getMemberTree(memberDetailsTree)); annotationContentTree.addContent(writer.getMemberDetailsTree(memberDetails)); } } /** * Build the annotation type optional member documentation. * * @param node the XML element that specifies which components to document * @param memberDetailsTree the content tree to which the documentation will be added */ public void buildAnnotationTypeOptionalMemberDetails(XMLNode node, Content memberDetailsTree) throws Exception { configuration.getBuilderFactory(). getAnnotationTypeOptionalMemberBuilder(writer).buildChildren(node, memberDetailsTree); } /** * Build the annotation type required member documentation. * * @param node the XML element that specifies which components to document * @param memberDetailsTree the content tree to which the documentation will be added */ public void buildAnnotationTypeRequiredMemberDetails(XMLNode node, Content memberDetailsTree) throws Exception { configuration.getBuilderFactory(). getAnnotationTypeRequiredMemberBuilder(writer).buildChildren(node, memberDetailsTree); } } ././@LongLink0000000000000000000000000000021200000000000011210 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeOptionalMemberBuilder.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/Ann0000644000000000000000000001000412214026367032151 0ustar 00000000000000/* * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.internal.toolkit.builders; import com.sun.javadoc.*; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.*; /** * Builds documentation for optional annotation type members. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Jamie Ho * @author Bhavesh Patel (Modified) * @since 1.5 */ public class AnnotationTypeOptionalMemberBuilder extends AnnotationTypeRequiredMemberBuilder { /** * Construct a new AnnotationTypeMemberBuilder. * * @param context the build context. * @param classDoc the class whose members are being documented. * @param writer the doclet specific writer. */ private AnnotationTypeOptionalMemberBuilder(Context context, ClassDoc classDoc, AnnotationTypeOptionalMemberWriter writer) { super(context, classDoc, writer, VisibleMemberMap.ANNOTATION_TYPE_MEMBER_OPTIONAL); } /** * Construct a new AnnotationTypeMemberBuilder. * * @param context the build context. * @param classDoc the class whose members are being documented. * @param writer the doclet specific writer. */ public static AnnotationTypeOptionalMemberBuilder getInstance( Context context, ClassDoc classDoc, AnnotationTypeOptionalMemberWriter writer) { return new AnnotationTypeOptionalMemberBuilder(context, classDoc, writer); } /** * {@inheritDoc} */ @Override public String getName() { return "AnnotationTypeOptionalMemberDetails"; } /** * Build the annotation type optional member documentation. * * @param node the XML element that specifies which components to document * @param memberDetailsTree the content tree to which the documentation will be added */ public void buildAnnotationTypeOptionalMember(XMLNode node, Content memberDetailsTree) { buildAnnotationTypeMember(node, memberDetailsTree); } /** * Build the default value for this optional member. * * @param node the XML element that specifies which components to document * @param annotationDocTree the content tree to which the documentation will be added */ public void buildDefaultValueInfo(XMLNode node, Content annotationDocTree) { ((AnnotationTypeOptionalMemberWriter) writer).addDefaultValueInfo( (MemberDoc) members.get(currentMemberIndex), annotationDocTree); } /** * {@inheritDoc} */ @Override public AnnotationTypeRequiredMemberWriter getWriter() { return writer; } } ././@LongLink0000000000000000000000000000021200000000000011210 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeRequiredMemberBuilder.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/Ann0000644000000000000000000002045612214026367032165 0ustar 00000000000000/* * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.internal.toolkit.builders; import java.util.*; import com.sun.javadoc.*; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.*; /** * Builds documentation for required annotation type members. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Jamie Ho * @author Bhavesh Patel (Modified) * @since 1.5 */ public class AnnotationTypeRequiredMemberBuilder extends AbstractMemberBuilder { /** * The annotation type whose members are being documented. */ protected ClassDoc classDoc; /** * The visible members for the given class. */ protected VisibleMemberMap visibleMemberMap; /** * The writer to output the member documentation. */ protected AnnotationTypeRequiredMemberWriter writer; /** * The list of members being documented. */ protected List members; /** * The index of the current member that is being documented at this point * in time. */ protected int currentMemberIndex; /** * Construct a new AnnotationTypeRequiredMemberBuilder. * * @param context the build context. * @param classDoc the class whose members are being documented. * @param writer the doclet specific writer. */ protected AnnotationTypeRequiredMemberBuilder(Context context, ClassDoc classDoc, AnnotationTypeRequiredMemberWriter writer, int memberType) { super(context); this.classDoc = classDoc; this.writer = writer; this.visibleMemberMap = new VisibleMemberMap(classDoc, memberType, configuration); this.members = new ArrayList( this.visibleMemberMap.getMembersFor(classDoc)); if (configuration.getMemberComparator() != null) { Collections.sort(this.members, configuration.getMemberComparator()); } } /** * Construct a new AnnotationTypeMemberBuilder. * * @param context the build context. * @param classDoc the class whose members are being documented. * @param writer the doclet specific writer. */ public static AnnotationTypeRequiredMemberBuilder getInstance( Context context, ClassDoc classDoc, AnnotationTypeRequiredMemberWriter writer) { return new AnnotationTypeRequiredMemberBuilder(context, classDoc, writer, VisibleMemberMap.ANNOTATION_TYPE_MEMBER_REQUIRED); } /** * {@inheritDoc} */ public String getName() { return "AnnotationTypeRequiredMemberDetails"; } /** * Returns a list of members that will be documented for the given class. * This information can be used for doclet specific documentation * generation. * * @param classDoc the {@link ClassDoc} we want to check. * @return a list of members that will be documented. */ public List members(ClassDoc classDoc) { return visibleMemberMap.getMembersFor(classDoc); } /** * Returns the visible member map for the members of this class. * * @return the visible member map for the members of this class. */ public VisibleMemberMap getVisibleMemberMap() { return visibleMemberMap; } /** * summaryOrder.size() */ public boolean hasMembersToDocument() { return members.size() > 0; } /** * Build the annotation type required member documentation. * * @param node the XML element that specifies which components to document * @param memberDetailsTree the content tree to which the documentation will be added */ public void buildAnnotationTypeRequiredMember(XMLNode node, Content memberDetailsTree) { buildAnnotationTypeMember(node, memberDetailsTree); } /** * Build the member documentation. * * @param node the XML element that specifies which components to document * @param memberDetailsTree the content tree to which the documentation will be added */ public void buildAnnotationTypeMember(XMLNode node, Content memberDetailsTree) { if (writer == null) { return; } int size = members.size(); if (size > 0) { writer.addAnnotationDetailsTreeHeader( classDoc, memberDetailsTree); for (currentMemberIndex = 0; currentMemberIndex < size; currentMemberIndex++) { Content annotationDocTree = writer.getAnnotationDocTreeHeader( (MemberDoc) members.get(currentMemberIndex), memberDetailsTree); buildChildren(node, annotationDocTree); memberDetailsTree.addContent(writer.getAnnotationDoc( annotationDocTree, (currentMemberIndex == size - 1))); } } } /** * Build the signature. * * @param node the XML element that specifies which components to document * @param annotationDocTree the content tree to which the documentation will be added */ public void buildSignature(XMLNode node, Content annotationDocTree) { annotationDocTree.addContent( writer.getSignature((MemberDoc) members.get(currentMemberIndex))); } /** * Build the deprecation information. * * @param node the XML element that specifies which components to document * @param annotationDocTree the content tree to which the documentation will be added */ public void buildDeprecationInfo(XMLNode node, Content annotationDocTree) { writer.addDeprecated((MemberDoc) members.get(currentMemberIndex), annotationDocTree); } /** * Build the comments for the member. Do nothing if * {@link Configuration#nocomment} is set to true. * * @param node the XML element that specifies which components to document * @param annotationDocTree the content tree to which the documentation will be added */ public void buildMemberComments(XMLNode node, Content annotationDocTree) { if(! configuration.nocomment){ writer.addComments((MemberDoc) members.get(currentMemberIndex), annotationDocTree); } } /** * Build the tag information. * * @param node the XML element that specifies which components to document * @param annotationDocTree the content tree to which the documentation will be added */ public void buildTagInfo(XMLNode node, Content annotationDocTree) { writer.addTags((MemberDoc) members.get(currentMemberIndex), annotationDocTree); } /** * Return the annotation type required member writer for this builder. * * @return the annotation type required member constant writer for this * builder. */ public AnnotationTypeRequiredMemberWriter getWriter() { return writer; } } ././@LongLink0000000000000000000000000000016500000000000011217 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/BuilderFactory.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/Bui0000644000000000000000000002533112214026367032165 0ustar 00000000000000/* * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.internal.toolkit.builders; import java.util.HashSet; import java.util.Set; import com.sun.javadoc.*; import com.sun.tools.javac.jvm.Profile; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.*; /** * The factory for constructing builders. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Jamie Ho * @since 1.4 */ public class BuilderFactory { /** * The current configuration of the doclet. */ private final Configuration configuration; /** * The factory to retrieve the required writers from. */ private final WriterFactory writerFactory; private final AbstractBuilder.Context context; /** * Construct a builder factory using the given configuration. * @param configuration the configuration for the current doclet * being executed. */ public BuilderFactory (Configuration configuration) { this.configuration = configuration; this.writerFactory = configuration.getWriterFactory(); Set containingPackagesSeen = new HashSet(); context = new AbstractBuilder.Context(configuration, containingPackagesSeen, LayoutParser.getInstance(configuration)); } /** * Return the builder that builds the constant summary. * @return the builder that builds the constant summary. */ public AbstractBuilder getConstantsSummaryBuider() throws Exception { return ConstantsSummaryBuilder.getInstance(context, writerFactory.getConstantsSummaryWriter()); } /** * Return the builder that builds the package summary. * * @param pkg the package being documented. * @param prevPkg the previous package being documented. * @param nextPkg the next package being documented. * @return the builder that builds the constant summary. */ public AbstractBuilder getPackageSummaryBuilder(PackageDoc pkg, PackageDoc prevPkg, PackageDoc nextPkg) throws Exception { return PackageSummaryBuilder.getInstance(context, pkg, writerFactory.getPackageSummaryWriter(pkg, prevPkg, nextPkg)); } /** * Return the builder that builds the profile summary. * * @param profile the profile being documented. * @param prevProfile the previous profile being documented. * @param nextProfile the next profile being documented. * @return the builder that builds the profile summary. */ public AbstractBuilder getProfileSummaryBuilder(Profile profile, Profile prevProfile, Profile nextProfile) throws Exception { return ProfileSummaryBuilder.getInstance(context, profile, writerFactory.getProfileSummaryWriter(profile, prevProfile, nextProfile)); } /** * Return the builder that builds the profile package summary. * * @param pkg the profile package being documented. * @param prevPkg the previous profile package being documented. * @param nextPkg the next profile package being documented. * @param profile the profile being documented. * @return the builder that builds the profile package summary. */ public AbstractBuilder getProfilePackageSummaryBuilder(PackageDoc pkg, PackageDoc prevPkg, PackageDoc nextPkg, Profile profile) throws Exception { return ProfilePackageSummaryBuilder.getInstance(context, pkg, writerFactory.getProfilePackageSummaryWriter(pkg, prevPkg, nextPkg, profile), profile); } /** * Return the builder for the class. * * @param classDoc the class being documented. * @param prevClass the previous class that was documented. * @param nextClass the next class being documented. * @param classTree the class tree. * @return the writer for the class. Return null if this * writer is not supported by the doclet. */ public AbstractBuilder getClassBuilder(ClassDoc classDoc, ClassDoc prevClass, ClassDoc nextClass, ClassTree classTree) throws Exception { return ClassBuilder.getInstance(context, classDoc, writerFactory.getClassWriter(classDoc, prevClass, nextClass, classTree)); } /** * Return the builder for the annotation type. * * @param annotationType the annotation type being documented. * @param prevType the previous type that was documented. * @param nextType the next type being documented. * @return the writer for the annotation type. Return null if this * writer is not supported by the doclet. */ public AbstractBuilder getAnnotationTypeBuilder( AnnotationTypeDoc annotationType, Type prevType, Type nextType) throws Exception { return AnnotationTypeBuilder.getInstance(context, annotationType, writerFactory.getAnnotationTypeWriter(annotationType, prevType, nextType)); } /** * Return an instance of the method builder for the given class. * * @return an instance of the method builder for the given class. */ public AbstractBuilder getMethodBuilder(ClassWriter classWriter) throws Exception { return MethodBuilder.getInstance(context, classWriter.getClassDoc(), writerFactory.getMethodWriter(classWriter)); } /** * Return an instance of the annotation type member builder for the given * class. * * @return an instance of the annotation type memebr builder for the given * annotation type. */ public AbstractBuilder getAnnotationTypeOptionalMemberBuilder( AnnotationTypeWriter annotationTypeWriter) throws Exception { return AnnotationTypeOptionalMemberBuilder.getInstance(context, annotationTypeWriter.getAnnotationTypeDoc(), writerFactory.getAnnotationTypeOptionalMemberWriter( annotationTypeWriter)); } /** * Return an instance of the annotation type member builder for the given * class. * * @return an instance of the annotation type memebr builder for the given * annotation type. */ public AbstractBuilder getAnnotationTypeRequiredMemberBuilder( AnnotationTypeWriter annotationTypeWriter) throws Exception { return AnnotationTypeRequiredMemberBuilder.getInstance(context, annotationTypeWriter.getAnnotationTypeDoc(), writerFactory.getAnnotationTypeRequiredMemberWriter( annotationTypeWriter)); } /** * Return an instance of the enum constants builder for the given class. * * @return an instance of the enum constants builder for the given class. */ public AbstractBuilder getEnumConstantsBuilder(ClassWriter classWriter) throws Exception { return EnumConstantBuilder.getInstance(context, classWriter.getClassDoc(), writerFactory.getEnumConstantWriter(classWriter)); } /** * Return an instance of the field builder for the given class. * * @return an instance of the field builder for the given class. */ public AbstractBuilder getFieldBuilder(ClassWriter classWriter) throws Exception { return FieldBuilder.getInstance(context, classWriter.getClassDoc(), writerFactory.getFieldWriter(classWriter)); } /** * Return an instance of the property builder for the given class. * * @return an instance of the field builder for the given class. */ public AbstractBuilder getPropertyBuilder(ClassWriter classWriter) throws Exception { final PropertyWriter propertyWriter = writerFactory.getPropertyWriter(classWriter); return PropertyBuilder.getInstance(context, classWriter.getClassDoc(), propertyWriter); } /** * Return an instance of the constructor builder for the given class. * * @return an instance of the constructor builder for the given class. */ public AbstractBuilder getConstructorBuilder(ClassWriter classWriter) throws Exception { return ConstructorBuilder.getInstance(context, classWriter.getClassDoc(), writerFactory.getConstructorWriter(classWriter)); } /** * Return an instance of the member summary builder for the given class. * * @return an instance of the member summary builder for the given class. */ public AbstractBuilder getMemberSummaryBuilder(ClassWriter classWriter) throws Exception { return MemberSummaryBuilder.getInstance(classWriter, context); } /** * Return an instance of the member summary builder for the given annotation * type. * * @return an instance of the member summary builder for the given * annotation type. */ public AbstractBuilder getMemberSummaryBuilder( AnnotationTypeWriter annotationTypeWriter) throws Exception { return MemberSummaryBuilder.getInstance(annotationTypeWriter, context); } /** * Return the builder that builds the serialized form. * * @return the builder that builds the serialized form. */ public AbstractBuilder getSerializedFormBuilder() throws Exception { return SerializedFormBuilder.getInstance(context); } } ././@LongLink0000000000000000000000000000016300000000000011215 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ClassBuilder.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/Cla0000644000000000000000000003621412214026367032147 0ustar 00000000000000/* * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.internal.toolkit.builders; import java.io.*; import java.util.*; import com.sun.javadoc.*; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.*; /** * Builds the summary for a given class. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Jamie Ho * @author Bhavesh Patel (Modified) * @since 1.5 */ public class ClassBuilder extends AbstractBuilder { /** * The root element of the class XML is {@value}. */ public static final String ROOT = "ClassDoc"; /** * The class being documented. */ private final ClassDoc classDoc; /** * The doclet specific writer. */ private final ClassWriter writer; /** * Keep track of whether or not this classdoc is an interface. */ private final boolean isInterface; /** * Keep track of whether or not this classdoc is an enum. */ private final boolean isEnum; /** * The content tree for the class documentation. */ private Content contentTree; /** * Construct a new ClassBuilder. * * @param context the build context * @param classDoc the class being documented. * @param writer the doclet specific writer. */ private ClassBuilder(Context context, ClassDoc classDoc, ClassWriter writer) { super(context); this.classDoc = classDoc; this.writer = writer; if (classDoc.isInterface()) { isInterface = true; isEnum = false; } else if (classDoc.isEnum()) { isInterface = false; isEnum = true; Util.setEnumDocumentation(configuration, classDoc); } else { isInterface = false; isEnum = false; } } /** * Construct a new ClassBuilder. * * @param context the build context * @param classDoc the class being documented. * @param writer the doclet specific writer. */ public static ClassBuilder getInstance(Context context, ClassDoc classDoc, ClassWriter writer) { return new ClassBuilder(context, classDoc, writer); } /** * {@inheritDoc} */ public void build() throws IOException { build(layoutParser.parseXML(ROOT), contentTree); } /** * {@inheritDoc} */ public String getName() { return ROOT; } /** * Handles the {@literal } tag. * * @param node the XML element that specifies which components to document * @param contentTree the content tree to which the documentation will be added */ public void buildClassDoc(XMLNode node, Content contentTree) throws Exception { String key; if (isInterface) { key = "doclet.Interface"; } else if (isEnum) { key = "doclet.Enum"; } else { key = "doclet.Class"; } contentTree = writer.getHeader(configuration.getText(key) + " " + classDoc.name()); Content classContentTree = writer.getClassContentHeader(); buildChildren(node, classContentTree); contentTree.addContent(classContentTree); writer.addFooter(contentTree); writer.printDocument(contentTree); writer.close(); copyDocFiles(); } /** * Build the class tree documentation. * * @param node the XML element that specifies which components to document * @param classContentTree the content tree to which the documentation will be added */ public void buildClassTree(XMLNode node, Content classContentTree) { writer.addClassTree(classContentTree); } /** * Build the class information tree documentation. * * @param node the XML element that specifies which components to document * @param classContentTree the content tree to which the documentation will be added */ public void buildClassInfo(XMLNode node, Content classContentTree) { Content classInfoTree = writer.getClassInfoTreeHeader(); buildChildren(node, classInfoTree); classContentTree.addContent(writer.getClassInfo(classInfoTree)); } /** * Build the typeparameters of this class. * * @param node the XML element that specifies which components to document * @param classInfoTree the content tree to which the documentation will be added */ public void buildTypeParamInfo(XMLNode node, Content classInfoTree) { writer.addTypeParamInfo(classInfoTree); } /** * If this is an interface, list all super interfaces. * * @param node the XML element that specifies which components to document * @param classInfoTree the content tree to which the documentation will be added */ public void buildSuperInterfacesInfo(XMLNode node, Content classInfoTree) { writer.addSuperInterfacesInfo(classInfoTree); } /** * If this is a class, list all interfaces implemented by this class. * * @param node the XML element that specifies which components to document * @param classInfoTree the content tree to which the documentation will be added */ public void buildImplementedInterfacesInfo(XMLNode node, Content classInfoTree) { writer.addImplementedInterfacesInfo(classInfoTree); } /** * List all the classes extend this one. * * @param node the XML element that specifies which components to document * @param classInfoTree the content tree to which the documentation will be added */ public void buildSubClassInfo(XMLNode node, Content classInfoTree) { writer.addSubClassInfo(classInfoTree); } /** * List all the interfaces that extend this one. * * @param node the XML element that specifies which components to document * @param classInfoTree the content tree to which the documentation will be added */ public void buildSubInterfacesInfo(XMLNode node, Content classInfoTree) { writer.addSubInterfacesInfo(classInfoTree); } /** * If this is an interface, list all classes that implement this interface. * * @param node the XML element that specifies which components to document * @param classInfoTree the content tree to which the documentation will be added */ public void buildInterfaceUsageInfo(XMLNode node, Content classInfoTree) { writer.addInterfaceUsageInfo(classInfoTree); } /** * If this is an functional interface, display appropriate message. * * @param node the XML element that specifies which components to document * @param classInfoTree the content tree to which the documentation will be added */ public void buildFunctionalInterfaceInfo(XMLNode node, Content classInfoTree) { writer.addFunctionalInterfaceInfo(classInfoTree); } /** * If this class is deprecated, build the appropriate information. * * @param node the XML element that specifies which components to document * @param classInfoTree the content tree to which the documentation will be added */ public void buildDeprecationInfo (XMLNode node, Content classInfoTree) { writer.addClassDeprecationInfo(classInfoTree); } /** * If this is an inner class or interface, list the enclosing class or interface. * * @param node the XML element that specifies which components to document * @param classInfoTree the content tree to which the documentation will be added */ public void buildNestedClassInfo (XMLNode node, Content classInfoTree) { writer.addNestedClassInfo(classInfoTree); } /** * Copy the doc files for the current ClassDoc if necessary. */ private void copyDocFiles() { PackageDoc containingPackage = classDoc.containingPackage(); if((configuration.packages == null || Arrays.binarySearch(configuration.packages, containingPackage) < 0) && ! containingPackagesSeen.contains(containingPackage.name())){ //Only copy doc files dir if the containing package is not //documented AND if we have not documented a class from the same //package already. Otherwise, we are making duplicate copies. Util.copyDocFiles(configuration, containingPackage); containingPackagesSeen.add(containingPackage.name()); } } /** * Build the signature of the current class. * * @param node the XML element that specifies which components to document * @param classInfoTree the content tree to which the documentation will be added */ public void buildClassSignature(XMLNode node, Content classInfoTree) { StringBuilder modifiers = new StringBuilder(classDoc.modifiers()); modifiers.append(modifiers.length() == 0 ? "" : " "); if (isEnum) { modifiers.append("enum "); int index; if ((index = modifiers.indexOf("abstract")) >= 0) { modifiers.delete(index, index + "abstract".length()); modifiers = new StringBuilder( Util.replaceText(modifiers.toString(), " ", " ")); } if ((index = modifiers.indexOf("final")) >= 0) { modifiers.delete(index, index + "final".length()); modifiers = new StringBuilder( Util.replaceText(modifiers.toString(), " ", " ")); } //} else if (classDoc.isAnnotationType()) { //modifiers.append("@interface "); } else if (! isInterface) { modifiers.append("class "); } writer.addClassSignature(modifiers.toString(), classInfoTree); } /** * Build the class description. * * @param node the XML element that specifies which components to document * @param classInfoTree the content tree to which the documentation will be added */ public void buildClassDescription(XMLNode node, Content classInfoTree) { writer.addClassDescription(classInfoTree); } /** * Build the tag information for the current class. * * @param node the XML element that specifies which components to document * @param classInfoTree the content tree to which the documentation will be added */ public void buildClassTagInfo(XMLNode node, Content classInfoTree) { writer.addClassTagInfo(classInfoTree); } /** * Build the member summary contents of the page. * * @param node the XML element that specifies which components to document * @param classContentTree the content tree to which the documentation will be added */ public void buildMemberSummary(XMLNode node, Content classContentTree) throws Exception { Content memberSummaryTree = writer.getMemberTreeHeader(); configuration.getBuilderFactory(). getMemberSummaryBuilder(writer).buildChildren(node, memberSummaryTree); classContentTree.addContent(writer.getMemberSummaryTree(memberSummaryTree)); } /** * Build the member details contents of the page. * * @param node the XML element that specifies which components to document * @param classContentTree the content tree to which the documentation will be added */ public void buildMemberDetails(XMLNode node, Content classContentTree) { Content memberDetailsTree = writer.getMemberTreeHeader(); buildChildren(node, memberDetailsTree); classContentTree.addContent(writer.getMemberDetailsTree(memberDetailsTree)); } /** * Build the enum constants documentation. * * @param node the XML element that specifies which components to document * @param memberDetailsTree the content tree to which the documentation will be added */ public void buildEnumConstantsDetails(XMLNode node, Content memberDetailsTree) throws Exception { configuration.getBuilderFactory(). getEnumConstantsBuilder(writer).buildChildren(node, memberDetailsTree); } /** * Build the field documentation. * * @param node the XML element that specifies which components to document * @param memberDetailsTree the content tree to which the documentation will be added */ public void buildFieldDetails(XMLNode node, Content memberDetailsTree) throws Exception { configuration.getBuilderFactory(). getFieldBuilder(writer).buildChildren(node, memberDetailsTree); } /** * Build the property documentation. * * @param elements the XML elements that specify how a field is documented. */ public void buildPropertyDetails(XMLNode node, Content memberDetailsTree) throws Exception { configuration.getBuilderFactory(). getPropertyBuilder(writer).buildChildren(node, memberDetailsTree); } /** * Build the constructor documentation. * * @param node the XML element that specifies which components to document * @param memberDetailsTree the content tree to which the documentation will be added */ public void buildConstructorDetails(XMLNode node, Content memberDetailsTree) throws Exception { configuration.getBuilderFactory(). getConstructorBuilder(writer).buildChildren(node, memberDetailsTree); } /** * Build the method documentation. * * @param node the XML element that specifies which components to document * @param memberDetailsTree the content tree to which the documentation will be added */ public void buildMethodDetails(XMLNode node, Content memberDetailsTree) throws Exception { configuration.getBuilderFactory(). getMethodBuilder(writer).buildChildren(node, memberDetailsTree); } } ././@LongLink0000000000000000000000000000017600000000000011221 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ConstantsSummaryBuilder.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/Con0000644000000000000000000003231612214026367032166 0ustar 00000000000000/* * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.internal.toolkit.builders; import java.io.*; import java.util.*; import com.sun.javadoc.*; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.*; /** * Builds the Constants Summary Page. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Jamie Ho * @author Bhavesh Patel (Modified) * @since 1.5 */ public class ConstantsSummaryBuilder extends AbstractBuilder { /** * The root element of the constant summary XML is {@value}. */ public static final String ROOT = "ConstantSummary"; /** * The maximum number of package directories shown in the constant * value index. */ public static final int MAX_CONSTANT_VALUE_INDEX_LENGTH = 2; /** * The writer used to write the results. */ protected final ConstantsSummaryWriter writer; /** * The set of ClassDocs that have constant fields. */ protected final Set classDocsWithConstFields; /** * The set of printed package headers. */ protected Set printedPackageHeaders; /** * The current package being documented. */ private PackageDoc currentPackage; /** * The current class being documented. */ private ClassDoc currentClass; /** * The content tree for the constant summary documentation. */ private Content contentTree; /** * Construct a new ConstantsSummaryBuilder. * * @param context the build context. * @param writer the writer for the summary. */ private ConstantsSummaryBuilder(Context context, ConstantsSummaryWriter writer) { super(context); this.writer = writer; this.classDocsWithConstFields = new HashSet(); } /** * Construct a ConstantsSummaryBuilder. * * @param context the build context. * @param writer the writer for the summary. */ public static ConstantsSummaryBuilder getInstance(Context context, ConstantsSummaryWriter writer) { return new ConstantsSummaryBuilder(context, writer); } /** * {@inheritDoc} */ public void build() throws IOException { if (writer == null) { //Doclet does not support this output. return; } build(layoutParser.parseXML(ROOT), contentTree); } /** * {@inheritDoc} */ public String getName() { return ROOT; } /** * Build the constant summary. * * @param node the XML element that specifies which components to document * @param contentTree the content tree to which the documentation will be added */ public void buildConstantSummary(XMLNode node, Content contentTree) throws Exception { contentTree = writer.getHeader(); buildChildren(node, contentTree); writer.addFooter(contentTree); writer.printDocument(contentTree); writer.close(); } /** * Build the list of packages. * * @param node the XML element that specifies which components to document * @param contentTree the content tree to which the content list will be added */ public void buildContents(XMLNode node, Content contentTree) { Content contentListTree = writer.getContentsHeader(); PackageDoc[] packages = configuration.packages; printedPackageHeaders = new HashSet(); for (int i = 0; i < packages.length; i++) { if (hasConstantField(packages[i]) && ! hasPrintedPackageIndex(packages[i].name())) { writer.addLinkToPackageContent(packages[i], parsePackageName(packages[i].name()), printedPackageHeaders, contentListTree); } } contentTree.addContent(writer.getContentsList(contentListTree)); } /** * Build the summary for each documented package. * * @param node the XML element that specifies which components to document * @param contentTree the tree to which the summaries will be added */ public void buildConstantSummaries(XMLNode node, Content contentTree) { PackageDoc[] packages = configuration.packages; printedPackageHeaders = new HashSet(); Content summariesTree = writer.getConstantSummaries(); for (int i = 0; i < packages.length; i++) { if (hasConstantField(packages[i])) { currentPackage = packages[i]; //Build the documentation for the current package. buildChildren(node, summariesTree); } } contentTree.addContent(summariesTree); } /** * Build the header for the given package. * * @param node the XML element that specifies which components to document * @param summariesTree the tree to which the package header will be added */ public void buildPackageHeader(XMLNode node, Content summariesTree) { String parsedPackageName = parsePackageName(currentPackage.name()); if (! printedPackageHeaders.contains(parsedPackageName)) { writer.addPackageName(currentPackage, parsePackageName(currentPackage.name()), summariesTree); printedPackageHeaders.add(parsedPackageName); } } /** * Build the summary for the current class. * * @param node the XML element that specifies which components to document * @param summariesTree the tree to which the class constant summary will be added */ public void buildClassConstantSummary(XMLNode node, Content summariesTree) { ClassDoc[] classes = currentPackage.name().length() > 0 ? currentPackage.allClasses() : configuration.classDocCatalog.allClasses( DocletConstants.DEFAULT_PACKAGE_NAME); Arrays.sort(classes); Content classConstantTree = writer.getClassConstantHeader(); for (int i = 0; i < classes.length; i++) { if (! classDocsWithConstFields.contains(classes[i]) || ! classes[i].isIncluded()) { continue; } currentClass = classes[i]; //Build the documentation for the current class. buildChildren(node, classConstantTree); } summariesTree.addContent(classConstantTree); } /** * Build the summary of constant members in the class. * * @param node the XML element that specifies which components to document * @param classConstantTree the tree to which the constant members table * will be added */ public void buildConstantMembers(XMLNode node, Content classConstantTree) { new ConstantFieldBuilder(currentClass).buildMembersSummary(node, classConstantTree); } /** * Return true if the given package has constant fields to document. * * @param pkg the package being checked. * @return true if the given package has constant fields to document. */ private boolean hasConstantField(PackageDoc pkg) { ClassDoc[] classes; if (pkg.name().length() > 0) { classes = pkg.allClasses(); } else { classes = configuration.classDocCatalog.allClasses( DocletConstants.DEFAULT_PACKAGE_NAME); } boolean found = false; for (int j = 0; j < classes.length; j++){ if (classes[j].isIncluded() && hasConstantField(classes[j])) { found = true; } } return found; } /** * Return true if the given class has constant fields to document. * * @param classDoc the class being checked. * @return true if the given package has constant fields to document. */ private boolean hasConstantField (ClassDoc classDoc) { VisibleMemberMap visibleMemberMapFields = new VisibleMemberMap(classDoc, VisibleMemberMap.FIELDS, configuration); List fields = visibleMemberMapFields.getLeafClassMembers(configuration); for (Iterator iter = fields.iterator(); iter.hasNext(); ) { FieldDoc field = (FieldDoc) iter.next(); if (field.constantValueExpression() != null) { classDocsWithConstFields.add(classDoc); return true; } } return false; } /** * Return true if the given package name has been printed. Also * return true if the root of this package has been printed. * * @param pkgname the name of the package to check. */ private boolean hasPrintedPackageIndex(String pkgname) { String[] list = printedPackageHeaders.toArray(new String[] {}); for (int i = 0; i < list.length; i++) { if (pkgname.startsWith(list[i])) { return true; } } return false; } /** * Print the table of constants. * * @author Jamie Ho * @since 1.4 */ private class ConstantFieldBuilder { /** * The map used to get the visible variables. */ protected VisibleMemberMap visibleMemberMapFields = null; /** * The map used to get the visible variables. */ protected VisibleMemberMap visibleMemberMapEnumConst = null; /** * The classdoc that we are examining constants for. */ protected ClassDoc classdoc; /** * Construct a ConstantFieldSubWriter. * @param classdoc the classdoc that we are examining constants for. */ public ConstantFieldBuilder(ClassDoc classdoc) { this.classdoc = classdoc; visibleMemberMapFields = new VisibleMemberMap(classdoc, VisibleMemberMap.FIELDS, configuration); visibleMemberMapEnumConst = new VisibleMemberMap(classdoc, VisibleMemberMap.ENUM_CONSTANTS, configuration); } /** * Builds the table of constants for a given class. * * @param node the XML element that specifies which components to document * @param classConstantTree the tree to which the class constants table * will be added */ protected void buildMembersSummary(XMLNode node, Content classConstantTree) { List members = new ArrayList(members()); if (members.size() > 0) { Collections.sort(members); writer.addConstantMembers(classdoc, members, classConstantTree); } } /** * Return the list of visible constant fields for the given classdoc. * @return the list of visible constant fields for the given classdoc. */ protected List members() { List l = visibleMemberMapFields.getLeafClassMembers(configuration); l.addAll(visibleMemberMapEnumConst.getLeafClassMembers(configuration)); Iterator iter; if(l != null){ iter = l.iterator(); } else { return null; } List inclList = new LinkedList(); FieldDoc member; while(iter.hasNext()){ member = (FieldDoc)iter.next(); if(member.constantValue() != null){ inclList.add(member); } } return inclList; } } /** * Parse the package name. We only want to display package name up to * 2 levels. */ private String parsePackageName(String pkgname) { int index = -1; for (int j = 0; j < MAX_CONSTANT_VALUE_INDEX_LENGTH; j++) { index = pkgname.indexOf(".", index + 1); } if (index != -1) { pkgname = pkgname.substring(0, index); } return pkgname; } } ././@LongLink0000000000000000000000000000017100000000000011214 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ConstructorBuilder.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/Con0000644000000000000000000001772412214026367032174 0ustar 00000000000000/* * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.internal.toolkit.builders; import java.util.*; import com.sun.javadoc.*; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.*; /** * Builds documentation for a constructor. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Jamie Ho * @author Bhavesh Patel (Modified) * @since 1.5 */ public class ConstructorBuilder extends AbstractMemberBuilder { /** * The name of this builder. */ public static final String NAME = "ConstructorDetails"; /** * The index of the current field that is being documented at this point * in time. */ private int currentConstructorIndex; /** * The class whose constructors are being documented. */ private final ClassDoc classDoc; /** * The visible constructors for the given class. */ private final VisibleMemberMap visibleMemberMap; /** * The writer to output the constructor documentation. */ private final ConstructorWriter writer; /** * The constructors being documented. */ private final List constructors; /** * Construct a new ConstructorBuilder. * * @param context the build context. * @param classDoc the class whoses members are being documented. * @param writer the doclet specific writer. */ private ConstructorBuilder(Context context, ClassDoc classDoc, ConstructorWriter writer) { super(context); this.classDoc = classDoc; this.writer = writer; visibleMemberMap = new VisibleMemberMap( classDoc, VisibleMemberMap.CONSTRUCTORS, configuration); constructors = new ArrayList(visibleMemberMap.getMembersFor(classDoc)); for (int i = 0; i < constructors.size(); i++) { if (constructors.get(i).isProtected() || constructors.get(i).isPrivate()) { writer.setFoundNonPubConstructor(true); } } if (configuration.getMemberComparator() != null) { Collections.sort(constructors,configuration.getMemberComparator()); } } /** * Construct a new ConstructorBuilder. * * @param context the build context. * @param classDoc the class whoses members are being documented. * @param writer the doclet specific writer. */ public static ConstructorBuilder getInstance(Context context, ClassDoc classDoc, ConstructorWriter writer) { return new ConstructorBuilder(context, classDoc, writer); } /** * {@inheritDoc} */ public String getName() { return NAME; } /** * {@inheritDoc} */ public boolean hasMembersToDocument() { return constructors.size() > 0; } /** * Returns a list of constructors that will be documented for the given class. * This information can be used for doclet specific documentation * generation. * * @return a list of constructors that will be documented. */ public List members(ClassDoc classDoc) { return visibleMemberMap.getMembersFor(classDoc); } /** * Return the constructor writer for this builder. * * @return the constructor writer for this builder. */ public ConstructorWriter getWriter() { return writer; } /** * Build the constructor documentation. * * @param node the XML element that specifies which components to document * @param memberDetailsTree the content tree to which the documentation will be added */ public void buildConstructorDoc(XMLNode node, Content memberDetailsTree) { if (writer == null) { return; } int size = constructors.size(); if (size > 0) { Content constructorDetailsTree = writer.getConstructorDetailsTreeHeader( classDoc, memberDetailsTree); for (currentConstructorIndex = 0; currentConstructorIndex < size; currentConstructorIndex++) { Content constructorDocTree = writer.getConstructorDocTreeHeader( (ConstructorDoc) constructors.get(currentConstructorIndex), constructorDetailsTree); buildChildren(node, constructorDocTree); constructorDetailsTree.addContent(writer.getConstructorDoc( constructorDocTree, (currentConstructorIndex == size - 1))); } memberDetailsTree.addContent( writer.getConstructorDetails(constructorDetailsTree)); } } /** * Build the signature. * * @param node the XML element that specifies which components to document * @param constructorDocTree the content tree to which the documentation will be added */ public void buildSignature(XMLNode node, Content constructorDocTree) { constructorDocTree.addContent( writer.getSignature( (ConstructorDoc) constructors.get(currentConstructorIndex))); } /** * Build the deprecation information. * * @param node the XML element that specifies which components to document * @param constructorDocTree the content tree to which the documentation will be added */ public void buildDeprecationInfo(XMLNode node, Content constructorDocTree) { writer.addDeprecated( (ConstructorDoc) constructors.get(currentConstructorIndex), constructorDocTree); } /** * Build the comments for the constructor. Do nothing if * {@link Configuration#nocomment} is set to true. * * @param node the XML element that specifies which components to document * @param constructorDocTree the content tree to which the documentation will be added */ public void buildConstructorComments(XMLNode node, Content constructorDocTree) { if (!configuration.nocomment) { writer.addComments( (ConstructorDoc) constructors.get(currentConstructorIndex), constructorDocTree); } } /** * Build the tag information. * * @param node the XML element that specifies which components to document * @param constructorDocTree the content tree to which the documentation will be added */ public void buildTagInfo(XMLNode node, Content constructorDocTree) { writer.addTags((ConstructorDoc) constructors.get(currentConstructorIndex), constructorDocTree); } } ././@LongLink0000000000000000000000000000017200000000000011215 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/EnumConstantBuilder.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/Enu0000644000000000000000000002001012214026367032162 0ustar 00000000000000/* * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.internal.toolkit.builders; import java.util.*; import com.sun.javadoc.*; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.*; /** * Builds documentation for a enum constants. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Jamie Ho * @author Bhavesh Patel (Modified) * @since 1.5 */ public class EnumConstantBuilder extends AbstractMemberBuilder { /** * The class whose enum constants are being documented. */ private final ClassDoc classDoc; /** * The visible enum constantss for the given class. */ private final VisibleMemberMap visibleMemberMap; /** * The writer to output the enum constants documentation. */ private final EnumConstantWriter writer; /** * The list of enum constants being documented. */ private final List enumConstants; /** * The index of the current enum constant that is being documented at this point * in time. */ private int currentEnumConstantsIndex; /** * Construct a new EnumConstantsBuilder. * * @param context the build context. * @param classDoc the class whoses members are being documented. * @param writer the doclet specific writer. */ private EnumConstantBuilder(Context context, ClassDoc classDoc, EnumConstantWriter writer) { super(context); this.classDoc = classDoc; this.writer = writer; visibleMemberMap = new VisibleMemberMap( classDoc, VisibleMemberMap.ENUM_CONSTANTS, configuration); enumConstants = new ArrayList(visibleMemberMap.getMembersFor(classDoc)); if (configuration.getMemberComparator() != null) { Collections.sort(enumConstants, configuration.getMemberComparator()); } } /** * Construct a new EnumConstantsBuilder. * * @param context the build context. * @param classDoc the class whoses members are being documented. * @param writer the doclet specific writer. */ public static EnumConstantBuilder getInstance(Context context, ClassDoc classDoc, EnumConstantWriter writer) { return new EnumConstantBuilder(context, classDoc, writer); } /** * {@inheritDoc} */ public String getName() { return "EnumConstantDetails"; } /** * Returns a list of enum constants that will be documented for the given class. * This information can be used for doclet specific documentation * generation. * * @param classDoc the {@link ClassDoc} we want to check. * @return a list of enum constants that will be documented. */ public List members(ClassDoc classDoc) { return visibleMemberMap.getMembersFor(classDoc); } /** * Returns the visible member map for the enum constants of this class. * * @return the visible member map for the enum constants of this class. */ public VisibleMemberMap getVisibleMemberMap() { return visibleMemberMap; } /** * summaryOrder.size() */ public boolean hasMembersToDocument() { return enumConstants.size() > 0; } /** * Build the enum constant documentation. * * @param node the XML element that specifies which components to document * @param memberDetailsTree the content tree to which the documentation will be added */ public void buildEnumConstant(XMLNode node, Content memberDetailsTree) { if (writer == null) { return; } int size = enumConstants.size(); if (size > 0) { Content enumConstantsDetailsTree = writer.getEnumConstantsDetailsTreeHeader( classDoc, memberDetailsTree); for (currentEnumConstantsIndex = 0; currentEnumConstantsIndex < size; currentEnumConstantsIndex++) { Content enumConstantsTree = writer.getEnumConstantsTreeHeader( (FieldDoc) enumConstants.get(currentEnumConstantsIndex), enumConstantsDetailsTree); buildChildren(node, enumConstantsTree); enumConstantsDetailsTree.addContent(writer.getEnumConstants( enumConstantsTree, (currentEnumConstantsIndex == size - 1))); } memberDetailsTree.addContent( writer.getEnumConstantsDetails(enumConstantsDetailsTree)); } } /** * Build the signature. * * @param node the XML element that specifies which components to document * @param enumConstantsTree the content tree to which the documentation will be added */ public void buildSignature(XMLNode node, Content enumConstantsTree) { enumConstantsTree.addContent(writer.getSignature( (FieldDoc) enumConstants.get(currentEnumConstantsIndex))); } /** * Build the deprecation information. * * @param node the XML element that specifies which components to document * @param enumConstantsTree the content tree to which the documentation will be added */ public void buildDeprecationInfo(XMLNode node, Content enumConstantsTree) { writer.addDeprecated( (FieldDoc) enumConstants.get(currentEnumConstantsIndex), enumConstantsTree); } /** * Build the comments for the enum constant. Do nothing if * {@link Configuration#nocomment} is set to true. * * @param node the XML element that specifies which components to document * @param enumConstantsTree the content tree to which the documentation will be added */ public void buildEnumConstantComments(XMLNode node, Content enumConstantsTree) { if (!configuration.nocomment) { writer.addComments( (FieldDoc) enumConstants.get(currentEnumConstantsIndex), enumConstantsTree); } } /** * Build the tag information. * * @param node the XML element that specifies which components to document * @param enumConstantsTree the content tree to which the documentation will be added */ public void buildTagInfo(XMLNode node, Content enumConstantsTree) { writer.addTags( (FieldDoc) enumConstants.get(currentEnumConstantsIndex), enumConstantsTree); } /** * Return the enum constant writer for this builder. * * @return the enum constant writer for this builder. */ public EnumConstantWriter getWriter() { return writer; } } ././@LongLink0000000000000000000000000000016300000000000011215 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/FieldBuilder.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/Fie0000644000000000000000000001676212214026367032161 0ustar 00000000000000/* * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.internal.toolkit.builders; import java.util.*; import com.sun.javadoc.*; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.*; /** * Builds documentation for a field. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Jamie Ho * @author Bhavesh Patel (Modified) * @since 1.5 */ public class FieldBuilder extends AbstractMemberBuilder { /** * The class whose fields are being documented. */ private final ClassDoc classDoc; /** * The visible fields for the given class. */ private final VisibleMemberMap visibleMemberMap; /** * The writer to output the field documentation. */ private final FieldWriter writer; /** * The list of fields being documented. */ private final List fields; /** * The index of the current field that is being documented at this point * in time. */ private int currentFieldIndex; /** * Construct a new FieldBuilder. * * @param context the build context. * @param classDoc the class whoses members are being documented. * @param writer the doclet specific writer. */ private FieldBuilder(Context context, ClassDoc classDoc, FieldWriter writer) { super(context); this.classDoc = classDoc; this.writer = writer; visibleMemberMap = new VisibleMemberMap( classDoc, VisibleMemberMap.FIELDS, configuration); fields = new ArrayList(visibleMemberMap.getLeafClassMembers( configuration)); if (configuration.getMemberComparator() != null) { Collections.sort(fields, configuration.getMemberComparator()); } } /** * Construct a new FieldBuilder. * * @param context the build context. * @param classDoc the class whoses members are being documented. * @param writer the doclet specific writer. */ public static FieldBuilder getInstance(Context context, ClassDoc classDoc, FieldWriter writer) { return new FieldBuilder(context, classDoc, writer); } /** * {@inheritDoc} */ public String getName() { return "FieldDetails"; } /** * Returns a list of fields that will be documented for the given class. * This information can be used for doclet specific documentation * generation. * * @param classDoc the {@link ClassDoc} we want to check. * @return a list of fields that will be documented. */ public List members(ClassDoc classDoc) { return visibleMemberMap.getMembersFor(classDoc); } /** * Returns the visible member map for the fields of this class. * * @return the visible member map for the fields of this class. */ public VisibleMemberMap getVisibleMemberMap() { return visibleMemberMap; } /** * summaryOrder.size() */ public boolean hasMembersToDocument() { return fields.size() > 0; } /** * Build the field documentation. * * @param node the XML element that specifies which components to document * @param memberDetailsTree the content tree to which the documentation will be added */ public void buildFieldDoc(XMLNode node, Content memberDetailsTree) { if (writer == null) { return; } int size = fields.size(); if (size > 0) { Content fieldDetailsTree = writer.getFieldDetailsTreeHeader( classDoc, memberDetailsTree); for (currentFieldIndex = 0; currentFieldIndex < size; currentFieldIndex++) { Content fieldDocTree = writer.getFieldDocTreeHeader( (FieldDoc) fields.get(currentFieldIndex), fieldDetailsTree); buildChildren(node, fieldDocTree); fieldDetailsTree.addContent(writer.getFieldDoc( fieldDocTree, (currentFieldIndex == size - 1))); } memberDetailsTree.addContent( writer.getFieldDetails(fieldDetailsTree)); } } /** * Build the signature. * * @param node the XML element that specifies which components to document * @param fieldDocTree the content tree to which the documentation will be added */ public void buildSignature(XMLNode node, Content fieldDocTree) { fieldDocTree.addContent( writer.getSignature((FieldDoc) fields.get(currentFieldIndex))); } /** * Build the deprecation information. * * @param node the XML element that specifies which components to document * @param fieldDocTree the content tree to which the documentation will be added */ public void buildDeprecationInfo(XMLNode node, Content fieldDocTree) { writer.addDeprecated( (FieldDoc) fields.get(currentFieldIndex), fieldDocTree); } /** * Build the comments for the field. Do nothing if * {@link Configuration#nocomment} is set to true. * * @param node the XML element that specifies which components to document * @param fieldDocTree the content tree to which the documentation will be added */ public void buildFieldComments(XMLNode node, Content fieldDocTree) { if (!configuration.nocomment) { writer.addComments((FieldDoc) fields.get(currentFieldIndex), fieldDocTree); } } /** * Build the tag information. * * @param node the XML element that specifies which components to document * @param fieldDocTree the content tree to which the documentation will be added */ public void buildTagInfo(XMLNode node, Content fieldDocTree) { writer.addTags((FieldDoc) fields.get(currentFieldIndex), fieldDocTree); } /** * Return the field writer for this builder. * * @return the field writer for this builder. */ public FieldWriter getWriter() { return writer; } } ././@LongLink0000000000000000000000000000016300000000000011215 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/LayoutParser.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/Lay0000644000000000000000000001036212214026367032171 0ustar 00000000000000/* * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.internal.toolkit.builders; import java.io.*; import java.util.*; import javax.xml.parsers.*; import org.xml.sax.*; import org.xml.sax.helpers.DefaultHandler; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.*; /** * Parse the XML that specified the order of operation for the builders. This * Parser uses SAX parsing. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Jamie Ho * @since 1.5 * @see SAXParser */ public class LayoutParser extends DefaultHandler { /** * The map of XML elements that have been parsed. */ private Map xmlElementsMap; private XMLNode currentNode; private final Configuration configuration; private String currentRoot; private boolean isParsing; private LayoutParser(Configuration configuration) { xmlElementsMap = new HashMap(); this.configuration = configuration; } /** * Return an instance of the BuilderXML. * * @param configuration the current configuration of the doclet. * @return an instance of the BuilderXML. */ public static LayoutParser getInstance(Configuration configuration) { return new LayoutParser(configuration); } /** * Parse the XML specifying the layout of the documentation. * * @return the list of XML elements parsed. */ public XMLNode parseXML(String root) { if (xmlElementsMap.containsKey(root)) { return xmlElementsMap.get(root); } try { currentRoot = root; isParsing = false; SAXParserFactory factory = SAXParserFactory.newInstance(); SAXParser saxParser = factory.newSAXParser(); InputStream in = configuration.getBuilderXML(); saxParser.parse(in, this); return xmlElementsMap.get(root); } catch (Throwable t) { t.printStackTrace(); throw new DocletAbortException(); } } /** * {@inheritDoc} */ @Override public void startElement(String namespaceURI, String sName, String qName, Attributes attrs) throws SAXException { if (isParsing || qName.equals(currentRoot)) { isParsing = true; currentNode = new XMLNode(currentNode, qName); for (int i = 0; i < attrs.getLength(); i++) currentNode.attrs.put(attrs.getLocalName(i), attrs.getValue(i)); if (qName.equals(currentRoot)) xmlElementsMap.put(qName, currentNode); } } /** * {@inheritDoc} */ @Override public void endElement(String namespaceURI, String sName, String qName) throws SAXException { if (! isParsing) { return; } currentNode = currentNode.parent; isParsing = ! qName.equals(currentRoot); } } ././@LongLink0000000000000000000000000000017300000000000011216 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/MemberSummaryBuilder.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/Mem0000644000000000000000000005205412214026367032166 0ustar 00000000000000/* * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.internal.toolkit.builders; import java.util.*; import java.text.MessageFormat; import com.sun.javadoc.*; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.*; /** * Builds the member summary. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Jamie Ho * @author Bhavesh Patel (Modified) * @since 1.5 */ public class MemberSummaryBuilder extends AbstractMemberBuilder { /** * The XML root for this builder. */ public static final String NAME = "MemberSummary"; /** * The visible members for the given class. */ private final VisibleMemberMap[] visibleMemberMaps; /** * The member summary writers for the given class. */ private MemberSummaryWriter[] memberSummaryWriters; /** * The type being documented. */ private final ClassDoc classDoc; /** * Construct a new MemberSummaryBuilder. * * @param classWriter the writer for the class whose members are being * summarized. * @param context the build context. */ private MemberSummaryBuilder(Context context, ClassDoc classDoc) { super(context); this.classDoc = classDoc; visibleMemberMaps = new VisibleMemberMap[VisibleMemberMap.NUM_MEMBER_TYPES]; for (int i = 0; i < VisibleMemberMap.NUM_MEMBER_TYPES; i++) { visibleMemberMaps[i] = new VisibleMemberMap( classDoc, i, configuration); } } /** * Construct a new MemberSummaryBuilder. * * @param classWriter the writer for the class whose members are being * summarized. * @param context the build context. */ public static MemberSummaryBuilder getInstance( ClassWriter classWriter, Context context) throws Exception { MemberSummaryBuilder builder = new MemberSummaryBuilder(context, classWriter.getClassDoc()); builder.memberSummaryWriters = new MemberSummaryWriter[VisibleMemberMap.NUM_MEMBER_TYPES]; WriterFactory wf = context.configuration.getWriterFactory(); for (int i = 0; i < VisibleMemberMap.NUM_MEMBER_TYPES; i++) { builder.memberSummaryWriters[i] = builder.visibleMemberMaps[i].noVisibleMembers() ? null : wf.getMemberSummaryWriter(classWriter, i); } return builder; } /** * Construct a new MemberSummaryBuilder. * * @param annotationTypeWriter the writer for the class whose members are * being summarized. * @param configuration the current configuration of the doclet. */ public static MemberSummaryBuilder getInstance( AnnotationTypeWriter annotationTypeWriter, Context context) throws Exception { MemberSummaryBuilder builder = new MemberSummaryBuilder(context, annotationTypeWriter.getAnnotationTypeDoc()); builder.memberSummaryWriters = new MemberSummaryWriter[VisibleMemberMap.NUM_MEMBER_TYPES]; WriterFactory wf = context.configuration.getWriterFactory(); for (int i = 0; i < VisibleMemberMap.NUM_MEMBER_TYPES; i++) { builder.memberSummaryWriters[i] = builder.visibleMemberMaps[i].noVisibleMembers()? null : wf.getMemberSummaryWriter( annotationTypeWriter, i); } return builder; } /** * {@inheritDoc} */ public String getName() { return NAME; } /** * Return the specified visible member map. * * @param type the type of visible member map to return. * @return the specified visible member map. * @throws ArrayIndexOutOfBoundsException when the type is invalid. * @see VisibleMemberMap */ public VisibleMemberMap getVisibleMemberMap(int type) { return visibleMemberMaps[type]; } /** * Return the specified member summary writer. * * @param type the type of member summary writer to return. * @return the specified member summary writer. * @throws ArrayIndexOutOfBoundsException when the type is invalid. * @see VisibleMemberMap */ public MemberSummaryWriter getMemberSummaryWriter(int type) { return memberSummaryWriters[type]; } /** * Returns a list of methods that will be documented for the given class. * This information can be used for doclet specific documentation * generation. * * @param type the type of members to return. * @return a list of methods that will be documented. * @see VisibleMemberMap */ public List members(int type) { return visibleMemberMaps[type].getLeafClassMembers(configuration); } /** * Return true it there are any members to summarize. * * @return true if there are any members to summarize. */ public boolean hasMembersToDocument() { if (classDoc instanceof AnnotationTypeDoc) { return ((AnnotationTypeDoc) classDoc).elements().length > 0; } for (int i = 0; i < VisibleMemberMap.NUM_MEMBER_TYPES; i++) { VisibleMemberMap members = visibleMemberMaps[i]; if (!members.noVisibleMembers()) { return true; } } return false; } /** * Build the summary for the enum constants. * * @param node the XML element that specifies which components to document * @param memberSummaryTree the content tree to which the documentation will be added */ public void buildEnumConstantsSummary(XMLNode node, Content memberSummaryTree) { MemberSummaryWriter writer = memberSummaryWriters[VisibleMemberMap.ENUM_CONSTANTS]; VisibleMemberMap visibleMemberMap = visibleMemberMaps[VisibleMemberMap.ENUM_CONSTANTS]; addSummary(writer, visibleMemberMap, false, memberSummaryTree); } /** * Build the summary for the optional members. * * @param node the XML element that specifies which components to document * @param memberSummaryTree the content tree to which the documentation will be added */ public void buildAnnotationTypeOptionalMemberSummary(XMLNode node, Content memberSummaryTree) { MemberSummaryWriter writer = memberSummaryWriters[VisibleMemberMap.ANNOTATION_TYPE_MEMBER_OPTIONAL]; VisibleMemberMap visibleMemberMap = visibleMemberMaps[VisibleMemberMap.ANNOTATION_TYPE_MEMBER_OPTIONAL]; addSummary(writer, visibleMemberMap, false, memberSummaryTree); } /** * Build the summary for the optional members. * * @param node the XML element that specifies which components to document * @param memberSummaryTree the content tree to which the documentation will be added */ public void buildAnnotationTypeRequiredMemberSummary(XMLNode node, Content memberSummaryTree) { MemberSummaryWriter writer = memberSummaryWriters[VisibleMemberMap.ANNOTATION_TYPE_MEMBER_REQUIRED]; VisibleMemberMap visibleMemberMap = visibleMemberMaps[VisibleMemberMap.ANNOTATION_TYPE_MEMBER_REQUIRED]; addSummary(writer, visibleMemberMap, false, memberSummaryTree); } /** * Build the summary for the fields. * * @param node the XML element that specifies which components to document * @param memberSummaryTree the content tree to which the documentation will be added */ public void buildFieldsSummary(XMLNode node, Content memberSummaryTree) { MemberSummaryWriter writer = memberSummaryWriters[VisibleMemberMap.FIELDS]; VisibleMemberMap visibleMemberMap = visibleMemberMaps[VisibleMemberMap.FIELDS]; addSummary(writer, visibleMemberMap, true, memberSummaryTree); } /** * Build the summary for the fields. */ public void buildPropertiesSummary(XMLNode node, Content memberSummaryTree) { MemberSummaryWriter writer = memberSummaryWriters[VisibleMemberMap.PROPERTIES]; VisibleMemberMap visibleMemberMap = visibleMemberMaps[VisibleMemberMap.PROPERTIES]; addSummary(writer, visibleMemberMap, true, memberSummaryTree); } /** * Build the summary for the nested classes. * * @param node the XML element that specifies which components to document * @param memberSummaryTree the content tree to which the documentation will be added */ public void buildNestedClassesSummary(XMLNode node, Content memberSummaryTree) { MemberSummaryWriter writer = memberSummaryWriters[VisibleMemberMap.INNERCLASSES]; VisibleMemberMap visibleMemberMap = visibleMemberMaps[VisibleMemberMap.INNERCLASSES]; addSummary(writer, visibleMemberMap, true, memberSummaryTree); } /** * Build the method summary. * * @param node the XML element that specifies which components to document * @param memberSummaryTree the content tree to which the documentation will be added */ public void buildMethodsSummary(XMLNode node, Content memberSummaryTree) { MemberSummaryWriter writer = memberSummaryWriters[VisibleMemberMap.METHODS]; VisibleMemberMap visibleMemberMap = visibleMemberMaps[VisibleMemberMap.METHODS]; addSummary(writer, visibleMemberMap, true, memberSummaryTree); } /** * Build the constructor summary. * * @param node the XML element that specifies which components to document * @param memberSummaryTree the content tree to which the documentation will be added */ public void buildConstructorsSummary(XMLNode node, Content memberSummaryTree) { MemberSummaryWriter writer = memberSummaryWriters[VisibleMemberMap.CONSTRUCTORS]; VisibleMemberMap visibleMemberMap = visibleMemberMaps[VisibleMemberMap.CONSTRUCTORS]; addSummary(writer, visibleMemberMap, false, memberSummaryTree); } /** * Build the member summary for the given members. * * @param writer the summary writer to write the output. * @param visibleMemberMap the given members to summarize. * @param summaryTreeList list of content trees to which the documentation will be added */ private void buildSummary(MemberSummaryWriter writer, VisibleMemberMap visibleMemberMap, LinkedList summaryTreeList) { List members = new ArrayList(visibleMemberMap.getLeafClassMembers( configuration)); if (members.size() > 0) { Collections.sort(members); List tableContents = new LinkedList(); for (int i = 0; i < members.size(); i++) { ProgramElementDoc member = members.get(i); final ProgramElementDoc propertyDoc = visibleMemberMap.getPropertyMemberDoc(member); if (propertyDoc != null) { processProperty(visibleMemberMap, member, propertyDoc); } Tag[] firstSentenceTags = member.firstSentenceTags(); if (member instanceof MethodDoc && firstSentenceTags.length == 0) { //Inherit comments from overriden or implemented method if //necessary. DocFinder.Output inheritedDoc = DocFinder.search(new DocFinder.Input((MethodDoc) member)); if (inheritedDoc.holder != null && inheritedDoc.holder.firstSentenceTags().length > 0) { firstSentenceTags = inheritedDoc.holder.firstSentenceTags(); } } writer.addMemberSummary(classDoc, member, firstSentenceTags, tableContents, i); } summaryTreeList.add(writer.getSummaryTableTree(classDoc, tableContents)); } } /** * Process the property method, property setter and/or property getter * comment text so that it contains the documentation from * the property field. The method adds the leading sentence, * copied documentation including the defaultValue tag and * the see tags if the appropriate property getter and setter are * available. * * @param visibleMemberMap the members information. * @param member the member which is to be augmented. * @param propertyDoc the original property documentation. */ private void processProperty(VisibleMemberMap visibleMemberMap, ProgramElementDoc member, ProgramElementDoc propertyDoc) { StringBuilder commentTextBuilder = new StringBuilder(); final boolean isSetter = isSetter(member); final boolean isGetter = isGetter(member); if (isGetter || isSetter) { //add "[GS]ets the value of the property PROPERTY_NAME." if (isSetter) { commentTextBuilder.append( MessageFormat.format( configuration.getText("doclet.PropertySetterWithName"), Util.propertyNameFromMethodName(member.name()))); } if (isGetter) { commentTextBuilder.append( MessageFormat.format( configuration.getText("doclet.PropertyGetterWithName"), Util.propertyNameFromMethodName(member.name()))); } if (propertyDoc.commentText() != null && !propertyDoc.commentText().isEmpty()) { commentTextBuilder.append(" \n @propertyDescription "); } } commentTextBuilder.append(propertyDoc.commentText()); // copy certain tags List allTags = new LinkedList(); String[] tagNames = {"@defaultValue", "@since"}; for (String tagName: tagNames) { Tag[] tags = propertyDoc.tags(tagName); if (tags != null) { allTags.addAll(Arrays.asList(tags)); } } for (Tag tag: allTags) { commentTextBuilder.append("\n") .append(tag.name()) .append(" ") .append(tag.text()); } //add @see tags if (!isGetter && !isSetter) { MethodDoc getter = (MethodDoc) visibleMemberMap.getGetterForProperty(member); MethodDoc setter = (MethodDoc) visibleMemberMap.getSetterForProperty(member); if ((null != getter) && (commentTextBuilder.indexOf("@see #" + getter.name()) == -1)) { commentTextBuilder.append("\n @see #") .append(getter.name()) .append("() "); } if ((null != setter) && (commentTextBuilder.indexOf("@see #" + setter.name()) == -1)) { String typeName = setter.parameters()[0].typeName(); // Removal of type parameters and package information. typeName = typeName.split("<")[0]; if (typeName.contains(".")) { typeName = typeName.substring(typeName.lastIndexOf(".") + 1); } commentTextBuilder.append("\n @see #").append(setter.name()); if (setter.parameters()[0].type().asTypeVariable() == null) { commentTextBuilder.append("(").append(typeName).append(")"); } commentTextBuilder.append(" \n"); } } member.setRawCommentText(commentTextBuilder.toString()); } /** * Test whether the method is a getter. * @param ped property method documentation. Needs to be either property * method, property getter, or property setter. * @return true if the given documentation belongs to a getter. */ private boolean isGetter(ProgramElementDoc ped) { final String pedName = ped.name(); return pedName.startsWith("get") || pedName.startsWith("is"); } /** * Test whether the method is a setter. * @param ped property method documentation. Needs to be either property * method, property getter, or property setter. * @return true if the given documentation belongs to a setter. */ private boolean isSetter(ProgramElementDoc ped) { return ped.name().startsWith("set"); } /** * Build the inherited member summary for the given methods. * * @param writer the writer for this member summary. * @param visibleMemberMap the map for the members to document. * @param summaryTreeList list of content trees to which the documentation will be added */ private void buildInheritedSummary(MemberSummaryWriter writer, VisibleMemberMap visibleMemberMap, LinkedList summaryTreeList) { for (Iterator iter = visibleMemberMap.getVisibleClassesList().iterator(); iter.hasNext();) { ClassDoc inhclass = iter.next(); if (! (inhclass.isPublic() || Util.isLinkable(inhclass, configuration))) { continue; } if (inhclass == classDoc) { continue; } List inhmembers = visibleMemberMap.getMembersFor(inhclass); if (inhmembers.size() > 0) { Collections.sort(inhmembers); Content inheritedTree = writer.getInheritedSummaryHeader(inhclass); Content linksTree = writer.getInheritedSummaryLinksTree(); for (int j = 0; j < inhmembers.size(); ++j) { writer.addInheritedMemberSummary( inhclass.isPackagePrivate() && ! Util.isLinkable(inhclass, configuration) ? classDoc : inhclass, inhmembers.get(j), j == 0, j == inhmembers.size() - 1, linksTree); } inheritedTree.addContent(linksTree); summaryTreeList.add(writer.getMemberTree(inheritedTree)); } } } /** * Add the summary for the documentation. * * @param writer the writer for this member summary. * @param visibleMemberMap the map for the members to document. * @param showInheritedSummary true if inherited summary should be documented * @param memberSummaryTree the content tree to which the documentation will be added */ private void addSummary(MemberSummaryWriter writer, VisibleMemberMap visibleMemberMap, boolean showInheritedSummary, Content memberSummaryTree) { LinkedList summaryTreeList = new LinkedList(); buildSummary(writer, visibleMemberMap, summaryTreeList); if (showInheritedSummary) buildInheritedSummary(writer, visibleMemberMap, summaryTreeList); if (!summaryTreeList.isEmpty()) { Content memberTree = writer.getMemberSummaryHeader( classDoc, memberSummaryTree); for (int i = 0; i < summaryTreeList.size(); i++) { memberTree.addContent(summaryTreeList.get(i)); } memberSummaryTree.addContent(writer.getMemberTree(memberTree)); } } } ././@LongLink0000000000000000000000000000016400000000000011216 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/MethodBuilder.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/Met0000644000000000000000000002027412214026367032174 0ustar 00000000000000/* * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.internal.toolkit.builders; import java.util.*; import com.sun.javadoc.*; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.*; /** * Builds documentation for a method. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Jamie Ho * @author Bhavesh Patel (Modified) * @since 1.5 */ public class MethodBuilder extends AbstractMemberBuilder { /** * The index of the current field that is being documented at this point * in time. */ private int currentMethodIndex; /** * The class whose methods are being documented. */ private final ClassDoc classDoc; /** * The visible methods for the given class. */ private final VisibleMemberMap visibleMemberMap; /** * The writer to output the method documentation. */ private final MethodWriter writer; /** * The methods being documented. */ private List methods; /** * Construct a new MethodBuilder. * * @param context the build context. * @param classDoc the class whoses members are being documented. * @param writer the doclet specific writer. */ private MethodBuilder(Context context, ClassDoc classDoc, MethodWriter writer) { super(context); this.classDoc = classDoc; this.writer = writer; visibleMemberMap = new VisibleMemberMap( classDoc, VisibleMemberMap.METHODS, configuration); methods = new ArrayList(visibleMemberMap.getLeafClassMembers( configuration)); if (configuration.getMemberComparator() != null) { Collections.sort(methods, configuration.getMemberComparator()); } } /** * Construct a new MethodBuilder. * * @param context the build context. * @param classDoc the class whoses members are being documented. * @param writer the doclet specific writer. * * @return an instance of a MethodBuilder. */ public static MethodBuilder getInstance(Context context, ClassDoc classDoc, MethodWriter writer) { return new MethodBuilder(context, classDoc, writer); } /** * {@inheritDoc} */ public String getName() { return "MethodDetails"; } /** * Returns a list of methods that will be documented for the given class. * This information can be used for doclet specific documentation * generation. * * @param classDoc the {@link ClassDoc} we want to check. * @return a list of methods that will be documented. */ public List members(ClassDoc classDoc) { return visibleMemberMap.getMembersFor(classDoc); } /** * Returns the visible member map for the methods of this class. * * @return the visible member map for the methods of this class. */ public VisibleMemberMap getVisibleMemberMap() { return visibleMemberMap; } /** * {@inheritDoc} */ public boolean hasMembersToDocument() { return methods.size() > 0; } /** * Build the method documentation. * * @param node the XML element that specifies which components to document * @param memberDetailsTree the content tree to which the documentation will be added */ public void buildMethodDoc(XMLNode node, Content memberDetailsTree) { if (writer == null) { return; } int size = methods.size(); if (size > 0) { Content methodDetailsTree = writer.getMethodDetailsTreeHeader( classDoc, memberDetailsTree); for (currentMethodIndex = 0; currentMethodIndex < size; currentMethodIndex++) { Content methodDocTree = writer.getMethodDocTreeHeader( (MethodDoc) methods.get(currentMethodIndex), methodDetailsTree); buildChildren(node, methodDocTree); methodDetailsTree.addContent(writer.getMethodDoc( methodDocTree, (currentMethodIndex == size - 1))); } memberDetailsTree.addContent( writer.getMethodDetails(methodDetailsTree)); } } /** * Build the signature. * * @param node the XML element that specifies which components to document * @param methodDocTree the content tree to which the documentation will be added */ public void buildSignature(XMLNode node, Content methodDocTree) { methodDocTree.addContent( writer.getSignature((MethodDoc) methods.get(currentMethodIndex))); } /** * Build the deprecation information. * * @param node the XML element that specifies which components to document * @param methodDocTree the content tree to which the documentation will be added */ public void buildDeprecationInfo(XMLNode node, Content methodDocTree) { writer.addDeprecated( (MethodDoc) methods.get(currentMethodIndex), methodDocTree); } /** * Build the comments for the method. Do nothing if * {@link Configuration#nocomment} is set to true. * * @param node the XML element that specifies which components to document * @param methodDocTree the content tree to which the documentation will be added */ public void buildMethodComments(XMLNode node, Content methodDocTree) { if (!configuration.nocomment) { MethodDoc method = (MethodDoc) methods.get(currentMethodIndex); if (method.inlineTags().length == 0) { DocFinder.Output docs = DocFinder.search( new DocFinder.Input(method)); method = docs.inlineTags != null && docs.inlineTags.length > 0 ? (MethodDoc) docs.holder : method; } //NOTE: When we fix the bug where ClassDoc.interfaceTypes() does // not pass all implemented interfaces, holder will be the // interface type. For now, it is really the erasure. writer.addComments(method.containingClass(), method, methodDocTree); } } /** * Build the tag information. * * @param node the XML element that specifies which components to document * @param methodDocTree the content tree to which the documentation will be added */ public void buildTagInfo(XMLNode node, Content methodDocTree) { writer.addTags((MethodDoc) methods.get(currentMethodIndex), methodDocTree); } /** * Return the method writer for this builder. * * @return the method writer for this builder. */ public MethodWriter getWriter() { return writer; } } ././@LongLink0000000000000000000000000000017400000000000011217 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/PackageSummaryBuilder.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/Pac0000644000000000000000000003456412214026367032161 0ustar 00000000000000/* * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.internal.toolkit.builders; import java.io.*; import com.sun.javadoc.*; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.*; /** * Builds the summary for a given package. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Jamie Ho * @author Bhavesh Patel (Modified) * @since 1.5 */ public class PackageSummaryBuilder extends AbstractBuilder { /** * The root element of the package summary XML is {@value}. */ public static final String ROOT = "PackageDoc"; /** * The package being documented. */ private final PackageDoc packageDoc; /** * The doclet specific writer that will output the result. */ private final PackageSummaryWriter packageWriter; /** * The content that will be added to the package summary documentation tree. */ private Content contentTree; /** * Construct a new PackageSummaryBuilder. * * @param context the build context. * @param pkg the package being documented. * @param packageWriter the doclet specific writer that will output the * result. */ private PackageSummaryBuilder(Context context, PackageDoc pkg, PackageSummaryWriter packageWriter) { super(context); this.packageDoc = pkg; this.packageWriter = packageWriter; } /** * Construct a new PackageSummaryBuilder. * * @param context the build context. * @param pkg the package being documented. * @param packageWriter the doclet specific writer that will output the * result. * * @return an instance of a PackageSummaryBuilder. */ public static PackageSummaryBuilder getInstance(Context context, PackageDoc pkg, PackageSummaryWriter packageWriter) { return new PackageSummaryBuilder(context, pkg, packageWriter); } /** * Build the package summary. */ public void build() throws IOException { if (packageWriter == null) { //Doclet does not support this output. return; } build(layoutParser.parseXML(ROOT), contentTree); } /** * {@inheritDoc} */ public String getName() { return ROOT; } /** * Build the package documentation. * * @param node the XML element that specifies which components to document * @param contentTree the content tree to which the documentation will be added */ public void buildPackageDoc(XMLNode node, Content contentTree) throws Exception { contentTree = packageWriter.getPackageHeader(Util.getPackageName(packageDoc)); buildChildren(node, contentTree); packageWriter.addPackageFooter(contentTree); packageWriter.printDocument(contentTree); packageWriter.close(); Util.copyDocFiles(configuration, packageDoc); } /** * Build the content for the package doc. * * @param node the XML element that specifies which components to document * @param contentTree the content tree to which the package contents * will be added */ public void buildContent(XMLNode node, Content contentTree) { Content packageContentTree = packageWriter.getContentHeader(); buildChildren(node, packageContentTree); contentTree.addContent(packageContentTree); } /** * Build the package summary. * * @param node the XML element that specifies which components to document * @param packageContentTree the package content tree to which the summaries will * be added */ public void buildSummary(XMLNode node, Content packageContentTree) { Content summaryContentTree = packageWriter.getSummaryHeader(); buildChildren(node, summaryContentTree); packageContentTree.addContent(summaryContentTree); } /** * Build the summary for the interfaces in this package. * * @param node the XML element that specifies which components to document * @param summaryContentTree the summary tree to which the interface summary * will be added */ public void buildInterfaceSummary(XMLNode node, Content summaryContentTree) { String interfaceTableSummary = configuration.getText("doclet.Member_Table_Summary", configuration.getText("doclet.Interface_Summary"), configuration.getText("doclet.interfaces")); String[] interfaceTableHeader = new String[] { configuration.getText("doclet.Interface"), configuration.getText("doclet.Description") }; ClassDoc[] interfaces = packageDoc.isIncluded() ? packageDoc.interfaces() : configuration.classDocCatalog.interfaces( Util.getPackageName(packageDoc)); interfaces = Util.filterOutPrivateClasses(interfaces, configuration.javafx); if (interfaces.length > 0) { packageWriter.addClassesSummary( interfaces, configuration.getText("doclet.Interface_Summary"), interfaceTableSummary, interfaceTableHeader, summaryContentTree); } } /** * Build the summary for the classes in this package. * * @param node the XML element that specifies which components to document * @param summaryContentTree the summary tree to which the class summary will * be added */ public void buildClassSummary(XMLNode node, Content summaryContentTree) { String classTableSummary = configuration.getText("doclet.Member_Table_Summary", configuration.getText("doclet.Class_Summary"), configuration.getText("doclet.classes")); String[] classTableHeader = new String[] { configuration.getText("doclet.Class"), configuration.getText("doclet.Description") }; ClassDoc[] classes = packageDoc.isIncluded() ? packageDoc.ordinaryClasses() : configuration.classDocCatalog.ordinaryClasses( Util.getPackageName(packageDoc)); classes = Util.filterOutPrivateClasses(classes, configuration.javafx); if (classes.length > 0) { packageWriter.addClassesSummary( classes, configuration.getText("doclet.Class_Summary"), classTableSummary, classTableHeader, summaryContentTree); } } /** * Build the summary for the enums in this package. * * @param node the XML element that specifies which components to document * @param summaryContentTree the summary tree to which the enum summary will * be added */ public void buildEnumSummary(XMLNode node, Content summaryContentTree) { String enumTableSummary = configuration.getText("doclet.Member_Table_Summary", configuration.getText("doclet.Enum_Summary"), configuration.getText("doclet.enums")); String[] enumTableHeader = new String[] { configuration.getText("doclet.Enum"), configuration.getText("doclet.Description") }; ClassDoc[] enums = packageDoc.isIncluded() ? packageDoc.enums() : configuration.classDocCatalog.enums( Util.getPackageName(packageDoc)); enums = Util.filterOutPrivateClasses(enums, configuration.javafx); if (enums.length > 0) { packageWriter.addClassesSummary( enums, configuration.getText("doclet.Enum_Summary"), enumTableSummary, enumTableHeader, summaryContentTree); } } /** * Build the summary for the exceptions in this package. * * @param node the XML element that specifies which components to document * @param summaryContentTree the summary tree to which the exception summary will * be added */ public void buildExceptionSummary(XMLNode node, Content summaryContentTree) { String exceptionTableSummary = configuration.getText("doclet.Member_Table_Summary", configuration.getText("doclet.Exception_Summary"), configuration.getText("doclet.exceptions")); String[] exceptionTableHeader = new String[] { configuration.getText("doclet.Exception"), configuration.getText("doclet.Description") }; ClassDoc[] exceptions = packageDoc.isIncluded() ? packageDoc.exceptions() : configuration.classDocCatalog.exceptions( Util.getPackageName(packageDoc)); exceptions = Util.filterOutPrivateClasses(exceptions, configuration.javafx); if (exceptions.length > 0) { packageWriter.addClassesSummary( exceptions, configuration.getText("doclet.Exception_Summary"), exceptionTableSummary, exceptionTableHeader, summaryContentTree); } } /** * Build the summary for the errors in this package. * * @param node the XML element that specifies which components to document * @param summaryContentTree the summary tree to which the error summary will * be added */ public void buildErrorSummary(XMLNode node, Content summaryContentTree) { String errorTableSummary = configuration.getText("doclet.Member_Table_Summary", configuration.getText("doclet.Error_Summary"), configuration.getText("doclet.errors")); String[] errorTableHeader = new String[] { configuration.getText("doclet.Error"), configuration.getText("doclet.Description") }; ClassDoc[] errors = packageDoc.isIncluded() ? packageDoc.errors() : configuration.classDocCatalog.errors( Util.getPackageName(packageDoc)); errors = Util.filterOutPrivateClasses(errors, configuration.javafx); if (errors.length > 0) { packageWriter.addClassesSummary( errors, configuration.getText("doclet.Error_Summary"), errorTableSummary, errorTableHeader, summaryContentTree); } } /** * Build the summary for the annotation type in this package. * * @param node the XML element that specifies which components to document * @param summaryContentTree the summary tree to which the annotation type * summary will be added */ public void buildAnnotationTypeSummary(XMLNode node, Content summaryContentTree) { String annotationtypeTableSummary = configuration.getText("doclet.Member_Table_Summary", configuration.getText("doclet.Annotation_Types_Summary"), configuration.getText("doclet.annotationtypes")); String[] annotationtypeTableHeader = new String[] { configuration.getText("doclet.AnnotationType"), configuration.getText("doclet.Description") }; ClassDoc[] annotationTypes = packageDoc.isIncluded() ? packageDoc.annotationTypes() : configuration.classDocCatalog.annotationTypes( Util.getPackageName(packageDoc)); annotationTypes = Util.filterOutPrivateClasses(annotationTypes, configuration.javafx); if (annotationTypes.length > 0) { packageWriter.addClassesSummary( annotationTypes, configuration.getText("doclet.Annotation_Types_Summary"), annotationtypeTableSummary, annotationtypeTableHeader, summaryContentTree); } } /** * Build the description of the summary. * * @param node the XML element that specifies which components to document * @param packageContentTree the tree to which the package description will * be added */ public void buildPackageDescription(XMLNode node, Content packageContentTree) { if (configuration.nocomment) { return; } packageWriter.addPackageDescription(packageContentTree); } /** * Build the tags of the summary. * * @param node the XML element that specifies which components to document * @param packageContentTree the tree to which the package tags will be added */ public void buildPackageTags(XMLNode node, Content packageContentTree) { if (configuration.nocomment) { return; } packageWriter.addPackageTags(packageContentTree); } } ././@LongLink0000000000000000000000000000020300000000000011210 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ProfilePackageSummaryBuilder.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/Pro0000644000000000000000000003522312214026367032207 0ustar 00000000000000/* * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.internal.toolkit.builders; import java.io.*; import com.sun.javadoc.*; import com.sun.tools.javac.jvm.Profile; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.*; /** * Builds the summary for a given profile package. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Bhavesh Patel */ public class ProfilePackageSummaryBuilder extends AbstractBuilder { /** * The root element of the profile package summary XML is {@value}. */ public static final String ROOT = "PackageDoc"; /** * The profile package being documented. */ private final PackageDoc packageDoc; /** * The name of the profile being documented. */ private final String profileName; /** * The value of the profile being documented. */ private final int profileValue; /** * The doclet specific writer that will output the result. */ private final ProfilePackageSummaryWriter profilePackageWriter; /** * The content that will be added to the profile package summary documentation tree. */ private Content contentTree; /** * Construct a new ProfilePackageSummaryBuilder. * * @param context the build context. * @param pkg the profile package being documented. * @param profilePackageWriter the doclet specific writer that will output the * result. * @param profile the profile being documented. */ private ProfilePackageSummaryBuilder(Context context, PackageDoc pkg, ProfilePackageSummaryWriter profilePackageWriter, Profile profile) { super(context); this.packageDoc = pkg; this.profilePackageWriter = profilePackageWriter; this.profileName = profile.name; this.profileValue = profile.value; } /** * Construct a new ProfilePackageSummaryBuilder. * * @param context the build context. * @param pkg the profile package being documented. * @param profilePackageWriter the doclet specific writer that will output the * result. * @param profile the profile being documented. * * @return an instance of a ProfilePackageSummaryBuilder. */ public static ProfilePackageSummaryBuilder getInstance(Context context, PackageDoc pkg, ProfilePackageSummaryWriter profilePackageWriter, Profile profile) { return new ProfilePackageSummaryBuilder(context, pkg, profilePackageWriter, profile); } /** * Build the profile package summary. */ public void build() throws IOException { if (profilePackageWriter == null) { //Doclet does not support this output. return; } build(layoutParser.parseXML(ROOT), contentTree); } /** * {@inheritDoc} */ public String getName() { return ROOT; } /** * Build the profile package documentation. * * @param node the XML element that specifies which components to document * @param contentTree the content tree to which the documentation will be added */ public void buildPackageDoc(XMLNode node, Content contentTree) throws Exception { contentTree = profilePackageWriter.getPackageHeader( Util.getPackageName(packageDoc)); buildChildren(node, contentTree); profilePackageWriter.addPackageFooter(contentTree); profilePackageWriter.printDocument(contentTree); profilePackageWriter.close(); Util.copyDocFiles(configuration, packageDoc); } /** * Build the content for the profile package doc. * * @param node the XML element that specifies which components to document * @param contentTree the content tree to which the package contents * will be added */ public void buildContent(XMLNode node, Content contentTree) { Content packageContentTree = profilePackageWriter.getContentHeader(); buildChildren(node, packageContentTree); contentTree.addContent(packageContentTree); } /** * Build the profile package summary. * * @param node the XML element that specifies which components to document * @param packageContentTree the package content tree to which the summaries will * be added */ public void buildSummary(XMLNode node, Content packageContentTree) { Content summaryContentTree = profilePackageWriter.getSummaryHeader(); buildChildren(node, summaryContentTree); packageContentTree.addContent(summaryContentTree); } /** * Build the summary for the interfaces in this package. * * @param node the XML element that specifies which components to document * @param summaryContentTree the summary tree to which the interface summary * will be added */ public void buildInterfaceSummary(XMLNode node, Content summaryContentTree) { String interfaceTableSummary = configuration.getText("doclet.Member_Table_Summary", configuration.getText("doclet.Interface_Summary"), configuration.getText("doclet.interfaces")); String[] interfaceTableHeader = new String[] { configuration.getText("doclet.Interface"), configuration.getText("doclet.Description") }; ClassDoc[] interfaces = packageDoc.isIncluded() ? packageDoc.interfaces() : configuration.classDocCatalog.interfaces( Util.getPackageName(packageDoc)); if (interfaces.length > 0) { profilePackageWriter.addClassesSummary( interfaces, configuration.getText("doclet.Interface_Summary"), interfaceTableSummary, interfaceTableHeader, summaryContentTree); } } /** * Build the summary for the classes in this package. * * @param node the XML element that specifies which components to document * @param summaryContentTree the summary tree to which the class summary will * be added */ public void buildClassSummary(XMLNode node, Content summaryContentTree) { String classTableSummary = configuration.getText("doclet.Member_Table_Summary", configuration.getText("doclet.Class_Summary"), configuration.getText("doclet.classes")); String[] classTableHeader = new String[] { configuration.getText("doclet.Class"), configuration.getText("doclet.Description") }; ClassDoc[] classes = packageDoc.isIncluded() ? packageDoc.ordinaryClasses() : configuration.classDocCatalog.ordinaryClasses( Util.getPackageName(packageDoc)); if (classes.length > 0) { profilePackageWriter.addClassesSummary( classes, configuration.getText("doclet.Class_Summary"), classTableSummary, classTableHeader, summaryContentTree); } } /** * Build the summary for the enums in this package. * * @param node the XML element that specifies which components to document * @param summaryContentTree the summary tree to which the enum summary will * be added */ public void buildEnumSummary(XMLNode node, Content summaryContentTree) { String enumTableSummary = configuration.getText("doclet.Member_Table_Summary", configuration.getText("doclet.Enum_Summary"), configuration.getText("doclet.enums")); String[] enumTableHeader = new String[] { configuration.getText("doclet.Enum"), configuration.getText("doclet.Description") }; ClassDoc[] enums = packageDoc.isIncluded() ? packageDoc.enums() : configuration.classDocCatalog.enums( Util.getPackageName(packageDoc)); if (enums.length > 0) { profilePackageWriter.addClassesSummary( enums, configuration.getText("doclet.Enum_Summary"), enumTableSummary, enumTableHeader, summaryContentTree); } } /** * Build the summary for the exceptions in this package. * * @param node the XML element that specifies which components to document * @param summaryContentTree the summary tree to which the exception summary will * be added */ public void buildExceptionSummary(XMLNode node, Content summaryContentTree) { String exceptionTableSummary = configuration.getText("doclet.Member_Table_Summary", configuration.getText("doclet.Exception_Summary"), configuration.getText("doclet.exceptions")); String[] exceptionTableHeader = new String[] { configuration.getText("doclet.Exception"), configuration.getText("doclet.Description") }; ClassDoc[] exceptions = packageDoc.isIncluded() ? packageDoc.exceptions() : configuration.classDocCatalog.exceptions( Util.getPackageName(packageDoc)); if (exceptions.length > 0) { profilePackageWriter.addClassesSummary( exceptions, configuration.getText("doclet.Exception_Summary"), exceptionTableSummary, exceptionTableHeader, summaryContentTree); } } /** * Build the summary for the errors in this package. * * @param node the XML element that specifies which components to document * @param summaryContentTree the summary tree to which the error summary will * be added */ public void buildErrorSummary(XMLNode node, Content summaryContentTree) { String errorTableSummary = configuration.getText("doclet.Member_Table_Summary", configuration.getText("doclet.Error_Summary"), configuration.getText("doclet.errors")); String[] errorTableHeader = new String[] { configuration.getText("doclet.Error"), configuration.getText("doclet.Description") }; ClassDoc[] errors = packageDoc.isIncluded() ? packageDoc.errors() : configuration.classDocCatalog.errors( Util.getPackageName(packageDoc)); if (errors.length > 0) { profilePackageWriter.addClassesSummary( errors, configuration.getText("doclet.Error_Summary"), errorTableSummary, errorTableHeader, summaryContentTree); } } /** * Build the summary for the annotation type in this package. * * @param node the XML element that specifies which components to document * @param summaryContentTree the summary tree to which the annotation type * summary will be added */ public void buildAnnotationTypeSummary(XMLNode node, Content summaryContentTree) { String annotationtypeTableSummary = configuration.getText("doclet.Member_Table_Summary", configuration.getText("doclet.Annotation_Types_Summary"), configuration.getText("doclet.annotationtypes")); String[] annotationtypeTableHeader = new String[] { configuration.getText("doclet.AnnotationType"), configuration.getText("doclet.Description") }; ClassDoc[] annotationTypes = packageDoc.isIncluded() ? packageDoc.annotationTypes() : configuration.classDocCatalog.annotationTypes( Util.getPackageName(packageDoc)); if (annotationTypes.length > 0) { profilePackageWriter.addClassesSummary( annotationTypes, configuration.getText("doclet.Annotation_Types_Summary"), annotationtypeTableSummary, annotationtypeTableHeader, summaryContentTree); } } /** * Build the description of the summary. * * @param node the XML element that specifies which components to document * @param packageContentTree the tree to which the package description will * be added */ public void buildPackageDescription(XMLNode node, Content packageContentTree) { if (configuration.nocomment) { return; } profilePackageWriter.addPackageDescription(packageContentTree); } /** * Build the tags of the summary. * * @param node the XML element that specifies which components to document * @param packageContentTree the tree to which the package tags will be added */ public void buildPackageTags(XMLNode node, Content packageContentTree) { if (configuration.nocomment) { return; } profilePackageWriter.addPackageTags(packageContentTree); } } ././@LongLink0000000000000000000000000000017400000000000011217 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ProfileSummaryBuilder.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/Pro0000644000000000000000000003137112214026367032207 0ustar 00000000000000/* * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.internal.toolkit.builders; import java.io.*; import com.sun.javadoc.*; import com.sun.tools.javac.jvm.Profile; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.*; /** * Builds the summary for a given profile. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Bhavesh Patel */ public class ProfileSummaryBuilder extends AbstractBuilder { /** * The root element of the profile summary XML is {@value}. */ public static final String ROOT = "ProfileDoc"; /** * The profile being documented. */ private final Profile profile; /** * The doclet specific writer that will output the result. */ private final ProfileSummaryWriter profileWriter; /** * The content that will be added to the profile summary documentation tree. */ private Content contentTree; /** * The profile package being documented. */ private PackageDoc pkg; /** * Construct a new ProfileSummaryBuilder. * * @param context the build context. * @param profile the profile being documented. * @param profileWriter the doclet specific writer that will output the * result. */ private ProfileSummaryBuilder(Context context, Profile profile, ProfileSummaryWriter profileWriter) { super(context); this.profile = profile; this.profileWriter = profileWriter; } /** * Construct a new ProfileSummaryBuilder. * * @param context the build context. * @param profile the profile being documented. * @param profileWriter the doclet specific writer that will output the * result. * * @return an instance of a ProfileSummaryBuilder. */ public static ProfileSummaryBuilder getInstance(Context context, Profile profile, ProfileSummaryWriter profileWriter) { return new ProfileSummaryBuilder(context, profile, profileWriter); } /** * Build the profile summary. */ public void build() throws IOException { if (profileWriter == null) { //Doclet does not support this output. return; } build(layoutParser.parseXML(ROOT), contentTree); } /** * {@inheritDoc} */ public String getName() { return ROOT; } /** * Build the profile documentation. * * @param node the XML element that specifies which components to document * @param contentTree the content tree to which the documentation will be added */ public void buildProfileDoc(XMLNode node, Content contentTree) throws Exception { contentTree = profileWriter.getProfileHeader(profile.name); buildChildren(node, contentTree); profileWriter.addProfileFooter(contentTree); profileWriter.printDocument(contentTree); profileWriter.close(); Util.copyDocFiles(configuration, DocPaths.profileSummary(profile.name)); } /** * Build the content for the profile doc. * * @param node the XML element that specifies which components to document * @param contentTree the content tree to which the profile contents * will be added */ public void buildContent(XMLNode node, Content contentTree) { Content profileContentTree = profileWriter.getContentHeader(); buildChildren(node, profileContentTree); contentTree.addContent(profileContentTree); } /** * Build the profile summary. * * @param node the XML element that specifies which components to document * @param profileContentTree the profile content tree to which the summaries will * be added */ public void buildSummary(XMLNode node, Content profileContentTree) { Content summaryContentTree = profileWriter.getSummaryHeader(); buildChildren(node, summaryContentTree); profileContentTree.addContent(profileWriter.getSummaryTree(summaryContentTree)); } /** * Build the profile package summary. * * @param node the XML element that specifies which components to document * @param summaryContentTree the content tree to which the summaries will * be added */ public void buildPackageSummary(XMLNode node, Content summaryContentTree) { PackageDoc[] packages = configuration.profilePackages.get(profile.name); for (int i = 0; i < packages.length; i++) { this.pkg = packages[i]; Content packageSummaryContentTree = profileWriter.getPackageSummaryHeader(this.pkg); buildChildren(node, packageSummaryContentTree); summaryContentTree.addContent(profileWriter.getPackageSummaryTree( packageSummaryContentTree)); } } /** * Build the summary for the interfaces in the package. * * @param node the XML element that specifies which components to document * @param packageSummaryContentTree the tree to which the interface summary * will be added */ public void buildInterfaceSummary(XMLNode node, Content packageSummaryContentTree) { String interfaceTableSummary = configuration.getText("doclet.Member_Table_Summary", configuration.getText("doclet.Interface_Summary"), configuration.getText("doclet.interfaces")); String[] interfaceTableHeader = new String[] { configuration.getText("doclet.Interface"), configuration.getText("doclet.Description") }; ClassDoc[] interfaces = pkg.interfaces(); if (interfaces.length > 0) { profileWriter.addClassesSummary( interfaces, configuration.getText("doclet.Interface_Summary"), interfaceTableSummary, interfaceTableHeader, packageSummaryContentTree); } } /** * Build the summary for the classes in the package. * * @param node the XML element that specifies which components to document * @param packageSummaryContentTree the tree to which the class summary will * be added */ public void buildClassSummary(XMLNode node, Content packageSummaryContentTree) { String classTableSummary = configuration.getText("doclet.Member_Table_Summary", configuration.getText("doclet.Class_Summary"), configuration.getText("doclet.classes")); String[] classTableHeader = new String[] { configuration.getText("doclet.Class"), configuration.getText("doclet.Description") }; ClassDoc[] classes = pkg.ordinaryClasses(); if (classes.length > 0) { profileWriter.addClassesSummary( classes, configuration.getText("doclet.Class_Summary"), classTableSummary, classTableHeader, packageSummaryContentTree); } } /** * Build the summary for the enums in the package. * * @param node the XML element that specifies which components to document * @param packageSummaryContentTree the tree to which the enum summary will * be added */ public void buildEnumSummary(XMLNode node, Content packageSummaryContentTree) { String enumTableSummary = configuration.getText("doclet.Member_Table_Summary", configuration.getText("doclet.Enum_Summary"), configuration.getText("doclet.enums")); String[] enumTableHeader = new String[] { configuration.getText("doclet.Enum"), configuration.getText("doclet.Description") }; ClassDoc[] enums = pkg.enums(); if (enums.length > 0) { profileWriter.addClassesSummary( enums, configuration.getText("doclet.Enum_Summary"), enumTableSummary, enumTableHeader, packageSummaryContentTree); } } /** * Build the summary for the exceptions in the package. * * @param node the XML element that specifies which components to document * @param packageSummaryContentTree the tree to which the exception summary will * be added */ public void buildExceptionSummary(XMLNode node, Content packageSummaryContentTree) { String exceptionTableSummary = configuration.getText("doclet.Member_Table_Summary", configuration.getText("doclet.Exception_Summary"), configuration.getText("doclet.exceptions")); String[] exceptionTableHeader = new String[] { configuration.getText("doclet.Exception"), configuration.getText("doclet.Description") }; ClassDoc[] exceptions = pkg.exceptions(); if (exceptions.length > 0) { profileWriter.addClassesSummary( exceptions, configuration.getText("doclet.Exception_Summary"), exceptionTableSummary, exceptionTableHeader, packageSummaryContentTree); } } /** * Build the summary for the errors in the package. * * @param node the XML element that specifies which components to document * @param packageSummaryContentTree the tree to which the error summary will * be added */ public void buildErrorSummary(XMLNode node, Content packageSummaryContentTree) { String errorTableSummary = configuration.getText("doclet.Member_Table_Summary", configuration.getText("doclet.Error_Summary"), configuration.getText("doclet.errors")); String[] errorTableHeader = new String[] { configuration.getText("doclet.Error"), configuration.getText("doclet.Description") }; ClassDoc[] errors = pkg.errors(); if (errors.length > 0) { profileWriter.addClassesSummary( errors, configuration.getText("doclet.Error_Summary"), errorTableSummary, errorTableHeader, packageSummaryContentTree); } } /** * Build the summary for the annotation type in the package. * * @param node the XML element that specifies which components to document * @param packageSummaryContentTree the tree to which the annotation type * summary will be added */ public void buildAnnotationTypeSummary(XMLNode node, Content packageSummaryContentTree) { String annotationtypeTableSummary = configuration.getText("doclet.Member_Table_Summary", configuration.getText("doclet.Annotation_Types_Summary"), configuration.getText("doclet.annotationtypes")); String[] annotationtypeTableHeader = new String[] { configuration.getText("doclet.AnnotationType"), configuration.getText("doclet.Description") }; ClassDoc[] annotationTypes = pkg.annotationTypes(); if (annotationTypes.length > 0) { profileWriter.addClassesSummary( annotationTypes, configuration.getText("doclet.Annotation_Types_Summary"), annotationtypeTableSummary, annotationtypeTableHeader, packageSummaryContentTree); } } } ././@LongLink0000000000000000000000000000016600000000000011220 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/PropertyBuilder.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/Pro0000644000000000000000000001730212214026367032205 0ustar 00000000000000/* * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.internal.toolkit.builders; import java.util.*; import com.sun.tools.doclets.internal.toolkit.util.*; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.javadoc.*; /** * Builds documentation for a property. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Jamie Ho * @author Bhavesh Patel (Modified) * @since 1.7 */ public class PropertyBuilder extends AbstractMemberBuilder { /** * The class whose properties are being documented. */ private final ClassDoc classDoc; /** * The visible properties for the given class. */ private final VisibleMemberMap visibleMemberMap; /** * The writer to output the property documentation. */ private final PropertyWriter writer; /** * The list of properties being documented. */ private final List properties; /** * The index of the current property that is being documented at this point * in time. */ private int currentPropertyIndex; /** * Construct a new PropertyBuilder. * * @param context the build context. * @param classDoc the class whoses members are being documented. * @param writer the doclet specific writer. */ private PropertyBuilder(Context context, ClassDoc classDoc, PropertyWriter writer) { super(context); this.classDoc = classDoc; this.writer = writer; visibleMemberMap = new VisibleMemberMap( classDoc, VisibleMemberMap.PROPERTIES, configuration); properties = new ArrayList(visibleMemberMap.getMembersFor(classDoc)); if (configuration.getMemberComparator() != null) { Collections.sort(properties, configuration.getMemberComparator()); } } /** * Construct a new PropertyBuilder. * * @param context the build context. * @param classDoc the class whoses members are being documented. * @param writer the doclet specific writer. */ public static PropertyBuilder getInstance(Context context, ClassDoc classDoc, PropertyWriter writer) { return new PropertyBuilder(context, classDoc, writer); } /** * {@inheritDoc} */ public String getName() { return "PropertyDetails"; } /** * Returns a list of properties that will be documented for the given class. * This information can be used for doclet specific documentation * generation. * * @param classDoc the {@link ClassDoc} we want to check. * @return a list of properties that will be documented. */ public List members(ClassDoc classDoc) { return visibleMemberMap.getMembersFor(classDoc); } /** * Returns the visible member map for the properties of this class. * * @return the visible member map for the properties of this class. */ public VisibleMemberMap getVisibleMemberMap() { return visibleMemberMap; } /** * summaryOrder.size() */ public boolean hasMembersToDocument() { return properties.size() > 0; } /** * Build the property documentation. * * @param node the XML element that specifies which components to document * @param memberDetailsTree the content tree to which the documentation will be added */ public void buildPropertyDoc(XMLNode node, Content memberDetailsTree) { if (writer == null) { return; } int size = properties.size(); if (size > 0) { Content propertyDetailsTree = writer.getPropertyDetailsTreeHeader( classDoc, memberDetailsTree); for (currentPropertyIndex = 0; currentPropertyIndex < size; currentPropertyIndex++) { Content propertyDocTree = writer.getPropertyDocTreeHeader( (MethodDoc) properties.get(currentPropertyIndex), propertyDetailsTree); buildChildren(node, propertyDocTree); propertyDetailsTree.addContent(writer.getPropertyDoc( propertyDocTree, (currentPropertyIndex == size - 1))); } memberDetailsTree.addContent( writer.getPropertyDetails(propertyDetailsTree)); } } /** * Build the signature. * * @param node the XML element that specifies which components to document * @param propertyDocTree the content tree to which the documentation will be added */ public void buildSignature(XMLNode node, Content propertyDocTree) { propertyDocTree.addContent( writer.getSignature((MethodDoc) properties.get(currentPropertyIndex))); } /** * Build the deprecation information. * * @param node the XML element that specifies which components to document * @param propertyDocTree the content tree to which the documentation will be added */ public void buildDeprecationInfo(XMLNode node, Content propertyDocTree) { writer.addDeprecated( (MethodDoc) properties.get(currentPropertyIndex), propertyDocTree); } /** * Build the comments for the property. Do nothing if * {@link Configuration#nocomment} is set to true. * * @param node the XML element that specifies which components to document * @param propertyDocTree the content tree to which the documentation will be added */ public void buildPropertyComments(XMLNode node, Content propertyDocTree) { if (!configuration.nocomment) { writer.addComments((MethodDoc) properties.get(currentPropertyIndex), propertyDocTree); } } /** * Build the tag information. * * @param node the XML element that specifies which components to document * @param propertyDocTree the content tree to which the documentation will be added */ public void buildTagInfo(XMLNode node, Content propertyDocTree) { writer.addTags((MethodDoc) properties.get(currentPropertyIndex), propertyDocTree); } /** * Return the property writer for this builder. * * @return the property writer for this builder. */ public PropertyWriter getWriter() { return writer; } } ././@LongLink0000000000000000000000000000017400000000000011217 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/SerializedFormBuilder.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/Ser0000644000000000000000000005451612214026367032206 0ustar 00000000000000/* * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.internal.toolkit.builders; import java.io.*; import java.util.*; import com.sun.javadoc.*; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.*; /** * Builds the serialized form. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. * * @author Jamie Ho * @author Bhavesh Patel (Modified) * @since 1.5 */ public class SerializedFormBuilder extends AbstractBuilder { /** * The root element of the serialized form XML is {@value}. */ public static final String NAME = "SerializedForm"; /** * The writer for this builder. */ private SerializedFormWriter writer; /** * The writer for serializable fields. */ private SerializedFormWriter.SerialFieldWriter fieldWriter; /** * The writer for serializable method documentation. */ private SerializedFormWriter.SerialMethodWriter methodWriter; /** * The header for the serial version UID. Save the string * here instead of the properties file because we do not want * this string to be localized. */ private static final String SERIAL_VERSION_UID_HEADER = "serialVersionUID:"; /** * The current package being documented. */ private PackageDoc currentPackage; /** * The current class being documented. */ private ClassDoc currentClass; /** * The current member being documented. */ protected MemberDoc currentMember; /** * The content that will be added to the serialized form documentation tree. */ private Content contentTree; /** * Construct a new SerializedFormBuilder. * @param context the build context. */ private SerializedFormBuilder(Context context) { super(context); } /** * Construct a new SerializedFormBuilder. * @param context the build context. */ public static SerializedFormBuilder getInstance(Context context) { return new SerializedFormBuilder(context); } /** * Build the serialized form. */ public void build() throws IOException { if (! serialClassFoundToDocument(configuration.root.classes())) { //Nothing to document. return; } try { writer = configuration.getWriterFactory().getSerializedFormWriter(); if (writer == null) { //Doclet does not support this output. return; } } catch (Exception e) { throw new DocletAbortException(); } build(layoutParser.parseXML(NAME), contentTree); writer.close(); } /** * {@inheritDoc} */ public String getName() { return NAME; } /** * Build the serialized form. * * @param node the XML element that specifies which components to document * @param serializedTree content tree to which the documentation will be added */ public void buildSerializedForm(XMLNode node, Content serializedTree) throws Exception { serializedTree = writer.getHeader(configuration.getText( "doclet.Serialized_Form")); buildChildren(node, serializedTree); writer.addFooter(serializedTree); writer.printDocument(serializedTree); writer.close(); } /** * Build the serialized form summaries. * * @param node the XML element that specifies which components to document * @param serializedTree content tree to which the documentation will be added */ public void buildSerializedFormSummaries(XMLNode node, Content serializedTree) { Content serializedSummariesTree = writer.getSerializedSummariesHeader(); PackageDoc[] packages = configuration.packages; for (int i = 0; i < packages.length; i++) { currentPackage = packages[i]; buildChildren(node, serializedSummariesTree); } serializedTree.addContent(writer.getSerializedContent( serializedSummariesTree)); } /** * Build the package serialized form for the current package being processed. * * @param node the XML element that specifies which components to document * @param serializedSummariesTree content tree to which the documentation will be added */ public void buildPackageSerializedForm(XMLNode node, Content serializedSummariesTree) { Content packageSerializedTree = writer.getPackageSerializedHeader(); String foo = currentPackage.name(); ClassDoc[] classes = currentPackage.allClasses(false); if (classes == null || classes.length == 0) { return; } if (!serialInclude(currentPackage)) { return; } if (!serialClassFoundToDocument(classes)) { return; } buildChildren(node, packageSerializedTree); serializedSummariesTree.addContent(packageSerializedTree); } /** * Build the package header. * * @param node the XML element that specifies which components to document * @param packageSerializedTree content tree to which the documentation will be added */ public void buildPackageHeader(XMLNode node, Content packageSerializedTree) { packageSerializedTree.addContent(writer.getPackageHeader( Util.getPackageName(currentPackage))); } /** * Build the class serialized form. * * @param node the XML element that specifies which components to document * @param packageSerializedTree content tree to which the documentation will be added */ public void buildClassSerializedForm(XMLNode node, Content packageSerializedTree) { Content classSerializedTree = writer.getClassSerializedHeader(); ClassDoc[] classes = currentPackage.allClasses(false); Arrays.sort(classes); for (int j = 0; j < classes.length; j++) { currentClass = classes[j]; fieldWriter = writer.getSerialFieldWriter(currentClass); methodWriter = writer.getSerialMethodWriter(currentClass); if(currentClass.isClass() && currentClass.isSerializable()) { if(!serialClassInclude(currentClass)) { continue; } Content classTree = writer.getClassHeader(currentClass); buildChildren(node, classTree); classSerializedTree.addContent(classTree); } } packageSerializedTree.addContent(classSerializedTree); } /** * Build the serial UID information for the given class. * * @param node the XML element that specifies which components to document * @param classTree content tree to which the serial UID information will be added */ public void buildSerialUIDInfo(XMLNode node, Content classTree) { Content serialUidTree = writer.getSerialUIDInfoHeader(); FieldDoc[] fields = currentClass.fields(false); for (int i = 0; i < fields.length; i++) { if (fields[i].name().equals("serialVersionUID") && fields[i].constantValueExpression() != null) { writer.addSerialUIDInfo(SERIAL_VERSION_UID_HEADER, fields[i].constantValueExpression(), serialUidTree); break; } } classTree.addContent(serialUidTree); } /** * Build the summaries for the methods and fields. * * @param node the XML element that specifies which components to document * @param classTree content tree to which the documentation will be added */ public void buildClassContent(XMLNode node, Content classTree) { Content classContentTree = writer.getClassContentHeader(); buildChildren(node, classContentTree); classTree.addContent(classContentTree); } /** * Build the summaries for the methods that belong to the given * class. * * @param node the XML element that specifies which components to document * @param classContentTree content tree to which the documentation will be added */ public void buildSerializableMethods(XMLNode node, Content classContentTree) { Content serializableMethodTree = methodWriter.getSerializableMethodsHeader(); MemberDoc[] members = currentClass.serializationMethods(); int membersLength = members.length; if (membersLength > 0) { for (int i = 0; i < membersLength; i++) { currentMember = members[i]; Content methodsContentTree = methodWriter.getMethodsContentHeader( (i == membersLength - 1)); buildChildren(node, methodsContentTree); serializableMethodTree.addContent(methodsContentTree); } } if (currentClass.serializationMethods().length > 0) { classContentTree.addContent(methodWriter.getSerializableMethods( configuration.getText("doclet.Serialized_Form_methods"), serializableMethodTree)); if (currentClass.isSerializable() && !currentClass.isExternalizable()) { if (currentClass.serializationMethods().length == 0) { Content noCustomizationMsg = methodWriter.getNoCustomizationMsg( configuration.getText( "doclet.Serializable_no_customization")); classContentTree.addContent(methodWriter.getSerializableMethods( configuration.getText("doclet.Serialized_Form_methods"), noCustomizationMsg)); } } } } /** * Build the method sub header. * * @param node the XML element that specifies which components to document * @param methodsContentTree content tree to which the documentation will be added */ public void buildMethodSubHeader(XMLNode node, Content methodsContentTree) { methodWriter.addMemberHeader((MethodDoc)currentMember, methodsContentTree); } /** * Build the deprecated method description. * * @param node the XML element that specifies which components to document * @param methodsContentTree content tree to which the documentation will be added */ public void buildDeprecatedMethodInfo(XMLNode node, Content methodsContentTree) { methodWriter.addDeprecatedMemberInfo((MethodDoc) currentMember, methodsContentTree); } /** * Build the information for the method. * * @param node the XML element that specifies which components to document * @param methodsContentTree content tree to which the documentation will be added */ public void buildMethodInfo(XMLNode node, Content methodsContentTree) { if(configuration.nocomment){ return; } buildChildren(node, methodsContentTree); } /** * Build method description. * * @param node the XML element that specifies which components to document * @param methodsContentTree content tree to which the documentation will be added */ public void buildMethodDescription(XMLNode node, Content methodsContentTree) { methodWriter.addMemberDescription((MethodDoc) currentMember, methodsContentTree); } /** * Build the method tags. * * @param node the XML element that specifies which components to document * @param methodsContentTree content tree to which the documentation will be added */ public void buildMethodTags(XMLNode node, Content methodsContentTree) { methodWriter.addMemberTags((MethodDoc) currentMember, methodsContentTree); MethodDoc method = (MethodDoc)currentMember; if (method.name().compareTo("writeExternal") == 0 && method.tags("serialData").length == 0) { if (configuration.serialwarn) { configuration.getDocletSpecificMsg().warning( currentMember.position(), "doclet.MissingSerialDataTag", method.containingClass().qualifiedName(), method.name()); } } } /** * Build the field header. * * @param node the XML element that specifies which components to document * @param classContentTree content tree to which the documentation will be added */ public void buildFieldHeader(XMLNode node, Content classContentTree) { if (currentClass.serializableFields().length > 0) { buildFieldSerializationOverview(currentClass, classContentTree); } } /** * Build the serialization overview for the given class. * * @param classDoc the class to print the overview for. * @param classContentTree content tree to which the documentation will be added */ public void buildFieldSerializationOverview(ClassDoc classDoc, Content classContentTree) { if (classDoc.definesSerializableFields()) { FieldDoc serialPersistentField = classDoc.serializableFields()[0]; // Check to see if there are inline comments, tags or deprecation // information to be printed. if (fieldWriter.shouldPrintOverview(serialPersistentField)) { Content serializableFieldsTree = fieldWriter.getSerializableFieldsHeader(); Content fieldsOverviewContentTree = fieldWriter.getFieldsContentHeader(true); fieldWriter.addMemberDeprecatedInfo(serialPersistentField, fieldsOverviewContentTree); if (!configuration.nocomment) { fieldWriter.addMemberDescription(serialPersistentField, fieldsOverviewContentTree); fieldWriter.addMemberTags(serialPersistentField, fieldsOverviewContentTree); } serializableFieldsTree.addContent(fieldsOverviewContentTree); classContentTree.addContent(fieldWriter.getSerializableFields( configuration.getText("doclet.Serialized_Form_class"), serializableFieldsTree)); } } } /** * Build the summaries for the fields that belong to the given class. * * @param node the XML element that specifies which components to document * @param classContentTree content tree to which the documentation will be added */ public void buildSerializableFields(XMLNode node, Content classContentTree) { MemberDoc[] members = currentClass.serializableFields(); int membersLength = members.length; if (membersLength > 0) { Content serializableFieldsTree = fieldWriter.getSerializableFieldsHeader(); for (int i = 0; i < membersLength; i++) { currentMember = members[i]; if (!currentClass.definesSerializableFields()) { Content fieldsContentTree = fieldWriter.getFieldsContentHeader( (i == membersLength - 1)); buildChildren(node, fieldsContentTree); serializableFieldsTree.addContent(fieldsContentTree); } else { buildSerialFieldTagsInfo(serializableFieldsTree); } } classContentTree.addContent(fieldWriter.getSerializableFields( configuration.getText("doclet.Serialized_Form_fields"), serializableFieldsTree)); } } /** * Build the field sub header. * * @param node the XML element that specifies which components to document * @param fieldsContentTree content tree to which the documentation will be added */ public void buildFieldSubHeader(XMLNode node, Content fieldsContentTree) { if (!currentClass.definesSerializableFields()) { FieldDoc field = (FieldDoc) currentMember; fieldWriter.addMemberHeader(field.type().asClassDoc(), field.type().typeName(), field.type().dimension(), field.name(), fieldsContentTree); } } /** * Build the field deprecation information. * * @param node the XML element that specifies which components to document * @param fieldsContentTree content tree to which the documentation will be added */ public void buildFieldDeprecationInfo(XMLNode node, Content fieldsContentTree) { if (!currentClass.definesSerializableFields()) { FieldDoc field = (FieldDoc)currentMember; fieldWriter.addMemberDeprecatedInfo(field, fieldsContentTree); } } /** * Build the serial field tags information. * * @param serializableFieldsTree content tree to which the documentation will be added */ public void buildSerialFieldTagsInfo(Content serializableFieldsTree) { if(configuration.nocomment){ return; } FieldDoc field = (FieldDoc)currentMember; // Process Serializable Fields specified as array of // ObjectStreamFields. Print a member for each serialField tag. // (There should be one serialField tag per ObjectStreamField // element.) SerialFieldTag[] tags = field.serialFieldTags(); Arrays.sort(tags); int tagsLength = tags.length; for (int i = 0; i < tagsLength; i++) { if (tags[i].fieldName() == null || tags[i].fieldType() == null) // ignore malformed @serialField tags continue; Content fieldsContentTree = fieldWriter.getFieldsContentHeader( (i == tagsLength - 1)); fieldWriter.addMemberHeader(tags[i].fieldTypeDoc(), tags[i].fieldType(), "", tags[i].fieldName(), fieldsContentTree); fieldWriter.addMemberDescription(tags[i], fieldsContentTree); serializableFieldsTree.addContent(fieldsContentTree); } } /** * Build the field information. * * @param node the XML element that specifies which components to document * @param fieldsContentTree content tree to which the documentation will be added */ public void buildFieldInfo(XMLNode node, Content fieldsContentTree) { if(configuration.nocomment){ return; } FieldDoc field = (FieldDoc)currentMember; ClassDoc cd = field.containingClass(); // Process default Serializable field. if ((field.tags("serial").length == 0) && ! field.isSynthetic() && configuration.serialwarn) { configuration.message.warning(field.position(), "doclet.MissingSerialTag", cd.qualifiedName(), field.name()); } fieldWriter.addMemberDescription(field, fieldsContentTree); fieldWriter.addMemberTags(field, fieldsContentTree); } /** * Return true if the given Doc should be included * in the serialized form. * * @param doc the Doc object to check for serializability. */ public static boolean serialInclude(Doc doc) { if (doc == null) { return false; } return doc.isClass() ? serialClassInclude((ClassDoc)doc) : serialDocInclude(doc); } /** * Return true if the given ClassDoc should be included * in the serialized form. * * @param cd the ClassDoc object to check for serializability. */ private static boolean serialClassInclude(ClassDoc cd) { if (cd.isEnum()) { return false; } try { cd.superclassType(); } catch (NullPointerException e) { //Workaround for null pointer bug in ClassDoc.superclassType(). return false; } if (cd.isSerializable()) { if (cd.tags("serial").length > 0) { return serialDocInclude(cd); } else if (cd.isPublic() || cd.isProtected()) { return true; } else { return false; } } return false; } /** * Return true if the given Doc should be included * in the serialized form. * * @param doc the Doc object to check for serializability. */ private static boolean serialDocInclude(Doc doc) { if (doc.isEnum()) { return false; } Tag[] serial = doc.tags("serial"); if (serial.length > 0) { String serialtext = serial[0].text().toLowerCase(); if (serialtext.indexOf("exclude") >= 0) { return false; } else if (serialtext.indexOf("include") >= 0) { return true; } } return true; } /** * Return true if any of the given classes have a @serialinclude tag. * * @param classes the classes to check. * @return true if any of the given classes have a @serialinclude tag. */ private boolean serialClassFoundToDocument(ClassDoc[] classes) { for (int i = 0; i < classes.length; i++) { if (serialClassInclude(classes[i])) { return true; } } return false; } } ././@LongLink0000000000000000000000000000015600000000000011217 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/XMLNode.javalibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/XML0000644000000000000000000000510412214026367032102 0ustar 00000000000000/* * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.doclets.internal.toolkit.builders; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; /** * Simple class to represent the attribute and elements of an XML node. * *

This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice. */ public class XMLNode { XMLNode(XMLNode parent, String qname) { this.parent = parent; name = qname; attrs = new HashMap(); children = new ArrayList(); if (parent != null) parent.children.add(this); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("<"); sb.append(name); for (Map.Entry e: attrs.entrySet()) sb.append(" " + e.getKey() + "=\"" + e.getValue() + "\""); if (children.size() == 0) sb.append("/>"); else { sb.append(">"); for (XMLNode c: children) sb.append(c.toString()); sb.append(""); } return sb.toString(); } final XMLNode parent; final String name; final Map attrs; final List children; } ././@LongLink0000000000000000000000000000015600000000000011217 Lustar 00000000000000libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/package.htmllibnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/pac0000644000000000000000000000354212214026367032211 0ustar 00000000000000 com.sun.tools.doclets.internal.toolkit.builders package This doclet-independent package has a set of classes and interfaces that are the building blocks for doclets. They define the basic structure of doclets and make doclet writing much easier because they provide the content generation code to be shared among different doclets. Builders only provide the structure and content of API documentation. They will not provide any style markup.

This code is not part of an API. It is implementation that is subject to change. Do not use it as an API. libnb-javaparser-java_7.4.orig/src/share/classes/com/sun/tools/doclets/internal/toolkit/package.html0000644000000000000000000000446612214026367032201 0ustar 00000000000000 com.sun.tools.doclets.internal.toolkit package Contains the base classes that make up a doclet. Doclets that reuse the functionality provided by the toolkit should have the following characteristics: