StyleSheetEntry.java
Package: org.hammurapi
Results
Date | 2007/07/27 |
Codebase | 747 |
Reviews | 1351 |
DPMO | 118 |
Sigma | 5.176 |
Metrics
Name | Number | Min | Avg | Max | Total |
Class complexity | 1 | 12.00 | 12.00 | 12.00 | 12.00 |
Code length | 10 | 1.00 | 1.90 | 10.00 | 19.00 |
File length | 1 | 146.00 | 146.00 | 146.00 | 146.00 |
Operation complexity | 10 | 1.00 | 1.20 | 3.00 | 12.00 |
Work order | 1 | 86.20 | 86.20 | 86.20 | 86.20 |
Violations
# | Line | Column | Name | Severity | Description |
1 | 23 | 1 | ER-023 | 3 | Packages should begin with [] |
2 | 131 | 90 | ER-036 | 3 | Line is too long |
3 | 42 | 1 | ER-049 | 2 | Unify logging strategy - define individual logger for class |
4 | 71 | 29 | ER-082 | 3 | Avoid using method parameter names that conflict with class member names |
5 | 94 | 29 | ER-082 | 3 | Avoid using method parameter names that conflict with class member names |
6 | 103 | 28 | ER-082 | 3 | Avoid using method parameter names that conflict with class member names |
7 | 118 | 35 | ER-082 | 3 | Avoid using method parameter names that conflict with class member names |
-
JavaDoc
-
StyleSheetEntry
1
23package org.hammurapi;
24
25import java.io.File;
26import java.util.HashMap;
27import java.util.Iterator;
28import java.util.Map;
29
30import org.apache.tools.ant.Project;
31
32import com.pavelvlasov.ant.Param;
33import com.pavelvlasov.config.ConfigurationException;
34import com.pavelvlasov.config.Parameterizable;
35
36
42public class StyleSheetEntry {
43
44 private String name;
45 private File file;
46 private String url;
47 private Map parameters=new HashMap();
48
49
52 public String getName() {
53 return name;
54 }
55
56
71 public void setName(String name) {
72 this.name=name;
73 }
74
75
78 public File getFile() {
79 return file;
80 }
81
82
85 public String getUrl() {
86 return url;
87 }
88
89
94 public void setFile(File file) {
95 this.file=file;
96 }
97
98
103 public void setUrl(String url) {
104 this.url=url;
105 }
106
107
110 public Map getParameters() {
111 return parameters;
112 }
113
114
118 public void setParameters(Map parameters) {
119 this.parameters.putAll(parameters);
120 }
121
122
127 public void addConfiguredParameter(Param param) {
128 parameters.put(param.getName(), param);
129 }
130
131 void setParameters(Project project, Parameterizable p) throws ConfigurationException {
132 Iterator pit=parameters.values().iterator();
133 while (pit.hasNext()) {
134 Param param=(Param) pit.next();
135
136 param.setProject(project);
137 param.execute();
138
139 Object value=param.getObject(null);
140 if (value!=null) {
141 p.setParameter(param.getName(), value);
142 }
143 }
144 }
145}
146
147
Hammurapi 3 Copyright © 2004 Hammurapi Group. All Rights Reserved.