<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%
def subtitle = 'Deprecated API'
def title = subtitle + (props.windowTitle ? " (${props.windowTitle})" : "")
// TODO enable errors(), enums() etc in SimpleGroovyPackageDoc then replace closures below
def classTypes = [
    "Interface" : { it.isInterface() && it.isDeprecated() },
    "Class" : { it.isClass() && !it.parentClasses*.qualifiedTypeName().contains('java.lang.Throwable') && it.isDeprecated() },
    "Enum" : { it.isEnum() && it.isDeprecated() },
    "Exception" : { it.isClass() && it.parentClasses*.qualifiedTypeName().contains('java.lang.Exception') && it.isDeprecated() },
    "Error" : { it.isClass() && it.parentClasses*.qualifiedTypeName().contains('java.lang.Error') && it.isDeprecated() },
    "Annotation Type" : { it.isAnnotationType() && it.isDeprecated() }
]
// TODO fields, properties, enum constants
def methodTypes = [
    "Method" : { it.methods().findAll{ it.isDeprecated() } },
    "Constructor" : { it.constructors().findAll{ it.isDeprecated() } },
]
def pluralize = { name -> name + (name.endsWith("s") ? "es" : "s") }
def dolink = { t, classDoc, boolean b ->
    if (!t || t instanceof String) {
        return classDoc.getDocUrl(t, b)
    }
    if (t instanceof org.codehaus.groovy.tools.groovydoc.SimpleGroovyClassDoc) {
        return "<a href='" + classDoc.relativeRootPath + t.fullPathName + ".html'>" + (b ? t.qualifiedTypeName() : t.name()) + "</a>"
    }
    return classDoc.getDocUrl(t.qualifiedTypeName(), b)
}
def linkable = { t, classDoc -> dolink(t, classDoc, false) }
def modifiersBrief = { t ->
    (t.isPrivate()?"private&nbsp;":"") +
    (t.isProtected()?"protected&nbsp;":"") +
    (t.isStatic()?"static&nbsp;":"")
}
def paramsOf = { n, classDoc, boolean brief -> n.parameters().collect{ param -> (brief?'':annotations(param, ' ')) + linkable(param.isTypeAvailable()?param.type():param.typeName(), classDoc) + ' ' + param.name() + (param.defaultValue() ? " = " + param.defaultValue():"") }.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 (${GroovySystem.version}) on <% new Date() %> -->
<title>${title}</title>
<meta name="date" content="${new Date().format('yyyy-MM-dd')}">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<link href="groovy.ico" type="image/x-icon" rel="shortcut icon">
<link href="groovy.ico" type="image/x-icon" rel="icon">

<script type="text/javascript">
function windowTitle()
{
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="${title}";
    }
}
</script>
<noscript>
</noscript>

</head><body onload="windowTitle();" bgcolor="white">
<hr>

<!-- ========= START OF TOP NAVBAR ======= -->
<a name="navbar_top"><!-- --></a>
<table summary="" width="100%" border="0" cellpadding="1" cellspacing="0">
<tbody><tr>
<td colspan="2" class="NavBarCell1" bgcolor="#eeeeff">
<a name="navbar_top_firstrow"><!-- --></a>
<table summary="" border="0" cellpadding="0" cellspacing="3">
  <tbody><tr valign="top" align="center">
  <td class="NavBarCell1" bgcolor="#eeeeff">    <a href="overview-summary.html"><font class="NavBarFont1"><b>Overview</b></font></a>&nbsp;</td>
  <td class="NavBarCell1" bgcolor="#eeeeff">    <font class="NavBarFont1">Package</font>&nbsp;</td>
  <td class="NavBarCell1" bgcolor="#eeeeff">    <font class="NavBarFont1">Class</font>&nbsp;</td>
  <!--
  <td class="NavBarCell1" bgcolor="#eeeeff">    <a href="overview-tree.html"><font class="NavBarFont1"><b>Tree</b></font></a>&nbsp;</td>
  -->
  <td class="NavBarCell1Rev" bgcolor="#ffffff"> &nbsp;<font class="NavBarFont1Rev"><b>Deprecated</b></font>&nbsp;</td>
  <td class="NavBarCell1" bgcolor="#eeeeff">    <a href="index-all.html"><font class="NavBarFont1"><b>Index</b></font></a>&nbsp;</td>
  <td class="NavBarCell1" bgcolor="#eeeeff">    <a href="help-doc.html"><font class="NavBarFont1"><b>Help</b></font></a>&nbsp;</td>
  </tr>
</tbody></table>
</td>
<td rowspan="3" valign="top" align="right"><em>
    <% if (props.header) { %><b>${props.header}</b><% } %>
</em>
</td>
</tr>

<tr>
<td class="NavBarCell2" bgcolor="white"><font size="-2">
&nbsp;PREV&nbsp;
&nbsp;NEXT</font></td>
<td class="NavBarCell2" bgcolor="white"><font size="-2">
  <a href="index.html?deprecated-list.html" target="_top"><b>FRAMES</b></a>  &nbsp;
&nbsp;<a href="deprecated-list.html" target="_top"><b>NO FRAMES</b></a>  &nbsp;
&nbsp;<script type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="allclasses-frame.html"><B>All Classes</B></A>');
  }
  //-->
</script>
<noscript>
  <A HREF="allclasses-frame.html"><B>All Classes</B></A>
</noscript>

</font></td>
</tr>
</tbody></table>
<!-- ========= END OF TOP NAVBAR ========= -->

<hr>
<center>
<h1>Deprecated API</h1>
</center>
<hr>

<%
def isVisible = { it.isPublic() || (it.isProtected() && props.protectedScope == 'true') || (!it.isProtected() && !it.isPrivate() && props.packageScope == 'true') || props.privateScope == 'true' }
classTypes.each{ k, v ->
    if (rootDoc.classes().any{ isVisible(it) && v(it) }) {
%>

<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2" CLASS="ClassHeadingFont">
<B>${pluralize(k)}</B></FONT></TH>
</TR>
<FONT CLASS="FrameItemFont"><%
    for (classDoc in rootDoc.classes().findAll{ isVisible(it) && v(it) }) {
        def packageOrInnerName = classDoc.qualifiedTypeName() - ('.' + classDoc.simpleTypeName())
        %><TR BGCOLOR="white" CLASS="TableRowColor">
        <TD>
            <CODE><b><a href="${classDoc.fullPathName}.html" title="${k.toLowerCase()} in ${packageOrInnerName}" target="classFrame"><%
            if (classDoc.isInterface()) { %><I><% }
            %>${classDoc.name()}<%
            if (classDoc.isInterface()) { %></I><% }
            %></a></b></CODE>
            <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            ${classDoc.firstSentenceCommentText()}
        </TD>
        </TR><%
    }
%></FONT></TD>
</TR>
</TABLE><br>
<% } %>
<% } %>

<%
methodTypes.each{ k, v ->
    if (rootDoc.classes().any{ isVisible(it) && v(it) }) {
%>

<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2" CLASS="ClassHeadingFont">
<B>${pluralize(k)}</B></FONT></TH>
</TR>

<FONT CLASS="FrameItemFont"><%
    for (classDoc in rootDoc.classes().findAll{ isVisible(it) && v(it) }) {
        for (methOrConstr in v(classDoc)) {
            %><TR BGCOLOR="white" CLASS="TableRowColor">
            <TD>
                <CODE><b><a href="${classDoc.fullPathName}.html#${nameFromParams(methOrConstr)}">${classDoc.name()}#${methOrConstr.name()}</a></b>(${paramsOf(methOrConstr, classDoc, true)})</CODE>
                <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                ${methOrConstr.firstSentenceCommentText()}
            </TD>
            </TR><%
        }
    }
%></FONT></TD>
</TR>
</TABLE><br>
<% } %>
<% } %>

<hr>
<p>${props['footer']?:""}</p>
<hr>

</body></html>
