ekorate-templates.0.13.4.source-code.annotation-doc.vm Maven / Gradle / Ivy
#foreach ($m in ${model.values()})
#set ($key = $m.name)
#set ($label = $m.name)
#if ($key.contains("Application"))
#set ($label = $name.replaceAll("Application", ""))
#set ($key = $key.toLowerCase().replaceAll("application", ""))
#end
#if ($key.contains("Build"))
#set ($label = $anme.replaceAll("Build", ""))
#set ($key = $key.toLowerCase().replaceAll("build", ""))
#end
#if ($key.contains("Halkyon"))
#set ($label = $anme.replaceAll("Halkyon", ""))
#set ($key = $key.toLowerCase().replaceAll("halkyon", ""))
#end
#foreach ($method in ${m.getMethods()})
#set ($name = $method.getName())
##
## Name
##
#set ($kebab = "")
#set ($parts = $name.split("(?=\p{Upper})"))
#foreach ($part in $parts)
#set ($kebab = $kebab + $part.toLowerCase() + "-")
#end
#set ($klength = $kebab.length())
#set ($klength = $klength - 1)
#set ($name = $kebab.substring(0, $klength))
##
## Type
##
#set ($type = $method.getReturnType().toString())
#set ($tindex = $type.lastIndexOf('.'))
#set ($tindex = $tindex + 1)
#set ($type = $type.substring($tindex))
##
## Default Value
##
#set ($default = " ")
#foreach ($attributeKey in ${method.getAttributes().keySet()})
#if ($attributeKey.getName().equals("DEFAULT_VALUE"))
#set ($default = $method.getAttribute($attributeKey))
#set ($default = $default.toString())
#if ($default.toString().contains('@'))
#set ($default = $default.substring(1))
#set ($dindex = $default.lastIndexOf('.'))
#set ($dindex = $dindex + 1)
#set ($default = $default.substring($dindex))
#set ($default = "( see " + $default + " )")
#end
#end
#end
##
## Description
##
#set ($description = "")
#set ($comments = $method.comments)
#foreach ($comment in $comments)
#if ($comment.startsWith("@"))
#set ($description = $description)
#elseif ($description.isEmpty())
#set ($description = $comment)
#else
#set ($description = $description + " " + $comment)
#end
#end
##
## Filter out Enums
##
#if (!$m.isEnum())
##
## Header
##
#if (!$key.equals($lastkey))
$label
| Property | Type | Description | Default Value |
|-
#end
#set ($lastkey=$key)
##
## Line
##
#if ($m.name.contains("Application") || $m.name.contains("Halkyon") || $m.name.contains("Build"))
| dekorate.${key}.$name | $type | $description | $default |
#else
| $name | $type | $description | $default |
#end
#end
#end
#end
© 2015 - 2025 Weber Informatics LLC | Privacy Policy