org.sonar.java.api
Class JavaMethod

java.lang.Object
  extended by org.sonar.api.resources.Resource
      extended by org.sonar.api.resources.Method
          extended by org.sonar.java.api.JavaMethod

public final class JavaMethod
extends Method

Since:
2.6

Nested Class Summary
static class JavaMethod.Builder
           
 
Field Summary
static String QUALIFIER
           
static int UNKNOWN_LINE
           
 
Fields inherited from class org.sonar.api.resources.Method
language, qualifier, SCOPE
 
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
 
Method Summary
static JavaMethod createRef(JavaClass javaClass, String signature)
           
static JavaMethod createRef(String key)
           
 String getClassName()
           
 String getDescription()
           
 int getFromLine()
           
 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 getSignature()
           
 int getToLine()
           
 boolean isAccessor()
           
 String toString()
           
 
Methods inherited from class org.sonar.api.resources.Method
createMethod, equals, getLanguage, getQualifier, getScope, hashCode, matchFilePattern
 
Methods inherited from class org.sonar.api.resources.Resource
getEffectiveKey, getId, getKey, isExcluded, setEffectiveKey, setExcluded, setId, setKey
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

QUALIFIER

public static final String QUALIFIER
See Also:
Constant Field Values

UNKNOWN_LINE

public static final int UNKNOWN_LINE
See Also:
Constant Field Values
Method Detail

getFromLine

public int getFromLine()

getToLine

public int getToLine()

getSignature

public String getSignature()

getClassName

public String getClassName()

isAccessor

public boolean isAccessor()

getName

public String getName()
Overrides:
getName in class Method
Returns:
the resource name

getLongName

public String getLongName()
Overrides:
getLongName in class Method
Returns:
the resource long name

getDescription

public String getDescription()
Overrides:
getDescription in class Method
Returns:
the resource description

getParent

public Resource getParent()
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.

Overrides:
getParent in class Method

toString

public String toString()
Overrides:
toString in class Object

createRef

public static JavaMethod createRef(String key)

createRef

public static JavaMethod createRef(JavaClass javaClass,
                                   String signature)


Copyright © 2009-2012 SonarSource. All Rights Reserved.