public interface InputFile extends Serializable
Modifier and Type | Field and Description |
---|---|
static String |
ATTRIBUTE_HASH |
static String |
ATTRIBUTE_LANGUAGE
Detected language
|
static String |
ATTRIBUTE_SOURCE_RELATIVE_PATH
Relative path from source directory.
|
static String |
ATTRIBUTE_SOURCEDIR_PATH
Canonical path of source directory.
|
static String |
ATTRIBUTE_STATUS |
static String |
ATTRIBUTE_TYPE |
static String |
STATUS_ADDED |
static String |
STATUS_CHANGED |
static String |
STATUS_SAME |
static String |
TYPE_SOURCE |
static String |
TYPE_TEST |
Modifier and Type | Method and Description |
---|---|
String |
absolutePath()
Not-null canonical path.
|
String |
attribute(String key)
See list of attribute keys in constants starting with ATTRIBUTE_.
|
Map<String,String> |
attributes() |
File |
file() |
boolean |
has(String attribute,
String value)
Does the given attribute have the given value ?
|
String |
name()
Not-null filename, including extension
|
String |
path()
Path is relative from module base directory.
|
String |
type()
Not-null type (is it a source file or a unit test file?).
|
static final String ATTRIBUTE_SOURCEDIR_PATH
/path/to/module/src/main/java
or C:\path\to\module\src\main\java
static final String ATTRIBUTE_SOURCE_RELATIVE_PATH
static final String ATTRIBUTE_LANGUAGE
static final String ATTRIBUTE_TYPE
static final String TYPE_SOURCE
static final String TYPE_TEST
static final String ATTRIBUTE_STATUS
static final String STATUS_SAME
static final String STATUS_CHANGED
static final String STATUS_ADDED
static final String ATTRIBUTE_HASH
String path()
ModuleFileSystem
.
File separator is the forward slash ('/'), even on MSWindows.
Returns src/main/java/com/Foo.java
if module base dir is
/absolute/path/to/module
and if file is
/absolute/path/to/module/src/main/java/com/Foo.java
.
Returned path is never null.String absolutePath()
String type()
TYPE_
, for example TYPE_SOURCE
.@CheckForNull String attribute(String key)
Map<String,String> attributes()
Copyright © 2009-2014 SonarSource. All Rights Reserved.