All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.codehaus.groovy.tools.groovydoc.gstringTemplates.topLevel.deprecated-list.html Maven / Gradle / Ivy

There is a newer version: 3.0.22
Show newest version

<%
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 "" + (b ? t.qualifiedTypeName() : t.name()) + ""
    }
    return classDoc.getDocUrl(t.qualifiedTypeName(), b)
}
def linkable = { t, classDoc -> dolink(t, classDoc, false) }
def modifiersBrief = { t ->
    (t.isPrivate()?"private ":"") +
    (t.isProtected()?"protected ":"") +
    (t.isStatic()?"static ":"")
}
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(', ') + ')' }

%>



${title}










<% if (props.header) { %>${props.header}<% } %>

Deprecated API


<% classTypes.each{ k, v -> if (rootDoc.classes().any{ v(it) }) { %> <% for (classDoc in rootDoc.classes()) { if (v(classDoc)) { def packageOrInnerName = classDoc.qualifiedTypeName() - ('.' + classDoc.simpleTypeName()) %><% } } %>
${pluralize(k)}
<% if (classDoc.isInterface()) { %><% } %>${classDoc.name()}<% if (classDoc.isInterface()) { %><% } %>
      ${classDoc.firstSentenceCommentText()}

<% } %> <% } %> <% methodTypes.each{ k, v -> if (rootDoc.classes().any{ v(it) }) { %> <% for (classDoc in rootDoc.classes()) { if (v(classDoc)) { for (methOrConstr in v(classDoc)) { %><% } } } %>
${pluralize(k)}
${classDoc.name()}#${methOrConstr.name()}(${paramsOf(methOrConstr, classDoc, true)})
      ${methOrConstr.firstSentenceCommentText()}

<% } %> <% } %>

${props['footer']?:""}






© 2015 - 2024 Weber Informatics LLC | Privacy Policy