<!--

     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 title = "Class Hierarchy" + (props.windowTitle ? " (${props.windowTitle})" : "") %>
<html>
<head>
<title>${title}</title>
<meta http-equiv="Content-Type" content="text/html; charset=${props.charset}">
<meta name="keywords" content="Class Hierarchy">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<% if (props.additionalStylesheets) props.additionalStylesheets.tokenize(',').each { __ss -> %>
<link rel="stylesheet" type="text/css" href="${__ss.trim()}">
<% } %>
<link href="groovy.ico" type="image/x-icon" rel="shortcut icon">
<link href="groovy.ico" type="image/x-icon" rel="icon">
<% if (props.syntaxHighlighter == 'prism') { def __p = '' %>
    <% if (props.theme == 'dark') { %>
    <link rel="stylesheet" type="text/css" href="${__p}prism-dark.min.css">
    <% } else if (props.theme == 'light') { %>
    <link rel="stylesheet" type="text/css" href="${__p}prism.min.css">
    <% } else { %>
    <link rel="stylesheet" type="text/css" href="${__p}prism.min.css" media="(prefers-color-scheme: light)">
    <link rel="stylesheet" type="text/css" href="${__p}prism-dark.min.css" media="(prefers-color-scheme: dark)">
    <% } %>
<script src="${__p}prism.js"></script>
<script src="${__p}prism-groovy.min.js"></script>
<script src="${__p}prism-java.min.js"></script>
<script src="${__p}prism-json.min.js"></script>
<script src="${__p}prism-yaml.min.js"></script>
<script src="${__p}prism-toml.min.js"></script>
<script src="${__p}prism-sql.min.js"></script>
<script src="${__p}prism-csv.min.js"></script>
<script src="${__p}prism-markdown.min.js"></script>
<script src="${__p}prism-xml-doc.min.js"></script>
<script src="${__p}prism-javadoclike.min.js"></script>
<% } %>
</head>
<body>
<!-- ========= 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 class="navBarCell1Rev">Tree</li>
    <% if (props.noDeprecatedList != 'true') { %><li><a href="deprecated-list.html">Deprecated</a></li><% } %>
    <% if (props.noIndex != 'true') { %><li><a href="index-all.html">Index</a></li><% } %>
    <% if (props.noHelp != 'true') { %><li><a href="help-doc.html">Help</a></li><% } %>
</ul>
</div>
<div class="subNav">
    <ul class="navList">
        <li><a href="index.html?overview-tree.html" target="_top">Frames</a></li>
        <li><a href="overview-tree.html" target="_top">No Frames</a></li>
    </ul>
    <a name="skip-navbar_top"><!-- --></a>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<%
    def tree = org.codehaus.groovy.tools.groovydoc.ClassTree
    def classRoot = tree.buildClassTree(rootDoc.classes())
    def interfaceRoot = tree.buildInterfaceTree(rootDoc.classes())
    def hasClasses = !classRoot.children.isEmpty()
    def hasInterfaces = !interfaceRoot.children.isEmpty()
    def relRoot = ''
    def labelFor = { cd ->
        if (cd == null) return 'class'
        if (cd.isTrait()) return 'trait'
        if (cd.isInterface()) return 'interface'
        if (cd.isAnnotationType()) return 'annotation'
        if (cd.isEnum()) return 'enum'
        return 'class'
    }
    def renderNode
    renderNode = { node ->
        def cd = node.classDoc
        def label = '<li type="circle">'
        if (cd != null) {
            def pkg = cd.containingPackage()?.nameWithDots() ?: ''
            label += "${labelFor(cd)} <a href=\"${relRoot}${cd.fullPathName}.html\" title=\"${labelFor(cd)} in ${pkg}\"><strong>${cd.qualifiedTypeName()}</strong></a>"
        } else {
            label += "class ${node.qualifiedName}"
        }
        def kids = node.children
        if (!kids.isEmpty()) {
            label += '<ul>'
            kids.each { label += renderNode(it) }
            label += '</ul>'
        }
        label += '</li>'
        return label
    }
%>
<div class="header">
    <h1 class="title">Hierarchy For All Packages</h1>
    <span class="packageHierarchyLabel">Package Hierarchies:</span>
    <ul class="horizontal">
<% rootDoc.specifiedPackages().eachWithIndex { packageDoc, i -> %>
        <li><a href="${packageDoc.name()}/package-tree.html">${packageDoc.nameWithDots()}</a>${i < rootDoc.specifiedPackages().length - 1 ? ',' : ''}</li>
<% } %>
    </ul>
</div>
<div class="contentContainer">
<% if (hasClasses) { %>
    <h2 class="title">Class Hierarchy</h2>
    <ul>
        <li type="circle">class <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class in java.lang" target="_blank"><strong>java.lang.Object</strong></a>
            <ul>
<%  classRoot.children.each { out << renderNode(it) } %>
            </ul>
        </li>
    </ul>
<% } %>
<% if (hasInterfaces) { %>
    <h2 class="title">Interface Hierarchy</h2>
    <ul>
<%  interfaceRoot.children.each { out << renderNode(it) } %>
    </ul>
<% } %>
<% if (!hasClasses && !hasInterfaces) { %>
    <p>No documented types to display.</p>
<% } %>
</div>
<!-- ======= 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 class="navBarCell1Rev">Tree</li>
    <% if (props.noDeprecatedList != 'true') { %><li><a href="deprecated-list.html">Deprecated</a></li><% } %>
    <% if (props.noIndex != 'true') { %><li><a href="index-all.html">Index</a></li><% } %>
    <% if (props.noHelp != 'true') { %><li><a href="help-doc.html">Help</a></li><% } %>
</ul>
</div>
<div class="subNav">
    <ul class="navList">
        <li><a href="index.html?overview-tree.html" target="_top">Frames</a></li>
        <li><a href="overview-tree.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>
