1 <?cs # Create a comma separated list of annotations on obj that were in showAnnotations in Doclava ?> 2 <?cs # pre is an HTML string to start the list, post is an HTML string to close the list ?> 3 <?cs # for example call:show_annotations_list(cl, "<td>Annotations: ", "</td>") ?> 4 <?cs # if obj has nothing on obj.showAnnotations, nothing will be output ?> 5 <?cs def:show_annotations_list(obj) ?> 6 <?cs each:anno = obj.showAnnotations ?> 7 <?cs if:first(anno) ?> 8 <span class='annotation-message'> 9 Included in documentation by the annotations: 10 <?cs /if ?> 11 @<?cs var:anno.type.label ?> 12 <?cs if:last(anno) == 0 ?> 13 , 14 <?cs /if ?> 15 <?cs if:last(anno)?> 16 </span> 17 <?cs /if ?> 18 <?cs /each ?> 19 <?cs /def ?> 20 21 <?cs # Override default class_link_table to display annotations ?> 22 <?cs def:class_link_table(classes) ?> 23 <?cs set:count = #1 ?> 24 <table class="jd-sumtable-expando"> 25 <?cs each:cl=classes ?> 26 <tr <?cs 27 if:cl.type.since 28 ?>data-version-added="<?cs var:cl.type.since ?>"<?cs 29 /if ?><?cs 30 if:cl.type.deprecatedsince 31 ?> data-version-deprecated="<?cs var:cl.type.deprecatedsince ?>"<?cs 32 /if ?> > 33 <td class="jd-linkcol"><?cs call:type_link(cl.type) ?></td> 34 <td class="jd-descrcol" width="100%"> 35 <?cs call:short_descr(cl) ?> 36 <?cs call:show_annotations_list(cl) ?> 37 </td> 38 </tr> 39 <?cs set:count = count + #1 ?> 40 <?cs /each ?> 41 </table> 42 <?cs /def ?> 43 44 <?cs 45 # Prints a comma separated list of parameters with optional line breaks 46 ?><?cs 47 def:parameter_list(params, linebreaks) ?><?cs 48 each:param = params ?><?cs 49 call:simple_type_link(param.type)?> <?cs 50 var:param.name ?><?cs 51 if: name(param)!=subcount(params)-1 52 ?>, <?cs if:linebreaks 53 ?> 54 <?cs /if ?><?cs 55 /if ?><?cs 56 /each ?><?cs 57 /def ?><?cs 58 59 # Print output for aux tags that are not "standard" javadoc tags ?><?cs 60 def:aux_tag_list(tags) ?><?cs 61 each:tag = tags ?><p><?cs 62 if:tag.kind == "@memberDoc" ?><?cs call:tag_list(tag.commentTags) ?><?cs 63 elif:tag.kind == "@paramDoc" ?><?cs call:tag_list(tag.commentTags) ?><?cs 64 elif:tag.kind == "@returnDoc" ?><?cs call:tag_list(tag.commentTags) ?><?cs 65 elif:tag.kind == "@range" ?><?cs call:dump_range(tag) ?><?cs 66 elif:tag.kind == "@intDef" ?><?cs call:dump_int_def(tag) ?><?cs 67 elif:tag.kind == "@stringDef" ?><?cs call:dump_string_def(tag) ?><?cs 68 elif:tag.kind == "@permission" ?><?cs call:dump_permission(tag) ?><?cs 69 elif:tag.kind == "@service" ?><?cs call:dump_service(tag) ?><?cs 70 elif:tag.kind == "@feature" ?><?cs call:dump_feature(tag) ?><?cs 71 elif:tag.kind == "@column" ?><?cs call:dump_column(tag) ?><?cs 72 /if ?><?cs 73 /each ?></p><?cs 74 /def ?><?cs 75 76 # Print output for @range tags ?><?cs 77 def:dump_range(tag) ?><?cs 78 if:tag.from && tag.to ?>Value is between <?cs var:tag.from ?> and <?cs var:tag.to ?> inclusive.<?cs 79 elif:tag.from ?>Value is <?cs var:tag.from ?> or greater.<?cs 80 elif:tag.to ?>Value is <?cs var:tag.to ?> or less.<?cs 81 /if ?><?cs 82 /def ?><?cs 83 84 # Print output for @intDef tags ?><?cs 85 def:dump_int_def(tag) ?><?cs 86 if:tag.flag ?><?cs 87 if:subcount(tag.values) > 1 ?>Value is either <code>0</code> or combination of <?cs 88 else ?>Value is either <code>0</code> or <?cs 89 /if ?><?cs 90 else ?>Value is <?cs 91 /if ?><?cs 92 loop:i = #0, subcount(tag.values), #1 ?><?cs 93 with:val = tag.values[i] ?><?cs 94 call:tag_list(val.commentTags) ?><?cs 95 if i == subcount(tag.values) - 2 ?> or <?cs 96 elif:i < subcount(tag.values) - 2 ?>, <?cs 97 /if ?><?cs 98 /with ?><?cs 99 /loop ?>.<?cs 100 /def ?><?cs 101 102 # Print output for @stringDef tags ?><?cs 103 def:dump_string_def(tag) ?>Value is <?cs 104 loop:i = #0, subcount(tag.values), #1 ?><?cs 105 with:val = tag.values[i] ?><?cs 106 call:tag_list(val.commentTags) ?><?cs 107 if i == subcount(tag.values) - 2 ?> or <?cs 108 elif:i < subcount(tag.values) - 2 ?>, <?cs 109 /if ?><?cs 110 /with ?><?cs 111 /loop ?>.<?cs 112 /def ?><?cs 113 114 # Print output for @permission tags ?><?cs 115 def:dump_permission(tag) ?>Requires the <?cs 116 loop:i = #0, subcount(tag.values), #1 ?><?cs 117 with:val = tag.values[i] ?><?cs 118 call:tag_list(val.commentTags) ?><?cs 119 if i == subcount(tag.values) - 2 ?><?cs 120 if tag.any ?> or <?cs 121 else ?> and <?cs 122 /if ?><?cs 123 elif:i < subcount(tag.values) - 2 ?>, <?cs 124 /if ?><?cs 125 /with ?><?cs 126 /loop ?><?cs 127 if subcount(tag.values) > 1 ?> permissions.<?cs 128 else ?> permission.<?cs 129 /if ?><?cs 130 /def ?><?cs 131 132 # Print output for @service tags ?><?cs 133 def:dump_service(tag) ?>Instances of this class must be obtained using <?cs 134 loop:i = #0, subcount(tag.values) - 1, #2 ?><?cs 135 call:tag_list(tag.values[i].commentTags) ?> with the argument <?cs 136 call:tag_list(tag.values[i+1].commentTags) ?><?cs 137 if i < subcount(tag.values) - 2 ?> or <?cs 138 /if ?><?cs 139 /loop ?>.<?cs 140 /def ?><?cs 141 142 # Print output for @feature tags ?><?cs 143 def:dump_feature(tag) ?>Requires the <?cs 144 call:tag_list(tag.values[0].commentTags) ?> feature which can be detected using <?cs 145 call:tag_list(tag.values[1].commentTags) ?>.<?cs 146 /def ?> 147 148 # Print output for @column tags ?><?cs 149 def:dump_column(tag) ?>This constant represents a column name that can be used with a <?cs 150 call:tag_list(tag.values[0].commentTags) ?> through a <?cs 151 call:tag_list(tag.values[1].commentTags) ?> or <?cs 152 call:tag_list(tag.values[2].commentTags) ?> object. The values stored in this column are <?cs 153 call:tag_list(tag.values[3].commentTags) ?><?cs 154 if tag.readOnly ?>, and are read-only and cannot be mutated<?cs 155 else ?><?cs 156 /if ?>.<?cs 157 /def ?> 158