|
a/tool/src/spdxlib/FileInfo.java |
|
b/tool/src/spdxlib/FileInfo.java |
|
... |
|
... |
104 |
|
104 |
|
105 |
// all done
|
105 |
// all done
|
106 |
return fileName;
|
106 |
return fileName;
|
107 |
}
|
107 |
}
|
108 |
|
108 |
|
|
|
109 |
|
|
|
110 |
/**
|
|
|
111 |
* How many lines of code has this file?
|
|
|
112 |
* @return the number of lines (approximation)
|
|
|
113 |
*/
|
|
|
114 |
public int getLOC(){
|
|
|
115 |
// no need to continue if fully empty
|
|
|
116 |
if(tagFileLOC == null){
|
|
|
117 |
return 0;
|
|
|
118 |
}
|
|
|
119 |
|
|
|
120 |
|
|
|
121 |
int result = 0;
|
|
|
122 |
try{
|
|
|
123 |
result = utils.text.justNumbers(tagFileLOC.getValue());
|
|
|
124 |
}catch (Exception e){
|
|
|
125 |
System.err.println("Error reading LOC");
|
|
|
126 |
}
|
|
|
127 |
return result;
|
|
|
128 |
}
|
109 |
|
129 |
|
110 |
|
130 |
|
111 |
/**
|
131 |
/**
|
112 |
* This method will pick on a given FileInfo object and extract the relevant
|
132 |
* This method will pick on a given FileInfo object and extract the relevant
|
113 |
* licensing details.
|
133 |
* licensing details.
|