|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.sonar.api.resources.Resource org.sonar.api.resources.JavaPackage
public class JavaPackage
A class that represents a Java package in Sonar
Field Summary | |
---|---|
static String |
DEFAULT_PACKAGE_NAME
Default package name for classes without package definition |
Fields inherited from class org.sonar.api.resources.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 Summary | |
---|---|
JavaPackage()
Default constructor |
|
JavaPackage(String key)
Creates a JavaPackage from its key. |
Method Summary | |
---|---|
String |
getDescription()
|
Language |
getLanguage()
|
String |
getLongName()
|
String |
getName()
|
Resource<?> |
getParent()
The parent is used to build the resources tree, for example for relations between classes, packages and projects. |
String |
getQualifier()
The qualifier tells the type of the resource. |
String |
getScope()
|
boolean |
isDefault()
|
boolean |
matchFilePattern(String antPattern)
Check resource against an Ant pattern, like mypackag?/*Foo.java. |
String |
toString()
|
Methods inherited from class org.sonar.api.resources.Resource |
---|
equals, getEffectiveKey, getId, getKey, hashCode, isExcluded, setEffectiveKey, setExcluded, setId, setKey |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String DEFAULT_PACKAGE_NAME
Constructor Detail |
---|
public JavaPackage()
public JavaPackage(String key)
Method Detail |
---|
public boolean isDefault()
public boolean matchFilePattern(String antPattern)
matchFilePattern
in class Resource
antPattern
- Ant-like pattern (with **, * and ?). It includes file suffixes.
public String getDescription()
getDescription
in class Resource
public String getScope()
getScope
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 String getName()
getName
in class Resource
public Resource<?> getParent()
Return null if the parent is the project.
getParent
in class Resource
public String getLongName()
getLongName
in class Resource
public Language getLanguage()
getLanguage
in class Resource
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |