File
. See
http://docs.codehaus.org/display/SONAR/API+Changes for more details@Deprecated public class JavaFile extends Resource
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 |
---|
JavaFile(String deprecatedKey)
Deprecated.
|
JavaFile(String deprecatedKey,
boolean unitTest)
Deprecated.
|
JavaFile(String packageName,
String className)
Deprecated.
|
JavaFile(String packageKey,
String className,
boolean unitTest)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static JavaFile |
fromAbsolutePath(String path,
List<File> sourceDirs,
boolean unitTest)
Deprecated.
|
static JavaFile |
fromIOFile(File file,
List<File> sourceDirs,
boolean unitTest)
Deprecated.
|
static JavaFile |
fromIOFile(File file,
Project module,
boolean unitTest)
Deprecated.
|
static JavaFile |
fromRelativePath(String relativePath,
boolean unitTest)
Deprecated.
|
String |
getDescription()
Deprecated.
|
Language |
getLanguage()
Deprecated.
|
String |
getLongName()
Deprecated.
|
String |
getName()
Deprecated.
|
JavaPackage |
getParent()
Deprecated.
The parent is used to build the resources tree, for example for relations between files, directories and projects.
|
String |
getQualifier()
Deprecated.
The qualifier tells the type of the resource.
|
String |
getScope()
Deprecated.
|
boolean |
isUnitTest()
Deprecated.
|
boolean |
matchFilePattern(String antPattern)
Deprecated.
Check resource against an Ant pattern, like mypackag?/*Foo.java.
|
equals, getEffectiveKey, getId, getKey, getPath, getUuid, hashCode, isExcluded, language, normalize, setEffectiveKey, setExcluded, setId, setKey, setPath, setUuid
public JavaPackage getParent()
Resource
Return null if the parent is the current project (or module in case of multi-module).
public String getDescription()
getDescription
in class Resource
public Language getLanguage()
getLanguage
in class Resource
File
s may have a non null value.public String getLongName()
getLongName
in class Resource
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 boolean isUnitTest()
public boolean matchFilePattern(String antPattern)
Resource
matchFilePattern
in class Resource
antPattern
- Ant-like pattern (with **, * and ?). It includes file suffixes.public static JavaFile fromIOFile(File file, Project module, boolean unitTest)
public static JavaFile fromRelativePath(String relativePath, boolean unitTest)
public static JavaFile fromIOFile(File file, List<File> sourceDirs, boolean unitTest)
public static JavaFile fromAbsolutePath(String path, List<File> sourceDirs, boolean unitTest)
Copyright © 2009–2016 SonarSource. All rights reserved.