comparison src/main/resources/org/ssdt_ohio/gradle/userdoc/templates/classDocName.html @ 23:e2d02e8742be

usasr-1307: for render tables for properties and reportable properties with label and group names
author smith@nwoca.org
date Wed, 16 Mar 2016 23:24:26 +0100
parents e8e14d5d6be2
children
comparison
equal deleted inserted replaced
22:b3282a66cc05 23:e2d02e8742be
1 <!-- 1 <!--
2 ~ Copyright (c) 2014. Ohio Department of Education. - All Rights Reserved. 2
3 ~ Unauthorized copying of this file, in any medium, is strictly prohibited. 3 Licensed to the Apache Software Foundation (ASF) under one
4 ~ Written by State Software Development Team (http://ssdt.oecn.k12.oh.us/) 4 or more contributor license agreements. See the NOTICE file
5 --> 5 distributed with this work for additional information
6 6 regarding copyright ownership. The ASF licenses this file
7 to you under the Apache License, Version 2.0 (the
8 "License"); you may not use this file except in compliance
9 with the License. You may obtain a copy of the License at
10
11 http://www.apache.org/licenses/LICENSE-2.0
12
13 Unless required by applicable law or agreed to in writing,
14 software distributed under the License is distributed on an
15 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 KIND, either express or implied. See the License for the
17 specific language governing permissions and limitations
18 under the License.
19
20 -->
7 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 21 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
8 <!-- **************************************************************** --> 22 <!-- **************************************************************** -->
9 <!-- * PLEASE KEEP COMPLICATED EXPRESSIONS OUT OF THESE TEMPLATES, * --> 23 <!-- * PLEASE KEEP COMPLICATED EXPRESSIONS OUT OF THESE TEMPLATES, * -->
10 <!-- * i.e. only iterate & print data where possible. Thanks, Jez. * --> 24 <!-- * i.e. only iterate & print data where possible. Thanks, Jez. * -->
11 <!-- **************************************************************** --> 25 <!-- **************************************************************** -->
12 <% 26 <%
13 27
14 println "Generating for $classDoc (${classDoc.class})"
15 classDoc = props.get('userdocHelper').wrap(classDoc) 28 classDoc = props.get('userdocHelper').wrap(classDoc)
16 29
17 def title = classDoc.name() + (props.docTitle ? " (${props.docTitle})" : "") 30 def title = classDoc.name() + (props.docTitle ? " (${props.docTitle})" : "")
18 def isVisible = { it.isPublic() || (it.isProtected() && props.protectedScope == 'true') || (!it.isProtected() && !it.isPrivate() && props.packageScope == 'true') || props.privateScope == 'true' } 31 def isVisible = { it.isPublic() || (it.isProtected() && props.protectedScope == 'true') || (!it.isProtected() && !it.isPrivate() && props.packageScope == 'true') || props.privateScope == 'true' }
19 def isVisibleExt = { t -> java.lang.reflect.Modifier.isPublic(t.modifiers) || java.lang.reflect.Modifier.isProtected(t.modifiers) } 32 def isVisibleExt = { t -> java.lang.reflect.Modifier.isPublic(t.modifiers) || java.lang.reflect.Modifier.isProtected(t.modifiers) }
20 def visibleFields = classDoc.fields().findAll(isVisible) 33 def visibleFields = classDoc.fields().findAll(isVisible)
21 def visibleProperties = classDoc.properties() // props visible be defn 34 def visibleProperties = classDoc.properties() // props visible be def
22 def visibleMethods = classDoc.methods().findAll(isVisible) 35 def visibleMethods = classDoc.methods().findAll(isVisible)
36 def getterMethods = visibleMethods.findAll { it.name().startsWith('get') }
37 def nonGetterMethods = visibleMethods - getterMethods
38
23 def visibleConstructors = classDoc.constructors().findAll(isVisible) 39 def visibleConstructors = classDoc.constructors().findAll(isVisible)
24 def visibleNested = classDoc.innerClasses().findAll(isVisible) 40 def visibleNested = classDoc.innerClasses().findAll(isVisible)
25 boolean hasFields = !classDoc.isAnnotationType() && visibleFields 41 boolean hasFields = !classDoc.isAnnotationType() && visibleFields
26 boolean hasProperties = !classDoc.isAnnotationType() && visibleProperties 42 boolean hasProperties = !classDoc.isAnnotationType() && visibleProperties
27 boolean hasElements = classDoc.isAnnotationType() && visibleFields 43 boolean hasElements = classDoc.isAnnotationType() && visibleFields
29 boolean fieldSummaryShown = hasFields 45 boolean fieldSummaryShown = hasFields
30 boolean hasEnumConstants = classDoc.enumConstants() 46 boolean hasEnumConstants = classDoc.enumConstants()
31 def dolink = { t, boolean b -> 47 def dolink = { t, boolean b ->
32 boolean isArray = false 48 boolean isArray = false
33 if (!t || t instanceof String) { 49 if (!t || t instanceof String) {
34 return (classDoc.getDocUrl(t, b) -'java.util.' - 'java.lang.') 50 return classDoc.getDocUrl(t, b)
35 } 51 }
36 if (t instanceof org.codehaus.groovy.tools.groovydoc.ArrayClassDocWrapper) { 52 if (t instanceof org.codehaus.groovy.tools.groovydoc.ArrayClassDocWrapper) {
37 t = t.delegate 53 t = t.delegate
38 isArray = true 54 isArray = true
39 } 55 }
40 if (t instanceof org.codehaus.groovy.tools.groovydoc.SimpleGroovyClassDoc) { 56 if (t instanceof org.codehaus.groovy.tools.groovydoc.SimpleGroovyClassDoc) {
41 if (t.fullPathName == 'def') return classDoc.getDocUrl("java.lang.Object def", b) 57 if (t.fullPathName == 'def') return classDoc.getDocUrl("java.lang.Object def", b)
42 return "<a href='" + classDoc.relativeRootPath + t.fullPathName + ".html'>" + ( (b ? t.qualifiedTypeName() : t.name() ) - "java.lang." - "java.util." ) + "</a>" + (isArray ? "[]" : "") 58 if (!t.qualifiedTypeName().contains("<") && t.name().size() > 1)
43 } 59 return "<a href='" + classDoc.relativeRootPath + t.fullPathName + ".html'>" + (b ? t.qualifiedTypeName() : t.name()) + "</a>" + (isArray ? "[]" : "")
44 return ( classDoc.getDocUrl(t.qualifiedTypeName(), b) - 'java.util.' - 'java.lang.' ) + (isArray ? "[]" : "") 60 }
61 return classDoc.getDocUrl(t.qualifiedTypeName(), b) + (isArray ? "[]" : "")
45 } 62 }
46 def linkfull = { t -> dolink(t, true) } 63 def linkfull = { t -> dolink(t, true) - "java.lang." - "java.util." }
47 def linkable = { t -> dolink(t, false) } 64 def linkable = { t -> dolink(t, false) - "java.lang." - "java.util." }
48 def modifiersWithIgnore = { t, boolean ignorePublic -> 65 def modifiersWithIgnore = { t, boolean ignorePublic ->
49 (t.isPrivate()?"private&nbsp;":"") + 66 (t.isPrivate()?"private&nbsp;":"") +
50 (t.isPublic() && !ignorePublic?"public&nbsp;":"") + 67 (t.isPublic() && !ignorePublic?"public&nbsp;":"") +
51 (t.isProtected()?"protected&nbsp;":"") + 68 (t.isProtected()?"protected&nbsp;":"") +
52 (t.isStatic()?"static&nbsp;":"") + 69 (t.isStatic()?"static&nbsp;":"") +
58 (t.isPrivate()?"private&nbsp;":"") + 75 (t.isPrivate()?"private&nbsp;":"") +
59 (t.isProtected()?"protected&nbsp;":"") + 76 (t.isProtected()?"protected&nbsp;":"") +
60 (t.isStatic()?"static&nbsp;":"") 77 (t.isStatic()?"static&nbsp;":"")
61 } 78 }
62 def annotations = { t, sepChar -> 79 def annotations = { t, sepChar ->
63 t.annotations() ? t.annotations().collect { 80 t.annotations() ? t.annotations().collect{it.isTypeAvailable()?'@'+linkable(it.type().name())+(it.description()-('@'+it.type().name())):it.description()}.join(sepChar) + sepChar : ''
64 // it.isTypeAvailable() ? '@'+linkable(it.type().name())+(it.description()-('@'+it.type().name())): it.description()
65 it.description()
66 }.join(sepChar) + sepChar : ''
67 } 81 }
68 def elementTypes = [ 82 def elementTypes = [
69 "required":"true", 83 "required":"true",
70 "optional":"false" 84 "optional":"false"
71 ] 85 ]
72 def isRequired = { f, v -> 86 def isRequired = { f, v -> def req = f.constantValueExpression() == null; req.toString() == v }
73 def req = f.constantValueExpression() == null; req.toString() == v
74 }
75 def upcase = { n -> n[0].toUpperCase() + n[1..-1] } 87 def upcase = { n -> n[0].toUpperCase() + n[1..-1] }
88 def lowcase = { n -> n ? n[0].toLowerCase() + n[1..-1] : "" }
76 def paramsOf = { n, boolean brief -> n.parameters().collect{ param -> (brief?'':annotations(param, ' ')) + linkable(param.isTypeAvailable()?param.type():param.typeName()) + (param.vararg()?'... ':' ') + param.name() + (param.defaultValue() ? " = " + param.defaultValue():"") }.join(", ") } 89 def paramsOf = { n, boolean brief -> n.parameters().collect{ param -> (brief?'':annotations(param, ' ')) + linkable(param.isTypeAvailable()?param.type():param.typeName()) + (param.vararg()?'... ':' ') + param.name() + (param.defaultValue() ? " = " + param.defaultValue():"") }.join(", ") }
77 def nameFromParams = { n -> n.name() + '(' + n.parameters().collect{ param -> param.isTypeAvailable()?param.type().qualifiedTypeName():param.typeName() }.join(', ') + ')' } 90 def nameFromParams = { n -> n.name() + '(' + n.parameters().collect{ param -> param.isTypeAvailable()?param.type().qualifiedTypeName():param.typeName() }.join(', ') + ')' }
78 def nameFromJavaParams = { n -> n.name + '(' + n.parameterTypes.collect{ param -> param.name }.join(', ') + ')' } 91 def nameFromJavaParams = { n -> n.name + '(' + n.parameterTypes.collect{ param -> param.name }.join(', ') + ')' }
92 def asPropertyName = { lowcase(it - 'get') }
79 %> 93 %>
80 <html> 94 <html>
81 <head> 95 <head>
82 <!-- Generated by groovydoc (${GroovySystem.version}) on ${new Date()} --> 96 <!-- Generated by groovydoc (${GroovySystem.version}) on ${new Date()} -->
83 <title>${title}</title> 97 <title>${title}</title>
125 <li>Summary:&nbsp;</li> 139 <li>Summary:&nbsp;</li>
126 <% 140 <%
127 if (classDoc.isAnnotationType()) { 141 if (classDoc.isAnnotationType()) {
128 def hasReq = classDoc.fields().any{ isRequired(it, "true") } 142 def hasReq = classDoc.fields().any{ isRequired(it, "true") }
129 def hasOpt = classDoc.fields().any{ isRequired(it, "false") } 143 def hasOpt = classDoc.fields().any{ isRequired(it, "false") }
130 if (hasReq) { %><li><a href="#required_element_summary"><% } %>Required<% if (hasReq) { %></a></li><% } %>&nbsp;&nbsp;&nbsp;<% 144 if (hasReq) { %><li><a href="#required_element_summary"><% } %>Required<% if (hasReq) { %></a></li><% } %>&nbsp;&nbsp;&nbsp;<%
131 if (hasOpt) { %><li><a href="#optional_element_summary"><% } %>Optional<% if (hasOpt) { %></a></li><% } %>&nbsp;&nbsp;&nbsp;<% 145 if (hasOpt) { %><li><a href="#optional_element_summary"><% } %>Optional<% if (hasOpt) { %></a></li><% } %>&nbsp;&nbsp;&nbsp;<%
132 } else { 146 } else {
133 if (visibleNested) { %><li><a href="#nested_summary"><% } %>Nested<% if (visibleNested) { %></a></li><% } %>&nbsp;&nbsp;&nbsp;<% 147 if (visibleNested) { %><li><a href="#nested_summary"><% } %>Nested<% if (visibleNested) { %></a></li><% } %>&nbsp;&nbsp;&nbsp;<%
134 if (classDoc.isEnum()) { 148 if (classDoc.isEnum()) {
135 if (hasEnumConstants) { %><li><a href="#enum_constant_summary"><% } %>Enum constants<% if (hasEnumConstants) { %></a></li><% } %>&nbsp;&nbsp;&nbsp;<% 149 if (hasEnumConstants) { %><li><a href="#enum_constant_summary"><% } %>Enum constants<% if (hasEnumConstants) { %></a></li><% } %>&nbsp;&nbsp;&nbsp;<%
136 } 150 }
137 if (hasFields) { %><li><a href="#field_summary"><% } %>Field<% if (hasFields) { %></a></li><% } %>&nbsp;&nbsp;&nbsp;<% 151 if (hasFields) { %><li><a href="#field_summary"><% } %>Field<% if (hasFields) { %></a></li><% } %>&nbsp;&nbsp;&nbsp;<%
138 if (hasProperties) { %><li><a href="#property_summary">Property</a></li><% } %>&nbsp;&nbsp;&nbsp;<% 152 if (hasProperties) { %><li><a href="#property_summary">Property</a></li><% } %>&nbsp;&nbsp;&nbsp;<%
139 if (classDoc.isClass()) { 153 if (classDoc.isClass()) {
140 if (visibleConstructors) { %><li><a href="#constructor_summary"><% } %>Constructor<% if (visibleConstructors) { %></a></li><% } %>&nbsp;&nbsp;&nbsp;<% 154 if (visibleConstructors) { %><li><a href="#constructor_summary"><% } %>Constructor<% if (visibleConstructors) { %></a></li><% } %>&nbsp;&nbsp;&nbsp;<%
141 } 155 }
142 if (visibleMethods) { %><li><a href="#method_summary"><% } %>Method<% if (visibleMethods) { %></a></li><% } %>&nbsp;&nbsp;&nbsp;<% 156 if (visibleMethods) { %><li><a href="#method_summary"><% } %>Method<% if (visibleMethods) { %></a></li><% } %>&nbsp;&nbsp;&nbsp;<%
143 } 157 }
144 %> 158 %>
145 </ul> 159 </ul>
146 <ul class="subNavList"> 160 <ul class="subNavList">
147 <li>&nbsp;|&nbsp;Detail:&nbsp;</li> 161 <li>&nbsp;|&nbsp;Detail:&nbsp;</li>
148 <% 162 <%
149 if (classDoc.isAnnotationType()) { 163 if (classDoc.isAnnotationType()) {
150 if (hasElements) { %><li><a href="#element_detail"><% } %>Element<% if (hasElements) { %></a></li><% } %>&nbsp;&nbsp;&nbsp;<% 164 if (hasElements) { %><li><a href="#element_detail"><% } %>Element<% if (hasElements) { %></a></li><% } %>&nbsp;&nbsp;&nbsp;<%
151 } else { 165 } else {
152 if (classDoc.isEnum()) { 166 if (classDoc.isEnum()) {
153 if (hasEnumConstants) { %><li><a href="#enum_constant_detail"><% } %>Enum constants<% if (hasEnumConstants) { %></a></li><% } %>&nbsp;&nbsp;&nbsp;<% 167 if (hasEnumConstants) { %><li><a href="#enum_constant_detail"><% } %>Enum constants<% if (hasEnumConstants) { %></a></li><% } %>&nbsp;&nbsp;&nbsp;<%
154 } 168 }
155 if (hasFields) { %><li><a href="#field_detail"><% } %>Field<% if (hasFields) { %></a></li><% } %>&nbsp;&nbsp;&nbsp;<% 169 if (hasFields) { %><li><a href="#field_detail"><% } %>Field<% if (hasFields) { %></a></li><% } %>&nbsp;&nbsp;&nbsp;<%
156 if (hasProperties) { %><li><a href="#prop_detail">Property</a></li><% } %>&nbsp;&nbsp;&nbsp;<% 170 if (hasProperties) { %><li><a href="#prop_detail">Property</a></li><% } %>&nbsp;&nbsp;&nbsp;<%
157 if (classDoc.isClass()) { 171 if (classDoc.isClass()) {
158 if (visibleConstructors) { %><li><a href="#constructor_detail"><% } %>Constructor<% if (visibleConstructors) { %></a></li><% } %>&nbsp;&nbsp;&nbsp;<% 172 if (visibleConstructors) { %><li><a href="#constructor_detail"><% } %>Constructor<% if (visibleConstructors) { %></a></li><% } %>&nbsp;&nbsp;&nbsp;<%
159 } 173 }
160 if (visibleMethods) { %><li><a href="#method_detail"><% } %>Method<% if (visibleMethods) { %></a></li><% } %>&nbsp;&nbsp;&nbsp;<% 174 if (visibleMethods) { %><li><a href="#method_detail"><% } %>Method<% if (visibleMethods) { %></a></li><% } %>&nbsp;&nbsp;&nbsp;<%
161 } 175 }
162 %> 176 %>
163 </ul> 177 </ul>
164 </div> 178 </div>
165 <a name="skip-navbar_top"> 179 <a name="skip-navbar_top">
174 String classDesc = "${classDoc.typeDescription} ${org.codehaus.groovy.tools.groovydoc.SimpleGroovyClassDoc.encodeAngleBrackets(classDoc.getNameWithTypeArgs())}" 188 String classDesc = "${classDoc.typeDescription} ${org.codehaus.groovy.tools.groovydoc.SimpleGroovyClassDoc.encodeAngleBrackets(classDoc.getNameWithTypeArgs())}"
175 if (pkg != "DefaultPackage") { 189 if (pkg != "DefaultPackage") {
176 %> 190 %>
177 <div class="subTitle">Package: <strong>${pkg}</strong></div> 191 <div class="subTitle">Package: <strong>${pkg}</strong></div>
178 <%}%> 192 <%}%>
179 <h2 title="${classDesc}" class="title">${classDesc}</h2> 193 <h2 title="${classDesc}" class="title">${classDesc}
194 <% if (classDoc.superclass()) { %> extends ${linkable(classDoc.superclass())} <% } %>
195 </h2>
180 </div> 196 </div>
181 <div class="contentContainer"> 197 <div class="contentContainer">
182 <ul class="inheritance"> 198 <ul class="inheritance">
183 <% 199 <%
184 def parents = classDoc.isInterface() ? classDoc.parentInterfaces : classDoc.parentClasses 200 def parents = classDoc.isInterface() ? classDoc.parentInterfaces : classDoc.parentClasses
218 <dd>${interfaces.collect{ linkable(it) }.join(', ')}</dd> 234 <dd>${interfaces.collect{ linkable(it) }.join(', ')}</dd>
219 </dl> 235 </dl>
220 <!-- todo: direct known subclasses --> 236 <!-- todo: direct known subclasses -->
221 <hr> 237 <hr>
222 <br> 238 <br>
223 <pre>${annotations(classDoc, '\n') + modifiers(classDoc) + classDoc.typeSourceDescription + ' ' + classDoc.name()} 239 <div>
224 <% if (classDoc.isInterface() && classDoc.interfaces()) { 240 ${ annotations(classDoc, '<br/>')}
225 %>extends ${classDoc.interfaces().collect{ linkable(it) }.join(', ')} 241 </div>
226 <% } else if (classDoc.superclass()) { 242 <pre>${modifiers(classDoc) + classDoc.typeSourceDescription + ' ' + classDoc.name()}
227 %>extends ${linkable(classDoc.superclass())} 243 <% if (classDoc.isInterface() && classDoc.interfaces()) {%>extends ${classDoc.interfaces().collect{ linkable(it) }.join(', ')}
244 <% } else if (classDoc.superclass()) { %>extends ${linkable(classDoc.superclass())}
228 <% } %> 245 <% } %>
229 </pre> 246 </pre>
230 <% } %> 247 <% } %>
231 <% } %> 248 <% } %>
232 <% if (classDoc.commentText()) { %> 249 <% if (classDoc.commentText()) { %>
233 <p>${classDoc.commentText()}</p> 250 <p>${classDoc.commentText()}</p>
234 <% } %> 251 <% } %>
235 </li> 252 </li>
236 </ul> 253 </ul>
237 </div> 254 </div>
238 255
239 <div class="summary"> 256 <div class="summary">
240 <ul class="blockList"> 257 <ul class="blockList">
377 <h3>Properties Summary</h3> 394 <h3>Properties Summary</h3>
378 <ul class="blockList"> 395 <ul class="blockList">
379 <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Properties Summary table, listing nested classes, and an explanation"> 396 <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Properties Summary table, listing nested classes, and an explanation">
380 <caption><span>Properties</span><span class="tabEnd">&nbsp;</span></caption> 397 <caption><span>Properties</span><span class="tabEnd">&nbsp;</span></caption>
381 <tr> 398 <tr>
382 <th class="colFirst" scope="col">Type</th> 399 <th class="colFirst" scope="col">Name</th>
383 <th class="colLast" scope="col">Name and description</th> 400 <th class="col" scope="col">Type</th>
401 <th class="col" scope="col">Label</th>
402 <th class="col" scope="col">Group</th>
403 <th class="colLast" scope="col">Description</th>
384 </tr> 404 </tr>
385 <% visibleProperties.eachWithIndex { prop, i -> %> 405 <% visibleProperties.eachWithIndex { prop, i -> %>
386 <tr class="${i%2==0?'altColor':'rowColor'}"> 406 <tr class="${i%2==0?'altColor':'rowColor'}">
387 <td class="colFirst"><code><strong>${modifiersBrief(prop) + linkable(prop.type())}</strong></code>&nbsp;</td> 407 <td class="colFirst"><code><a href="#${prop.name()}">${prop.name()}</a></code></td>
388 <td class="colLast"><code><a href="#${prop.name()}"></a>${prop.name()}</code><br>${prop.firstSentenceCommentText()}</td> 408 <td class="col"><code><strong>${modifiersBrief(prop) + linkable(prop.type())}</strong></code>&nbsp;</td>
409 <td class="col"> ${classDoc.getLabel(prop)} </td>
410 <td class="col"> ${classDoc.getGroup(prop)} </td>
411 <td class="colLast">${prop.firstSentenceCommentText()}</td>
389 </tr> 412 </tr>
390 <% } %> 413 <% } %>
391 </table> 414 </table>
392 </ul> 415 </ul>
393 </li> 416 </li>
486 } 509 }
487 510
488 if (visibleMethods || buffer.length()>0) { %> 511 if (visibleMethods || buffer.length()>0) { %>
489 <!-- ========== METHOD SUMMARY =========== --> 512 <!-- ========== METHOD SUMMARY =========== -->
490 <ul class="blockList"> 513 <ul class="blockList">
491 <% if (visibleMethods) { %> 514 <% if (getterMethods) { %>
515 <li class="blockList"><a name="method_summary"><!-- --></a>
516 <h3>Reportable Properties Summary</h3>
517 <ul class="blockList">
518 <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Reportable Properties Summary table">
519 <caption><span>Reportable Properties</span><span class="tabEnd">&nbsp;</span></caption>
520 <tr>
521 <th class="colFirst" scope="col">Name</th>
522 <th class="col" scope="col">Type</th>
523 <th class="col" scope="col">Label</th>
524 <th class="col" scope="col">Group</th>
525 <th class="colLast" scope="col">Description</th>
526 </tr>
527 <% getterMethods.eachWithIndex { method, i -> %>
528 <tr class="${i%2==0?'altColor':'rowColor'}">
529 <td class="colFirst"><code><strong><a href="#${nameFromParams(method)}">${asPropertyName(method.name())}</a></strong></code></td>
530 <td class="col"><code>${modifiersBrief(method)}${linkable(method.returnType())}</strong></code></td>
531 <td class="col">${classDoc.getLabel(method)}</td>
532 <td class="col">${classDoc.getGroup(method)}</td>
533 <td class="colLast">${method.firstSentenceCommentText()}</td>
534 </tr>
535 <% } %>
536 </table>
537 </ul>
538 </li>
539 <% } // if (getterMethods) %>
540
541 <% if (nonGetterMethods) { %>
492 <li class="blockList"><a name="method_summary"><!-- --></a> 542 <li class="blockList"><a name="method_summary"><!-- --></a>
493 <h3>Methods Summary</h3> 543 <h3>Methods Summary</h3>
494 <ul class="blockList"> 544 <ul class="blockList">
495 <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Methods Summary table"> 545 <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Methods Summary table">
496 <caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption> 546 <caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
497 <tr> 547 <tr>
498 <th class="colFirst" scope="col">Type</th> 548 <th class="colFirst" scope="col">Type</th>
499 <th class="colLast" scope="col">Name and description</th> 549 <th class="colLast" scope="col">Name and description</th>
500 </tr> 550 </tr>
501 <% visibleMethods.eachWithIndex { method, i -> %> 551 <% nonGetterMethods.eachWithIndex { method, i -> %>
502 <tr class="${i%2==0?'altColor':'rowColor'}"> 552 <tr class="${i%2==0?'altColor':'rowColor'}">
503 <td class="colFirst"><code>${modifiersBrief(method)}${linkable(method.returnType())}</strong></code></td> 553 <td class="colFirst"><code>${modifiersBrief(method)}${linkable(method.returnType())}</strong></code></td>
504 <td class="colLast"><code><strong><a href="#${nameFromParams(method)}">${method.name()}</a></strong>(${paramsOf(method, true)})</code><br>${method.firstSentenceCommentText()}</td> 554 <td class="colLast"><code><strong><a href="#${nameFromParams(method)}">${method.name()}</a></strong>(${paramsOf(method, true)})</code><br>${method.firstSentenceCommentText()}</td>
505 </tr> 555 </tr>
506 <% } %> 556 <% } %>
507 </table> 557 </table>
508 </ul> 558 </ul>
509 </li> 559 </li>
510 <% } // if (visibleMethods) 560 <% } // if (nonGetterMethods)
511 if (buffer.length()>0) { 561 if (buffer.length()>0) {
512 %> 562 %>
513 <li class="blockList"><a name="method_summary"><!-- --></a> 563 <li class="blockList"><a name="method_summary"><!-- --></a>
514 <h3>Inherited Methods Summary</h3> 564 <h3>Inherited Methods Summary</h3>
515 <ul class="blockList"> 565 <ul class="blockList">
516 <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Inherited Methods Summary table"> 566 <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Inherited Methods Summary table">
517 <caption><span>Inherited Methods</span><span class="tabEnd">&nbsp;</span></caption> 567 <caption><span>Inherited Methods</span><span class="tabEnd">&nbsp;</span></caption>
583 <h3>Property Detail</h3> 633 <h3>Property Detail</h3>
584 <% visibleProperties.each { prop -> %> 634 <% visibleProperties.each { prop -> %>
585 <a name="${prop.name()}"><!-- --></a> 635 <a name="${prop.name()}"><!-- --></a>
586 <ul class="blockListLast"> 636 <ul class="blockListLast">
587 <li class="blockList"> 637 <li class="blockList">
588 <h4>${modifiers(prop) + linkable(prop.type())} <strong>${prop.name()}</strong></h4> 638 <h4>${prop.name()}</h4>
589 <blockquote><pre>${annotations(prop, '\n')}</pre></blockquote> 639 <h5>Type: ${ modifiers(prop) + linkable(prop.type()) }</h5>
640 <div>${annotations(prop, '<br/>') } </div>
590 <p>${prop.commentText()}</p> 641 <p>${prop.commentText()}</p>
591 </li> 642 </li>
592 </ul> 643 </ul>
593 <% } %> 644 <% } %>
594 </li> 645 </li>
645 <h3>Method Detail</h3> 696 <h3>Method Detail</h3>
646 <% visibleMethods.each { method -> %> 697 <% visibleMethods.each { method -> %>
647 <a name="${nameFromParams(method)}"><!-- --></a> 698 <a name="${nameFromParams(method)}"><!-- --></a>
648 <ul class="blockListLast"> 699 <ul class="blockListLast">
649 <li class="blockList"> 700 <li class="blockList">
650 <h4>${modifiers(method)}${linkable(method.returnType())} <strong>${method.name()}</strong>(${paramsOf(method, false)})</h4> 701 <h4>${method.name()}(${paramsOf(method, false)}) </h4>
651 <blockquote><pre>${annotations(method, '\n')}</pre></blockquote> 702 <h5>Type: ${ modifiers(method) + linkable(method.returnType()) }</h5>
703 <div>${annotations(method, '<br/>') } </div>
652 <p>${method.commentText()}</p> 704 <p>${method.commentText()}</p>
653 </li> 705 </li>
654 </ul> 706 </ul>
655 <% } %> 707 <% } %>
656 </li> 708 </li>
689 <li>Summary:&nbsp;</li> 741 <li>Summary:&nbsp;</li>
690 <% 742 <%
691 if (classDoc.isAnnotationType()) { 743 if (classDoc.isAnnotationType()) {
692 def hasReq = classDoc.fields().any{ isRequired(it, "true") } 744 def hasReq = classDoc.fields().any{ isRequired(it, "true") }
693 def hasOpt = classDoc.fields().any{ isRequired(it, "false") } 745 def hasOpt = classDoc.fields().any{ isRequired(it, "false") }
694 if (hasReq) { %><li><a href="#required_element_summary"><% } %>Required<% if (hasReq) { %></a></li><% } %>&nbsp;&nbsp;&nbsp;<% 746 if (hasReq) { %><li><a href="#required_element_summary"><% } %>Required<% if (hasReq) { %></a></li><% } %>&nbsp;&nbsp;&nbsp;<%
695 if (hasOpt) { %><li><a href="#optional_element_summary"><% } %>Optional<% if (hasOpt) { %></a></li><% } %>&nbsp;&nbsp;&nbsp;<% 747 if (hasOpt) { %><li><a href="#optional_element_summary"><% } %>Optional<% if (hasOpt) { %></a></li><% } %>&nbsp;&nbsp;&nbsp;<%
696 } else { 748 } else {
697 if (visibleNested) { %><li><a href="#nested_summary"><% } %>Nested<% if (visibleNested) { %></a></li><% } %>&nbsp;&nbsp;&nbsp;<% 749 if (visibleNested) { %><li><a href="#nested_summary"><% } %>Nested<% if (visibleNested) { %></a></li><% } %>&nbsp;&nbsp;&nbsp;<%
698 if (classDoc.isEnum()) { 750 if (classDoc.isEnum()) {
699 if (hasEnumConstants) { %><li><a href="#enum_constant_summary"><% } %>Enum constants<% if (hasEnumConstants) { %></a></li><% } %>&nbsp;&nbsp;&nbsp;<% 751 if (hasEnumConstants) { %><li><a href="#enum_constant_summary"><% } %>Enum constants<% if (hasEnumConstants) { %></a></li><% } %>&nbsp;&nbsp;&nbsp;<%
700 } 752 }
701 if (hasFields) { %><li><a href="#field_summary"><% } %>Field<% if (hasFields) { %></a></li><% } %>&nbsp;&nbsp;&nbsp;<% 753 if (hasFields) { %><li><a href="#field_summary"><% } %>Field<% if (hasFields) { %></a></li><% } %>&nbsp;&nbsp;&nbsp;<%
702 if (hasProperties) { %><li><a href="#property_summary">Property</a></li><% } %>&nbsp;&nbsp;&nbsp;<% 754 if (hasProperties) { %><li><a href="#property_summary">Property</a></li><% } %>&nbsp;&nbsp;&nbsp;<%
703 if (classDoc.isClass()) { 755 if (classDoc.isClass()) {
704 if (visibleConstructors) { %><li><a href="#constructor_summary"><% } %>Constructor<% if (visibleConstructors) { %></a></li><% } %>&nbsp;&nbsp;&nbsp;<% 756 if (visibleConstructors) { %><li><a href="#constructor_summary"><% } %>Constructor<% if (visibleConstructors) { %></a></li><% } %>&nbsp;&nbsp;&nbsp;<%
705 } 757 }
706 if (visibleMethods) { %><li><a href="#method_summary"><% } %>Method<% if (visibleMethods) { %></a></li><% } %>&nbsp;&nbsp;&nbsp;<% 758 if (visibleMethods) { %><li><a href="#method_summary"><% } %>Method<% if (visibleMethods) { %></a></li><% } %>&nbsp;&nbsp;&nbsp;<%
707 } 759 }
708 %> 760 %>
709 </ul> 761 </ul>
710 <ul class="subNavList"> 762 <ul class="subNavList">
711 <li>&nbsp;|&nbsp;Detail:&nbsp;</li> 763 <li>&nbsp;|&nbsp;Detail:&nbsp;</li>
712 <% 764 <%
713 if (classDoc.isAnnotationType()) { 765 if (classDoc.isAnnotationType()) {
714 if (hasElements) { %><li><a href="#element_detail"><% } %>Element<% if (hasElements) { %></a></li><% } %>&nbsp;&nbsp;&nbsp;<% 766 if (hasElements) { %><li><a href="#element_detail"><% } %>Element<% if (hasElements) { %></a></li><% } %>&nbsp;&nbsp;&nbsp;<%
715 } else { 767 } else {
716 if (classDoc.isEnum()) { 768 if (classDoc.isEnum()) {
717 if (hasEnumConstants) { %><li><a href="#enum_constant_detail"><% } %>Enum constants<% if (hasEnumConstants) { %></a></li><% } %>&nbsp;&nbsp;&nbsp;<% 769 if (hasEnumConstants) { %><li><a href="#enum_constant_detail"><% } %>Enum constants<% if (hasEnumConstants) { %></a></li><% } %>&nbsp;&nbsp;&nbsp;<%
718 } 770 }
719 if (hasFields) { %><li><a href="#field_detail"><% } %>Field<% if (hasFields) { %></a></li><% } %>&nbsp;&nbsp;&nbsp;<% 771 if (hasFields) { %><li><a href="#field_detail"><% } %>Field<% if (hasFields) { %></a></li><% } %>&nbsp;&nbsp;&nbsp;<%
720 if (hasProperties) { %><li><a href="#prop_detail">Property</a></li><% } %>&nbsp;&nbsp;&nbsp;<% 772 if (hasProperties) { %><li><a href="#prop_detail">Property</a></li><% } %>&nbsp;&nbsp;&nbsp;<%
721 if (classDoc.isClass()) { 773 if (classDoc.isClass()) {
722 if (visibleConstructors) { %><li><a href="#constructor_detail"><% } %>Constructor<% if (visibleConstructors) { %></a></li><% } %>&nbsp;&nbsp;&nbsp;<% 774 if (visibleConstructors) { %><li><a href="#constructor_detail"><% } %>Constructor<% if (visibleConstructors) { %></a></li><% } %>&nbsp;&nbsp;&nbsp;<%
723 } 775 }
724 if (visibleMethods) { %><li><a href="#method_detail"><% } %>Method<% if (visibleMethods) { %></a></li><% } %>&nbsp;&nbsp;&nbsp;<% 776 if (visibleMethods) { %><li><a href="#method_detail"><% } %>Method<% if (visibleMethods) { %></a></li><% } %>&nbsp;&nbsp;&nbsp;<%
725 } 777 }
726 %> 778 %>
727 </ul> 779 </ul>
728 </div> 780 </div>
729 <% if (props.footer) { %><p>${props.footer}</p><% } %> 781 <% if (props.footer) { %><p>${props.footer}</p><% } %>