<!--

     Licensed to the Apache Software Foundation (ASF) under one
     or more contributor license agreements.  See the NOTICE file
     distributed with this work for additional information
     regarding copyright ownership.  The ASF licenses this file
     to you under the Apache License, Version 2.0 (the
     "License"); you may not use this file except in compliance
     with the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing,
     software distributed under the License is distributed on an
     "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
     KIND, either express or implied.  See the License for the
     specific language governing permissions and limitations
     under the License.

-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%
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 encode = { org.codehaus.groovy.tools.groovydoc.SimpleGroovyClassDoc.encodeAngleBrackets(it) }
def isVisible = { it.isPublic() || (it.isProtected() && props.protectedScope == 'true') || (!it.isProtected() && !it.isPrivate() && props.packageScope == 'true') || props.privateScope == 'true' }
def paramsOf = { n, classDoc, boolean brief -> n.parameters().collect{ param -> encode(param.isTypeAvailable()?param.type().typeName():param.typeName()) }.join(", ") }
def nameFromParams = { n -> n.name() + '(' + n.parameters().collect{ param -> param.isTypeAvailable()?param.type().qualifiedTypeName():param.typeName() }.join(', ') + ')' }
%>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=${props.charset}">
        <!-- Generated by groovydoc<% if (props.versionStamp != 'false') { %> (${GroovySystem.version})<% } %><% if (props.timestamp != 'false') { %> on ${new Date()}<% } %> -->
        <title>${title}</title>
        <% if (props.timestamp != 'false') { %><meta name="date" content="${new java.text.SimpleDateFormat('yyyy-MM-dd').format(new Date())}"><% } %>
        <link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
    </head>
<body class="center">
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
    parent.document.title="${title}";
}
//-->
</script>
<noscript>
    <div>JavaScript is disabled on your browser.</div>
</noscript>

<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
    <!--   -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
    <!--   -->
</a>
    <ul class="navList" title="Navigation">
        <li><a href="overview-summary.html">Overview</a></li>
        <li>Package</li>
        <li>Class</li>
        <li><a href="deprecated-list.html">Deprecated</a></li>
        <li class="navBarCell1Rev">Index</li>
        <li><a href="help-doc.html">Help</a></li>
    </ul>
</div>
<div class="subNav">
    <ul class="navList">
        <li><a href="./index.html?index-all.html" target="_top">Frames</a></li>
        <li><a href="index-all.html" target="_top">No Frames</a></li>
    </ul>
    <a name="skip-navbar_top">
        <!--   -->
    </a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="contentContainer">
<% letters.each { letter -> %>
<a href="#_${letter}_">${letter}</a>
<% } %>

<%
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)) {
            if (upperLower.contains(classDoc.name()[0])) {
                def packageOrInnerName = classDoc.qualifiedTypeName() - ('.' + classDoc.simpleTypeName())
                def packageName = classDoc.qualifiedTypeName() - ('.' + classDoc.name())
                def desc = classDoc.typeDescription + ' in '
                entries.put(classLower, """
<dt><span class="strong"><a href="${classDoc.fullPathName}.html" title="${desc + packageOrInnerName}">${classDoc.name()}</a></span> - ${desc}<a href="./${packageName.replace('.', '/')}/package-summary.html">${packageName}</a>
</dt><dd><div class="block">${classDoc.firstSentenceCommentText()}</div></dd>""")
            }
            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] = """
<dt><span class="strong"><a href="${classDoc.fullPathName}.html#${nameFromParams(e)}" title="${desc + classDoc.name()}">${e.name()}(${paramsOf(e, classDoc, true)})</a></span> - ${desc}<a href="${classDoc.fullPathName}.html">${classDoc.name()}</a>
</dt><dd> <div class="block">${e.firstSentenceCommentText()}</div></dd>"""
                            break
                        case 'Field':
                        case 'Property':
                        case 'Enum Constant':
                            entries[e.name().toLowerCase()+'_'+classLower] = """
<dt><span class="strong"><a href="${classDoc.fullPathName}.html#${e.name()}" title="${desc + classDoc.name()}">${e.name()}</a></span> - ${desc}<a href="${classDoc.fullPathName}.html">${classDoc.name()}</a>
</dt><dd> <div class="block">${e.firstSentenceCommentText()}</div></dd>"""
                            break
                        }
                    }
                }
            }
        }
    }
%>
<a name="_${letter}_"><!-- --></a>
<h2 class="title">${letter}</h2>
<dl>
<%
    entries.each{ k, v ->
        %>${v}<%
    }
%>
</dl>

    <% } %>
</div>

<% letters.each { letter -> %>
<a href="#_${letter}_">${letter}</a>
<% } %>

<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
    <!--   -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
    <!--   -->
</a>
    <ul class="navList" title="Navigation">
        <li><a href="overview-summary.html">Overview</a></li>
        <li>Package</li>
        <li>Class</li>
        <li><a href="deprecated-list.html">Deprecated</a></li>
        <li class="navBarCell1Rev">Index</li>
        <li><a href="help-doc.html">Help</a></li>
    </ul>
</div>
<div class="subNav">
    <ul class="navList">
        <li><a href="./index.html?index-all.html" target="_top">Frames</a></li>
        <li><a href="index-all.html" target="_top">No Frames</a></li>
    </ul>
    <div class="aboutLanguage"><em>${props['footer']?:""}</em></div>
    <a name="skip-navbar_bottom">
        <!--   -->
    </a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
