KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hammurapi > inspectors > metrics > ArchitecturalComplexityMapping


1 /*
2  * Created on Jul 16, 2004
3  *
4  * TODO To change the template for this generated file go to
5  * Window - Preferences - Java - Code Style - Code Templates
6  */

7 package org.hammurapi.inspectors.metrics;
8
9 import org.hammurapi.HammurapiException;
10 import org.w3c.dom.Element JavaDoc;
11
12 /**
13  * @author MUCBJ0
14  *
15  * TODO To change the template for this generated type comment go to
16  * Window - Preferences - Java - Code Style - Code Templates
17  */

18 public class ArchitecturalComplexityMapping {
19     String JavaDoc name = "not defined";
20     int rate = 1;
21     
22
23     public ArchitecturalComplexityMapping(Element JavaDoc holder) throws HammurapiException {
24         super();
25         try {
26             
27             
28             name = holder.getAttribute("name") ;
29             rate = Integer.valueOf(holder.getAttribute("rate")).intValue() ;
30             
31         }catch (Exception JavaDoc e){
32             throw new HammurapiException(e);
33         }
34     }
35
36     /**
37      * @return Returns the name.
38      */

39     public String JavaDoc getName() {
40         return name;
41     }
42     /**
43      * @param name The name to set.
44      */

45     public void setName(String JavaDoc name) {
46         this.name = name;
47     }
48     /**
49      * @return Returns the rate.
50      */

51     public int getRate() {
52         return rate;
53     }
54     /**
55      * @param rate The rate to set.
56      */

57     public void setRate(int rate) {
58         this.rate = rate;
59     }
60 }
61
Popular Tags