]> source.dussan.org Git - sonarqube.git/commitdiff
Add javadoc to InputFile + improve JavaFile#toString()
authorsimonbrandhof <simon.brandhof@gmail.com>
Wed, 26 Jan 2011 17:13:36 +0000 (18:13 +0100)
committersimonbrandhof <simon.brandhof@gmail.com>
Wed, 26 Jan 2011 17:13:36 +0000 (18:13 +0100)
sonar-plugin-api/src/main/java/org/sonar/api/resources/InputFile.java
sonar-plugin-api/src/main/java/org/sonar/api/resources/JavaFile.java

index 4c926f897e1d8a0653401ca30e3a6cc37ca79177..803dafaee580248f88d52f946e650fc0e6877615 100644 (file)
@@ -26,6 +26,10 @@ import java.io.File;
  */
 public interface InputFile {
 
+  /**
+   * The source base directory, different than the project basedir. For example in maven projects, the basedir of a source file stored in
+   * src/main/java/org/foo/ is the directory src/main/java.
+   */
   File getFileBaseDir();
 
   File getFile();
@@ -33,10 +37,10 @@ public interface InputFile {
   /**
    * Path relative to basedir. Directory separator is slash '/', whatever the platform.
    * 
-   * Example on windows: if basedir is c:\project\src\ and file is c:\project\src\org\foo\Bar.java, then relative path
+   * Example on windows: if file basedir is c:\project\src\ and file is c:\project\src\org\foo\Bar.java, then relative path
    * is org/foo/Bar.java
    *
-   * Example on unix: if basedir is /project/src and file is /project/src/org/foo/Bar.java, then relative path
+   * Example on unix: if file basedir is /project/src and file is /project/src/org/foo/Bar.java, then relative path
    * is org/foo/Bar.java as well.
    */
   String getRelativePath();
index 009a04e670a040e1eefdeb07778f8a9edb5020e4..dc0f729e9e018d548a084f1a215da9757eca8574 100644 (file)
@@ -20,7 +20,6 @@
 package org.sonar.api.resources;
 
 import org.apache.commons.lang.StringUtils;
-import org.apache.commons.lang.builder.ToStringBuilder;
 import org.sonar.api.utils.WildcardPattern;
 
 import java.io.File;
@@ -228,12 +227,7 @@ public class JavaFile extends Resource<JavaPackage> {
 
   @Override
   public String toString() {
-    return new ToStringBuilder(this)
-        .append("key", getKey())
-        .append("package", packageKey)
-        .append("longName", longName)
-        .append("unitTest", unitTest)
-        .toString();
+    return getKey();
   }
 
 //  @Override