org.codehaus.groovy.tools.groovydoc.gstringTemplates.packageLevel.package-summary.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 isVisible = { it.isPublic() || (it.isProtected() && props.protectedScope == 'true') || (!it.isProtected() && !it.isPrivate() && props.packageScope == 'true') || props.privateScope == 'true' }
def title = packageDoc.nameWithDots() + (props.windowTitle ? " ($props.windowTitle)" : "")
// TODO enable errors(), enums() etc in SimpleGroovyPackageDoc then replace closures below
def classTypes = [
"Interface" : { it.isInterface() },
"Trait" : { it.isTrait() },
"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() },
"Script" : { it.isScript() }
]
%>
${title}
Package ${packageDoc.nameWithDots()}
<% if (!packageDoc.description().trim().isEmpty()) { %>
Package ${packageDoc.nameWithDots()} Description
${packageDoc.description()}
<% } %>
<%
classTypes.each { k, v ->
if (packageDoc.allClasses().any{ isVisible(it) && v(it) }) {
%>
-
${k} Summary
${k}
Description
<%
for (classDoc in packageDoc.allClasses().findAll{ isVisible(it) && v(it) }) {
def i = 0
%>
${classDoc.name()}
${classDoc.firstSentenceCommentText()}
<% } %>
<% } %>
<% } %>