FileDocCategorySizeDatePackage
NativeStackCallInfo.javaAPI DocAndroid 1.5 API2632Wed May 06 22:41:08 BST 2009com.android.ddmlib

NativeStackCallInfo

public final class NativeStackCallInfo extends Object
Represents a stack call. This is used to return all of the call information as one object.

Fields Summary
private static final Pattern
SOURCE_NAME_PATTERN
private String
mLibrary
name of the library
private String
mMethod
name of the method
private String
mSourceFile
name of the source file + line number in the format
<sourcefile>:<linenumber>
private int
mLineNumber
Constructors Summary
public NativeStackCallInfo(String lib, String method, String sourceFile)
Basic constructor with library, method, and sourcefile information

param
lib The name of the library
param
method the name of the method
param
sourceFile the name of the source file and the line number as "[sourcefile]:[fileNumber]"

 

                                             
           
        mLibrary = lib;
        mMethod = method;
        
        Matcher m = SOURCE_NAME_PATTERN.matcher(sourceFile);
        if (m.matches()) {
            mSourceFile = m.group(1);
            try {
                mLineNumber = Integer.parseInt(m.group(2));
            } catch (NumberFormatException e) {
                // do nothing, the line number will stay at -1
            }
        } else {
            mSourceFile = sourceFile;
        }
    
Methods Summary
public java.lang.StringgetLibraryName()
Returns the name of the library name.

        return mLibrary;
    
public intgetLineNumber()
Returns the line number, or -1 if unknown.

        return mLineNumber;
    
public java.lang.StringgetMethodName()
Returns the name of the method.

        return mMethod;
    
public java.lang.StringgetSourceFile()
Returns the name of the source file.

        return mSourceFile;