org.codehaus.groovy.tools.groovydoc.gstringTemplates.packageLevel.package-frame.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
${packageDoc.nameWithDots()}
<%
// TODO enable errors(), enums() etc in SimpleGroovyPackageDoc then replace closures below
def classTypes = [
"Interface" : { it.isInterface() },
"Class" : { it.isClass() && !it.parentClasses*.qualifiedTypeName().contains('java.lang.Throwable') },
"Enum" : { it.isEnum() },
"Exception" : { it.isClass() && it.parentClasses*.qualifiedTypeName().contains('java.lang.Exception') },
"Error" : { it.isClass() && it.parentClasses*.qualifiedTypeName().contains('java.lang.Error') },
"Annotation Type" : { it.isAnnotationType() }
]
def pluralize = { name -> name + (name.endsWith("s") ? "es" : "s") }
%>
${packageDoc.nameWithDots()}
<%
classTypes.each{ k, v ->
if (packageDoc.allClasses().any{ v(it) }) {
%>
${pluralize(k)}
<%
for (classDoc in packageDoc.allClasses()) {
if (v(classDoc)) {
%>
<%
if (classDoc.isInterface()) { %><% }
%>${classDoc.name()}<%
if (classDoc.isInterface()) { %><% }
%><%
}
}
%>
<% } %>
<% } %>