Source Code Cross Referenced for ProjectMetrics.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:        /**
012:         *  Stores the metrics for a particular project 
013:         *
014:         *@author     Chris Seguin 
015:         *@created    July 23, 1999 
016:         */
017:        public class ProjectMetrics {
018:            /*<Instance Variables>*/
019:            private int publicMethodTotal = 0;
020:            private int otherMethodTotal = 0;
021:            private int classMethodTotal = 0;
022:            private int instanceVariableTotal = 0;
023:            private int classVariableTotal = 0;
024:            private int classTotal = 0;
025:            private int abstractClassTotal = 0;
026:            private int interfaceTotal = 0;
027:            private int statementTotal = 0;
028:            private int parameterTotal = 0;
029:
030:            /*</Instance Variables>*/
031:
032:            /*<Constructor>*/
033:            /**
034:             *  Constructor for the ProjectMetrics object 
035:             */
036:            public ProjectMetrics() {
037:            }
038:
039:            /*</Constructor>*/
040:
041:            /*<Getters>*/
042:            /**
043:             *  Return the public method count 
044:             *
045:             *@return    The public method count 
046:             */
047:            public int getPublicMethodTotal() {
048:                return publicMethodTotal;
049:            }
050:
051:            /**
052:             *  Return the other method count 
053:             *
054:             *@return    The other method count 
055:             */
056:            public int getOtherMethodTotal() {
057:                return otherMethodTotal;
058:            }
059:
060:            /**
061:             *  Return the class method count 
062:             *
063:             *@return    The class method count 
064:             */
065:            public int getClassMethodTotal() {
066:                return classMethodTotal;
067:            }
068:
069:            /**
070:             *  Return the class method count 
071:             *
072:             *@return    The class method count 
073:             */
074:            public int getMethodTotal() {
075:                return publicMethodTotal + classMethodTotal + otherMethodTotal;
076:            }
077:
078:            /**
079:             *  Return the instance variable count 
080:             *
081:             *@return    The instance variable count 
082:             */
083:            public int getInstanceVariableTotal() {
084:                return instanceVariableTotal;
085:            }
086:
087:            /**
088:             *  Return the class variable count 
089:             *
090:             *@return    The class variable count 
091:             */
092:            public int getClassVariableTotal() {
093:                return classVariableTotal;
094:            }
095:
096:            /**
097:             *  Return the class count 
098:             *
099:             *@return    The class count 
100:             */
101:            public int getClassTotal() {
102:                return classTotal;
103:            }
104:
105:            /**
106:             *  Return the abstract class count 
107:             *
108:             *@return    The abstract class count 
109:             */
110:            public int getAbstractClassTotal() {
111:                return abstractClassTotal;
112:            }
113:
114:            /**
115:             *  Return the abstract class count 
116:             *
117:             *@return    The abstract class count 
118:             */
119:            public int getInterfaceTotal() {
120:                return interfaceTotal;
121:            }
122:
123:            /**
124:             *  Return the statement total 
125:             *
126:             *@return    The statement total 
127:             */
128:            public int getStatementTotal() {
129:                return statementTotal;
130:            }
131:
132:            /**
133:             *  Return the parameter total 
134:             *
135:             *@return    The parameter total 
136:             */
137:            public int getParameterTotal() {
138:                return parameterTotal;
139:            }
140:
141:            /**
142:             *  Return the statement average 
143:             *
144:             *@return    The statement average 
145:             */
146:            public double getStatementAverage() {
147:                double top = statementTotal;
148:                double bottom = publicMethodTotal + otherMethodTotal
149:                        + classMethodTotal;
150:                return top / bottom;
151:            }
152:
153:            /**
154:             *  Return the parameter average 
155:             *
156:             *@return    The parameter average 
157:             */
158:            public double getParameterAverage() {
159:                double top = parameterTotal;
160:                double bottom = publicMethodTotal + otherMethodTotal
161:                        + classMethodTotal;
162:                return top / bottom;
163:            }
164:
165:            /**
166:             *  Return the public method count 
167:             *
168:             *@return    The public method count 
169:             */
170:            public double getPublicMethodAverage() {
171:                double top = publicMethodTotal;
172:                double bottom = classTotal;
173:                return top / bottom;
174:            }
175:
176:            /**
177:             *  Return the other method count 
178:             *
179:             *@return    The other method count 
180:             */
181:            public double getOtherMethodAverage() {
182:                double top = otherMethodTotal;
183:                double bottom = classTotal;
184:                return top / bottom;
185:            }
186:
187:            /**
188:             *  Return the class method count 
189:             *
190:             *@return    The class method count 
191:             */
192:            public double getClassMethodAverage() {
193:                double top = classMethodTotal;
194:                double bottom = classTotal;
195:                return top / bottom;
196:            }
197:
198:            /**
199:             *  Return the instance variable count 
200:             *
201:             *@return    The instance variable count 
202:             */
203:            public double getInstanceVariableAverage() {
204:                double top = instanceVariableTotal;
205:                double bottom = classTotal;
206:                return top / bottom;
207:            }
208:
209:            /**
210:             *  Return the class variable count 
211:             *
212:             *@return    The class variable count 
213:             */
214:            public double getClassVariableAverage() {
215:                double top = classVariableTotal;
216:                double bottom = classTotal;
217:                return top / bottom;
218:            }
219:
220:            /**
221:             *  Return the abstract class count 
222:             *
223:             *@return    The abstract class count 
224:             */
225:            public double getAbstractClassPercentage() {
226:                double top = abstractClassTotal;
227:                double bottom = classTotal;
228:                return 100 * top / bottom;
229:            }
230:
231:            /**
232:             *  Return the abstract class count 
233:             *
234:             *@return    The abstract class count 
235:             */
236:            public double getInterfacePercentage() {
237:                double top = interfaceTotal;
238:                double bottom = classTotal;
239:                return 100 * top / bottom;
240:            }
241:
242:            /*</Getters>*/
243:
244:            /*<Setters>*/
245:            /**
246:             *  Add in a package 
247:             *
248:             *@param  packageData  the package data 
249:             */
250:            void add(PackageMetrics packageData) {
251:                classTotal += packageData.getClassTotal();
252:                abstractClassTotal += packageData.getAbstractClassCount();
253:                interfaceTotal += packageData.getInterfaceCount();
254:                publicMethodTotal += packageData.getPublicMethodTotal();
255:                otherMethodTotal += packageData.getOtherMethodTotal();
256:                classMethodTotal += packageData.getClassMethodTotal();
257:                instanceVariableTotal += packageData.getInstanceVariableTotal();
258:                classVariableTotal += packageData.getClassVariableTotal();
259:                statementTotal += packageData.getStatementTotal();
260:                parameterTotal += packageData.getParameterTotal();
261:            }
262:            /*</Setters>*/
263:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.