org.sonar.api.resources
Class JavaFile

java.lang.Object
  extended by org.sonar.api.resources.Resource
      extended by org.sonar.api.resources.JavaFile
All Implemented Interfaces:
Serializable

Deprecated. since 4.2 use File. See http://docs.codehaus.org/display/SONAR/API+Changes for more details

@Deprecated
public class JavaFile
extends Resource

A class that represents a Java class. This class can either be a Test class or source class

Since:
1.10
See Also:
Serialized Form

Field Summary
 
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
JavaFile(String deprecatedKey)
          Deprecated.  
JavaFile(String deprecatedKey, boolean unitTest)
          Deprecated.  
JavaFile(String packageName, String className)
          Deprecated.  
JavaFile(String packageKey, String className, boolean unitTest)
          Deprecated.  
 
Method Summary
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 classes, packages 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.
 
Methods inherited from class org.sonar.api.resources.Resource
equals, getDeprecatedKey, getEffectiveKey, getId, getKey, getPath, hashCode, isExcluded, normalize, setDeprecatedKey, setEffectiveKey, setExcluded, setId, setKey, setPath
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaFile

public JavaFile(String packageName,
                String className)
Deprecated. 

JavaFile

public JavaFile(String packageKey,
                String className,
                boolean unitTest)
Deprecated. 

JavaFile

public JavaFile(String deprecatedKey)
Deprecated. 

JavaFile

public JavaFile(String deprecatedKey,
                boolean unitTest)
Deprecated. 
Method Detail

getParent

public JavaPackage getParent()
Deprecated. 
Description copied from class: Resource
The parent is used to build the resources tree, for example for relations between classes, packages and projects.

Return null if the parent is the project.

Specified by:
getParent in class Resource

getDescription

public String getDescription()
Deprecated. 
Specified by:
getDescription in class Resource
Returns:
the resource description

getLanguage

public Language getLanguage()
Deprecated. 
Specified by:
getLanguage in class Resource
Returns:
the language

getName

public String getName()
Deprecated. 
Specified by:
getName in class Resource
Returns:
the resource name

getLongName

public String getLongName()
Deprecated. 
Specified by:
getLongName in class Resource
Returns:
the resource long name

getScope

public String getScope()
Deprecated. 
Specified by:
getScope in class Resource
Returns:
the scope

getQualifier

public String getQualifier()
Deprecated. 
Description copied from class: Resource
The qualifier tells the type of the resource. For example, it can be a File, a Class, a Project, a Unit Test...

Specified by:
getQualifier in class Resource
Returns:
the qualifier
See Also:
for the list of qualifiers, to find out if a resource if a class, a unit test,... from its qualifier

isUnitTest

public boolean isUnitTest()
Deprecated. 

matchFilePattern

public boolean matchFilePattern(String antPattern)
Deprecated. 
Description copied from class: Resource
Check resource against an Ant pattern, like mypackag?/*Foo.java. It's used for example to match resource exclusions.

Specified by:
matchFilePattern in class Resource
Parameters:
antPattern - Ant-like pattern (with **, * and ?). It includes file suffixes.
Returns:
true if the resource matches the Ant pattern

fromIOFile

public static JavaFile fromIOFile(File file,
                                  Project module,
                                  boolean unitTest)
Deprecated. 

fromRelativePath

public static JavaFile fromRelativePath(String relativePath,
                                        boolean unitTest)
Deprecated. 

fromIOFile

public static JavaFile fromIOFile(File file,
                                  List<File> sourceDirs,
                                  boolean unitTest)
Deprecated. 

fromAbsolutePath

public static JavaFile fromAbsolutePath(String path,
                                        List<File> sourceDirs,
                                        boolean unitTest)
Deprecated. 


Copyright © 2009-2014 SonarSource. All Rights Reserved.