org.sonar.api.batch.fs.internal
Class DefaultInputDir

java.lang.Object
  extended by org.sonar.api.batch.fs.internal.DefaultInputDir
All Implemented Interfaces:
Serializable, InputDir, InputPath

public class DefaultInputDir
extends Object
implements InputDir, Serializable

Since:
4.5
See Also:
Serialized Form

Constructor Summary
DefaultInputDir(String relativePath)
           
 
Method Summary
 String absolutePath()
          Marked as nullable just for the unit tests that do not call setFile(java.io.File) previously.
 boolean equals(Object o)
           
 File file()
          The underlying absolute File
 int hashCode()
           
 String key()
          Component key.
 String relativePath()
          Path relative to module base directory.
 DefaultInputDir setAbsolutePath(String s)
           
 DefaultInputDir setFile(File file)
           
 DefaultInputDir setKey(String s)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultInputDir

public DefaultInputDir(String relativePath)
Method Detail

relativePath

public String relativePath()
Description copied from interface: InputDir
Path relative to module base directory. Path is unique and identifies directory within given FileSystem. File separator is the forward slash ('/'), even on Microsoft Windows.

Returns src/main/java/com if module base dir is /path/to/module and if directory is /path/to/module/src/main/java/com.

Relative path is not null and is normalized ('foo/../foo' is replaced by 'foo').

Specified by:
relativePath in interface InputDir
Specified by:
relativePath in interface InputPath
See Also:
InputFile.relativePath(), InputDir.relativePath()

absolutePath

@CheckForNull
public String absolutePath()
Marked as nullable just for the unit tests that do not call setFile(java.io.File) previously.

Specified by:
absolutePath in interface InputDir
Specified by:
absolutePath in interface InputPath
See Also:
InputFile.absolutePath(), InputDir.absolutePath()

file

public File file()
Description copied from interface: InputDir
The underlying absolute File

Specified by:
file in interface InputDir
Specified by:
file in interface InputPath
See Also:
InputFile.file(), InputDir.file()

key

@CheckForNull
public String key()
Component key. It's marked as nullable just for the unit tests that do not previously call setKey(String).


setAbsolutePath

public DefaultInputDir setAbsolutePath(String s)

setFile

public DefaultInputDir setFile(File file)

setKey

public DefaultInputDir setKey(String s)

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2009–2014 SonarSource. All rights reserved.