public class Directory extends Resource
Modifier and Type | Field and Description |
---|---|
static String |
ROOT |
static String |
SEPARATOR |
QUALIFIER_CLASS, QUALIFIER_DIRECTORY, QUALIFIER_FIELD, QUALIFIER_FILE, QUALIFIER_LIB, QUALIFIER_METHOD, QUALIFIER_MODULE, QUALIFIER_PACKAGE, QUALIFIER_PROJECT, QUALIFIER_SUBVIEW, QUALIFIER_UNIT_TEST_CLASS, QUALIFIER_VIEW, SCOPE_ENTITY, SCOPE_SET, SCOPE_SPACE
Constructor and Description |
---|
Directory(String relativePathFromSourceDir)
Deprecated.
since 4.2 use
fromIOFile(java.io.File, Project) |
Directory(String relativePathFromSourceDir,
Language language)
Deprecated.
since 4.2 use
fromIOFile(java.io.File, Project) |
Modifier and Type | Method and Description |
---|---|
static Directory |
create(String relativePathFromBaseDir)
Deprecated.
since 5.1 use
FileSystem.inputDir(java.io.File) |
static Directory |
fromIOFile(File dir,
Project module)
Deprecated.
since 5.1 use
FileSystem.inputDir(java.io.File) |
String |
getDescription() |
Language |
getLanguage() |
String |
getLongName() |
String |
getName() |
Resource |
getParent()
The parent is used to build the resources tree, for example for relations between files, directories and projects.
|
String |
getQualifier()
The qualifier tells the type of the resource.
|
String |
getScope() |
boolean |
matchFilePattern(String antPattern)
Check resource against an Ant pattern, like mypackag?/*Foo.java.
|
static String |
parseKey(String key) |
String |
relativePathFromSourceDir()
Internal.
|
String |
toString() |
equals, getEffectiveKey, getId, getKey, getPath, getUuid, hashCode, isExcluded, language, normalize, setEffectiveKey, setExcluded, setId, setKey, setPath, setUuid
public static final String SEPARATOR
public static final String ROOT
@Deprecated public Directory(String relativePathFromSourceDir)
fromIOFile(java.io.File, Project)
@Deprecated public Directory(String relativePathFromSourceDir, Language language)
fromIOFile(java.io.File, Project)
public String relativePathFromSourceDir()
public String getLongName()
getLongName
in class Resource
public String getDescription()
getDescription
in class Resource
public Language getLanguage()
getLanguage
in class Resource
File
s may have a non null value.public String getQualifier()
Resource
getQualifier
in class Resource
for the list of qualifiers
,
to find out if a resource if a class, a unit test,... from its qualifier
public Resource getParent()
Resource
Return null if the parent is the current project (or module in case of multi-module).
public boolean matchFilePattern(String antPattern)
Resource
matchFilePattern
in class Resource
antPattern
- Ant-like pattern (with **, * and ?). It includes file suffixes.@Deprecated @CheckForNull public static Directory fromIOFile(File dir, Project module)
FileSystem.inputDir(java.io.File)
@Deprecated public static Directory create(String relativePathFromBaseDir)
FileSystem.inputDir(java.io.File)
Copyright © 2009–2015 SonarSource. All rights reserved.