Clover Coverage Report - KS Contract Documentation Generator 0.0.1-SNAPSHOT
Coverage timestamp: Wed Dec 31 1969 19:00:00 EST
../../../../../img/srcFileCovDistChart0.png 0% of files have more coverage
12   51   4   4
2   27   0.33   3
3     1.33  
1    
 
  JavaClassFileNameBuilder       Line # 22 12 0% 4 17 0% 0.0
 
No Tests
 
1    /*
2    * Copyright 2009 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.osedu.org/licenses/ECL-2.0
9    *
10    * Unless required by applicable law or agreed to in writing, software
11    * distributed under the License is distributed on an "AS IS" BASIS,
12    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13    * See the License for the specific language governing permissions and
14    * limitations under the License.
15    */
16    package org.kuali.student.contract.writer;
17   
18    /**
19    *
20    * @author nwright
21    */
 
22    public class JavaClassFileNameBuilder {
23   
24    private String rootDirectory;
25    private String packageName;
26    private String className;
27   
 
28  0 toggle public JavaClassFileNameBuilder(String rootDirectory,
29    String packageName,
30    String className) {
31  0 this.rootDirectory = rootDirectory;
32  0 this.packageName = packageName;
33  0 this.className = className;
34    }
35   
 
36  0 toggle public String buildDirectory() {
37  0 String dirName = rootDirectory;
38  0 if (!dirName.endsWith("/")) {
39  0 dirName += "/";
40    }
41  0 dirName += packageName.replace(".", "/");
42  0 return dirName;
43    }
44   
 
45  0 toggle public String build() {
46  0 String fileName = buildDirectory();
47  0 fileName += "/" + className;
48  0 fileName += ".java";
49  0 return fileName;
50    }
51    }