Source Code Cross Referenced for MetricsReport.java in  » UML » jrefactory » org » acm » seguin » metrics » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » UML » jrefactory » org.acm.seguin.metrics 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         *  Author:  Chris Seguin
003:         *
004:         *  This software has been developed under the copyleft
005:         *  rules of the GNU General Public License.  Please
006:         *  consult the GNU General Public License for more
007:         *  details about use and distribution of this software.
008:         */
009:        package org.acm.seguin.metrics;
010:
011:        import org.acm.seguin.summary.*;
012:        import org.acm.seguin.util.TextFormatter;
013:        import java.util.Iterator;
014:
015:        /**
016:         *  Gathers metrics data
017:         *
018:         *@author     Chris Seguin
019:         *@created    July 1, 1999
020:         */
021:        public abstract class MetricsReport {
022:            /**
023:             *  Make a final report on totals
024:             *
025:             *@param  projectData  Description of Parameter
026:             */
027:            public void finalReport(ProjectMetrics projectData) {
028:                reportAverageStatements(projectData);
029:                reportAveragePublicMethods(projectData);
030:                reportAverageOtherMethods(projectData);
031:                reportAverageClassMethods(projectData);
032:                reportAverageInstanceVariables(projectData);
033:                reportAverageClassVariables(projectData);
034:                reportAbstractClasses(projectData);
035:                reportInterfaces(projectData);
036:                reportAverageParameters(projectData);
037:            }
038:
039:            /**
040:             *  Method report shows all the metrics associated with a particular type.
041:             *
042:             *@param  typeData  the metrics for a particular type
043:             */
044:            public void typeReport(TypeMetrics typeData) {
045:                reportPublicMethods(typeData.getPackageName(), typeData
046:                        .getTypeName(), typeData.getPublicMethodCount());
047:                reportOtherMethods(typeData.getPackageName(), typeData
048:                        .getTypeName(), typeData.getOtherMethodCount());
049:                reportClassMethods(typeData.getPackageName(), typeData
050:                        .getTypeName(), typeData.getClassMethodCount());
051:                reportInstanceVariables(typeData.getPackageName(), typeData
052:                        .getTypeName(), typeData.getInstanceVariableCount());
053:                reportClassVariables(typeData.getPackageName(), typeData
054:                        .getTypeName(), typeData.getClassVariableCount());
055:            }
056:
057:            /**
058:             *  Method report shows all the metrics associated with a particular method.
059:             *
060:             *@param  methodData  the metrics associated with a particular method
061:             */
062:            public void methodReport(MethodMetrics methodData) {
063:                reportStatement(methodData.getPackageName(), methodData
064:                        .getTypeName(), methodData.getMethodName(), methodData
065:                        .getStatementCount());
066:                reportParameters(methodData.getPackageName(), methodData
067:                        .getTypeName(), methodData.getMethodName(), methodData
068:                        .getParameterCount());
069:                reportLinesOfCode(methodData.getPackageName(), methodData
070:                        .getTypeName(), methodData.getMethodName(), methodData
071:                        .getLinesOfCode());
072:                reportBlockDepth(methodData.getPackageName(), methodData
073:                        .getTypeName(), methodData.getMethodName(), methodData
074:                        .getBlockDepth());
075:            }
076:
077:            /**
078:             *  Reports on the number of statements
079:             *
080:             *@param  pack   the name of the package
081:             *@param  type   the name of the class or interface
082:             *@param  name   the name of the method
083:             *@param  count  the number of statements
084:             */
085:            protected abstract void reportStatement(String pack, String type,
086:                    String name, int count);
087:
088:            /**
089:             *  Reports on the number of parameters
090:             *
091:             *@param  pack   the name of the package
092:             *@param  type   the name of the class or interface
093:             *@param  name   the name of the method
094:             *@param  count  the number of parameters
095:             */
096:            protected abstract void reportParameters(String pack, String type,
097:                    String name, int count);
098:
099:            /**
100:             *  Reports on the number of lines of code
101:             *
102:             *@param  pack   the name of the package
103:             *@param  type   the name of the class or interface
104:             *@param  name   the name of the method
105:             *@param  count  the number of parameters
106:             */
107:            protected abstract void reportLinesOfCode(String pack, String type,
108:                    String name, int count);
109:
110:            /**
111:             *  Reports on the block depth of code
112:             *
113:             *@param  pack   the name of the package
114:             *@param  type   the name of the class or interface
115:             *@param  name   the name of the method
116:             *@param  count  the number of parameters
117:             */
118:            protected abstract void reportBlockDepth(String pack, String type,
119:                    String name, int count);
120:
121:            /**
122:             *  Reports on the average number of statements
123:             *
124:             *@param  projectData  Description of Parameter
125:             */
126:            protected abstract void reportAverageStatements(
127:                    ProjectMetrics projectData);
128:
129:            /**
130:             *  Reports on the average number of parameters
131:             *
132:             *@param  projectData  Description of Parameter
133:             */
134:            protected abstract void reportAverageParameters(
135:                    ProjectMetrics projectData);
136:
137:            /**
138:             *  Reports on the number of public methods
139:             *
140:             *@param  pack   the name of the package
141:             *@param  type   the name of the class or interface
142:             *@param  count  the number of public methods
143:             */
144:            protected abstract void reportPublicMethods(String pack,
145:                    String type, int count);
146:
147:            /**
148:             *  Reports on the number of other methods
149:             *
150:             *@param  pack   the name of the package
151:             *@param  type   the name of the class or interface
152:             *@param  count  the number of other methods
153:             */
154:            protected abstract void reportOtherMethods(String pack,
155:                    String type, int count);
156:
157:            /**
158:             *  Reports on the number of class methods
159:             *
160:             *@param  pack   the name of the package
161:             *@param  type   the name of the class or interface
162:             *@param  count  the number of class methods
163:             */
164:            protected abstract void reportClassMethods(String pack,
165:                    String type, int count);
166:
167:            /**
168:             *  Reports on the number of instance variables
169:             *
170:             *@param  pack   the name of the package
171:             *@param  type   the name of the class or interface
172:             *@param  count  the number of instance variables
173:             */
174:            protected abstract void reportInstanceVariables(String pack,
175:                    String type, int count);
176:
177:            /**
178:             *  Reports on the number of class variables
179:             *
180:             *@param  pack   the name of the package
181:             *@param  type   the name of the class or interface
182:             *@param  count  the number of class variables
183:             */
184:            protected abstract void reportClassVariables(String pack,
185:                    String type, int count);
186:
187:            /**
188:             *  Reports on the number of abstract classes
189:             *
190:             *@param  projectData  Description of Parameter
191:             */
192:            protected abstract void reportAbstractClasses(
193:                    ProjectMetrics projectData);
194:
195:            /**
196:             *  Reports on the number of interfaces
197:             *
198:             *@param  projectData  Description of Parameter
199:             */
200:            protected abstract void reportInterfaces(ProjectMetrics projectData);
201:
202:            /**
203:             *  Reports on the number of classes
204:             *
205:             *@param  projectData  Description of Parameter
206:             */
207:            protected abstract void reportClasses(ProjectMetrics projectData);
208:
209:            /**
210:             *  Reports on the average number of public methods
211:             *
212:             *@param  projectData  Description of Parameter
213:             */
214:            protected abstract void reportAveragePublicMethods(
215:                    ProjectMetrics projectData);
216:
217:            /**
218:             *  Reports on the average number of other methods
219:             *
220:             *@param  projectData  Description of Parameter
221:             */
222:            protected abstract void reportAverageOtherMethods(
223:                    ProjectMetrics projectData);
224:
225:            /**
226:             *  Reports on the average number of class methods
227:             *
228:             *@param  projectData  Description of Parameter
229:             */
230:            protected abstract void reportAverageClassMethods(
231:                    ProjectMetrics projectData);
232:
233:            /**
234:             *  Reports on the average number of instance variables
235:             *
236:             *@param  projectData  Description of Parameter
237:             */
238:            protected abstract void reportAverageInstanceVariables(
239:                    ProjectMetrics projectData);
240:
241:            /**
242:             *  Reports on the average number of class variables
243:             *
244:             *@param  projectData  Description of Parameter
245:             */
246:            protected abstract void reportAverageClassVariables(
247:                    ProjectMetrics projectData);
248:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.