org.codehaus.groovy.tools.groovydoc.gstringTemplates.topLevel.index-all.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of groovy-all Show documentation
Show all versions of groovy-all Show documentation
Groovy: A powerful, dynamic language for the JVM
<%
def subtitle = 'Index'
def title = subtitle + (props.windowTitle ? " (${props.windowTitle})" : "")
def letters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_' as char[]
def elementTypes = [
"Method" : { it.methods() },
"Constructor" : { it.constructors() },
"Field" : { it.fields() },
"Property" : { it.properties() },
"Enum Constant" : { it.enumConstants() },
]
def isVisible = { !it.isPrivate() || props.privateScope }
def paramsOf = { n, classDoc, boolean brief -> n.parameters().collect{ param -> param.isTypeAvailable()?param.type().name():param.typeName() }.join(", ") }
def nameFromParams = { n -> n.name() + '(' + n.parameters().collect{ param -> param.isTypeAvailable()?param.type().qualifiedTypeName():param.typeName() }.join(', ') + ')' }
%>
${title}
Overview
Package
Class
Deprecated
Index
Help
<% if (props.header) { %>${props.header}<% } %>
PREV
NEXT
FRAMES
NO FRAMES
<% letters.each { letter -> %>
${letter}
<% } %>
<%
letters.each { letter ->
def entries = [] as TreeMap
def upperLower = "$letter${letter.toLowerCase()}"
for (classDoc in rootDoc.classes()) {
def classLower = classDoc.name().toLowerCase()
if (isVisible(classDoc) && upperLower.contains(classDoc.name()[0])) {
def packageOrInnerName = classDoc.qualifiedTypeName() - ('.' + classDoc.simpleTypeName())
def packageName = classDoc.qualifiedTypeName() - ('.' + classDoc.name())
def desc = classDoc.typeDescription + ' in '
entries[classLower] = """
${classDoc.name()} - ${desc}${packageName}
${classDoc.firstSentenceCommentText()} """
}
elementTypes.each { k, v ->
def elements = v(classDoc)
elements.each { e ->
if (isVisible(e) && upperLower.contains(e.name()[0])) {
def packageOrInnerName = classDoc.qualifiedTypeName() - ('.' + classDoc.simpleTypeName())
def packageName = classDoc.qualifiedTypeName() - ('.' + classDoc.name())
def desc = k + ' in '
switch (k) {
case 'Method':
case 'Constructor':
entries[e.name().toLowerCase()+'_'+classLower] = """
${e.name()}(${paramsOf(e, classDoc, true)}) - ${desc}${classDoc.name()}
${e.firstSentenceCommentText()} """
break
case 'Field':
case 'Property':
case 'Enum Constant':
entries[e.name().toLowerCase()+'_'+classLower] = """
${e.name()} - ${desc}${classDoc.name()}
${e.firstSentenceCommentText()} """
break
}
}
}
}
}
%>
${letter}
<%
entries.each{ k, v ->
%>${v}<%
}
%>
<% } %>
${props['footer']?:""}