Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312
  1. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  2. <!--
  3. The Apache Software License, Version 1.1
  4. Copyright (c) 2002 The Apache Software Foundation. All rights
  5. reserved.
  6. Redistribution and use in source and binary forms, with or without
  7. modification, are permitted provided that the following conditions
  8. are met:
  9. 1. Redistributions of source code must retain the above copyright
  10. notice, this list of conditions and the following disclaimer.
  11. 2. Redistributions in binary form must reproduce the above copyright
  12. notice, this list of conditions and the following disclaimer in
  13. the documentation and/or other materials provided with the
  14. distribution.
  15. 3. The end-user documentation included with the redistribution, if
  16. any, must include the following acknowlegement:
  17. "This product includes software developed by the
  18. Apache Software Foundation (http://www.apache.org/)."
  19. Alternately, this acknowlegement may appear in the software itself,
  20. if and wherever such third-party acknowlegements normally appear.
  21. 4. The names "The Jakarta Project", "Ant", and "Apache Software
  22. Foundation" must not be used to endorse or promote products derived
  23. from this software without prior written permission. For written
  24. permission, please contact apache@apache.org.
  25. 5. Products derived from this software may not be called "Apache"
  26. nor may "Apache" appear in their names without prior written
  27. permission of the Apache Group.
  28. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  29. WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  30. OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  31. DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  32. ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  33. SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  34. LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  35. USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  36. ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  37. OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  38. OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  39. SUCH DAMAGE.
  40. ====================================================================
  41. This software consists of voluntary contributions made by many
  42. individuals on behalf of the Apache Software Foundation. For more
  43. information on the Apache Software Foundation, please see
  44. <http://www.apache.org/>.
  45. -->
  46. <xsl:output method="html" indent="yes"/>
  47. <xsl:template match="JDepend">
  48. <html>
  49. <head>
  50. <title>JDepend Analysis</title>
  51. <style type="text/css">
  52. body {
  53. font:normal 68% verdana,arial,helvetica;
  54. color:#000000;
  55. }
  56. table tr td, tr th {
  57. font-size: 68%;
  58. }
  59. table.details tr th{
  60. font-weight: bold;
  61. text-align:left;
  62. background:#a6caf0;
  63. }
  64. table.details tr td{
  65. background:#eeeee0;
  66. }
  67. p {
  68. line-height:1.5em;
  69. margin-top:0.5em; margin-bottom:1.0em;
  70. margin-left:2em;
  71. margin-right:2em;
  72. }
  73. h1 {
  74. margin: 0px 0px 5px; font: 165% verdana,arial,helvetica
  75. }
  76. h2 {
  77. margin-top: 1em; margin-bottom: 0.5em; font: bold 125% verdana,arial,helvetica
  78. }
  79. h3 {
  80. margin-bottom: 0.5em; font: bold 115% verdana,arial,helvetica
  81. }
  82. h4 {
  83. margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica
  84. }
  85. h5 {
  86. margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica
  87. }
  88. h6 {
  89. margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica
  90. }
  91. .Error {
  92. font-weight:bold; color:red;
  93. }
  94. .Failure {
  95. font-weight:bold; color:purple;
  96. }
  97. .Properties {
  98. text-align:right;
  99. }
  100. </style>
  101. </head>
  102. <body>
  103. <!--h1>JDepend Report</h1>
  104. <ul>
  105. <xsl:for-each select="./Packages/Package">
  106. <xsl:sort select="@name"/>
  107. <li><xsl:value-of select="@name"/></li>
  108. </xsl:for-each>
  109. </ul-->
  110. <h1><a name="top">JDepend Analysis</a></h1>
  111. <p align="right">Designed for use with <a href="http://www.clarkware.com/software/JDepend.html">JDepend</a> and <a href="http://jakarta.apache.org">Ant</a>.</p>
  112. <hr size="2" />
  113. <table width="100%"><tr><td>
  114. <a name="NVsummary"><h2>Summary</h2></a>
  115. </td><td align="right">
  116. [<a href="#NVsummary">summary</a>]
  117. [<a href="#NVpackages">packages</a>]
  118. [<a href="#NVcycles">cycles</a>]
  119. [<a href="#NVexplanations">explanations</a>]
  120. </td></tr></table>
  121. <table width="100%" class="details">
  122. <tr>
  123. <th>Package</th>
  124. <th>Total Classes</th>
  125. <th><a href="#EXnumber">Abstract Classes</a></th>
  126. <th><a href="#EXnumber">Concrete Classes</a></th>
  127. <th><a href="#EXafferent">Afferent Couplings</a></th>
  128. <th><a href="#EXefferent">Efferent Couplings</a></th>
  129. <th><a href="#EXabstractness">Abstractness</a></th>
  130. <th><a href="#EXinstability">Instability</a></th>
  131. <th><a href="#EXdistance">Distance</a></th>
  132. </tr>
  133. <xsl:for-each select="./Packages/Package">
  134. <xsl:if test="count(error) = 0">
  135. <tr>
  136. <td align="left">
  137. <a>
  138. <xsl:attribute name="href">#PK<xsl:value-of select="@name"/>
  139. </xsl:attribute>
  140. <xsl:value-of select="@name"/>
  141. </a>
  142. </td>
  143. <td align="right"><xsl:value-of select="Stats/TotalClasses"/></td>
  144. <td align="right"><xsl:value-of select="Stats/AbstractClasses"/></td>
  145. <td align="right"><xsl:value-of select="Stats/ConcreteClasses"/></td>
  146. <td align="right"><xsl:value-of select="Stats/Ca"/></td>
  147. <td align="right"><xsl:value-of select="Stats/Ce"/></td>
  148. <td align="right"><xsl:value-of select="Stats/A"/></td>
  149. <td align="right"><xsl:value-of select="Stats/I"/></td>
  150. <td align="right"><xsl:value-of select="Stats/D"/></td>
  151. </tr>
  152. </xsl:if>
  153. </xsl:for-each>
  154. <xsl:for-each select="./Packages/Package">
  155. <xsl:if test="count(error) &gt; 0">
  156. <tr>
  157. <td align="left">
  158. <xsl:value-of select="@name"/>
  159. </td>
  160. <td align="left" colspan="8"><xsl:value-of select="error"/></td>
  161. </tr>
  162. </xsl:if>
  163. </xsl:for-each>
  164. </table>
  165. <table width="100%"><tr><td>
  166. <a name="NVpackages"><h2>Packages</h2></a>
  167. </td><td align="right">
  168. [<a href="#NVsummary">summary</a>]
  169. [<a href="#NVpackages">packages</a>]
  170. [<a href="#NVcycles">cycles</a>]
  171. [<a href="#NVexplanations">explanations</a>]
  172. </td></tr></table>
  173. <xsl:for-each select="./Packages/Package">
  174. <xsl:if test="count(error) = 0">
  175. <h3><a><xsl:attribute name="name">PK<xsl:value-of select="@name"/></xsl:attribute>
  176. <xsl:value-of select="@name"/></a></h3>
  177. <table width="100%"><tr>
  178. <td><a href="#EXafferent">Afferent Couplings</a>: <xsl:value-of select="Stats/Ca"/></td>
  179. <td><a href="#EXefferent">Efferent Couplings</a>: <xsl:value-of select="Stats/Ce"/></td>
  180. <td><a href="#EXabstractness">Abstractness</a>: <xsl:value-of select="Stats/A"/></td>
  181. <td><a href="#EXinstability">Instability</a>: <xsl:value-of select="Stats/I"/></td>
  182. <td><a href="#EXdistance">Distance</a>: <xsl:value-of select="Stats/D"/></td>
  183. </tr></table>
  184. <table width="100%" class="details">
  185. <tr>
  186. <th>Abstract Classes</th>
  187. <th>Concrete Classes</th>
  188. <th>Used by Packages</th>
  189. <th>Uses Packages</th>
  190. </tr>
  191. <tr>
  192. <td valign="top" width="25%">
  193. <xsl:if test="count(AbstractClasses/Class)=0">
  194. <i>None</i>
  195. </xsl:if>
  196. <xsl:for-each select="AbstractClasses/Class">
  197. <xsl:value-of select="node()"/><br/>
  198. </xsl:for-each>
  199. </td>
  200. <td valign="top" width="25%">
  201. <xsl:if test="count(ConcreteClasses/Class)=0">
  202. <i>None</i>
  203. </xsl:if>
  204. <xsl:for-each select="ConcreteClasses/Class">
  205. <xsl:value-of select="node()"/><br/>
  206. </xsl:for-each>
  207. </td>
  208. <td valign="top" width="25%">
  209. <xsl:if test="count(UsedBy/Package)=0">
  210. <i>None</i>
  211. </xsl:if>
  212. <xsl:for-each select="UsedBy/Package">
  213. <a>
  214. <xsl:attribute name="href">#PK<xsl:value-of select="node()"/></xsl:attribute>
  215. <xsl:value-of select="node()"/>
  216. </a><br/>
  217. </xsl:for-each>
  218. </td>
  219. <td valign="top" width="25%">
  220. <xsl:if test="count(DependsUpon/Package)=0">
  221. <i>None</i>
  222. </xsl:if>
  223. <xsl:for-each select="DependsUpon/Package">
  224. <a>
  225. <xsl:attribute name="href">#PK<xsl:value-of select="node()"/></xsl:attribute>
  226. <xsl:value-of select="node()"/>
  227. </a><br/>
  228. </xsl:for-each>
  229. </td>
  230. </tr>
  231. </table>
  232. </xsl:if>
  233. </xsl:for-each>
  234. <table width="100%"><tr><td>
  235. <a name="NVcycles"><h2>Cycles</h2></a>
  236. </td><td align="right">
  237. [<a href="#NVsummary">summary</a>]
  238. [<a href="#NVpackages">packages</a>]
  239. [<a href="#NVcycles">cycles</a>]
  240. [<a href="#NVexplanations">explanations</a>]
  241. </td></tr></table>
  242. <xsl:if test="count(Cycles/Package) = 0">
  243. <p>There are no cyclic dependancies.</p>
  244. </xsl:if>
  245. <xsl:for-each select="Cycles/Package">
  246. <h3><xsl:value-of select="@Name"/></h3><p>
  247. <xsl:for-each select="Package">
  248. <xsl:value-of select="."/><br/>
  249. </xsl:for-each></p>
  250. </xsl:for-each>
  251. <table width="100%"><tr><td>
  252. <a name="NVexplanations"><h2>Explanations</h2></a>
  253. </td><td align="right">
  254. [<a href="#NVsummary">summary</a>]
  255. [<a href="#NVpackages">packages</a>]
  256. [<a href="#NVcycles">cycles</a>]
  257. [<a href="#NVexplanations">explanations</a>]
  258. </td></tr></table>
  259. <p>The following explanations are for quick reference and are lifted directly from the original <a href="http://www.clarkware.com/software/JDepend.html">JDepend documentation</a>.</p>
  260. <h3><a name="EXnumber">Number of Classes</a></h3>
  261. <p>The number of concrete and abstract classes (and interfaces) in the package is an indicator of the extensibility of the package.</p>
  262. <h3><a name="EXafferent">Afferent Couplings</a></h3>
  263. <p>The number of other packages that depend upon classes within the package is an indicator of the package's responsibility. </p>
  264. <h3><a name="EXefferent">Efferent Couplings</a></h3>
  265. <p>The number of other packages that the classes in the package depend upon is an indicator of the package's independence. </p>
  266. <h3><a name="EXabstractness">Abstractness</a></h3>
  267. <p>The ratio of the number of abstract classes (and interfaces) in the analyzed package to the total number of classes in the analyzed package. </p>
  268. <p>The range for this metric is 0 to 1, with A=0 indicating a completely concrete package and A=1 indicating a completely abstract package. </p>
  269. <h3><a name="EXinstability">Instability</a></h3>
  270. <p>The ratio of efferent coupling (Ce) to total coupling (Ce / (Ce + Ca)). This metric is an indicator of the package's resilience to change. </p>
  271. <p>The range for this metric is 0 to 1, with I=0 indicating a completely stable package and I=1 indicating a completely instable package. </p>
  272. <h3><a name="EXdistance">Distance</a></h3>
  273. <p>The perpendicular distance of a package from the idealized line A + I = 1. This metric is an indicator of the package's balance between abstractness and stability. </p>
  274. <p>A package squarely on the main sequence is optimally balanced with respect to its abstractness and stability. Ideal packages are either completely abstract and stable (x=0, y=1) or completely concrete and instable (x=1, y=0). </p>
  275. <p>The range for this metric is 0 to 1, with D=0 indicating a package that is coincident with the main sequence and D=1 indicating a package that is as far from the main sequence as possible. </p>
  276. </body>
  277. </html>
  278. </xsl:template>
  279. </xsl:stylesheet>