public class ThreadSafeSourceFile extends Object implements SourceFile
Modifier and Type | Method and Description |
---|---|
String |
getBasePath()
Base path for this filename, without the package-name portion.
|
String |
getFullPath()
Full path and file name, if its exists, for this SourceFile.
|
String |
getFunctionNameForLine(Session session,
int lineNum)
Return the function name for a given line number, or
null
if not known or if the line matches more than one function. |
String[] |
getFunctionNames(Session session)
Get a list of all function names for this SourceFile
|
int |
getId()
Return a unique identifier for this SourceFile.
|
String |
getLine(int lineNum)
Obtains the textual content of the given line
from within a source file.
|
int |
getLineCount()
Returns the number of source lines in the given file
|
int |
getLineForFunctionName(Session session,
String name)
Return the line number for the given function name
if it doesn't exists -1 is returned
|
String |
getName()
File name of this SourceFile.
|
int |
getOffsetForLine(int lineNum)
Return the offset within the SWF for a given line
number.
|
String |
getPackageName()
Get the package name portion of the path for this file.
|
static SourceFile |
getRaw(SourceFile f)
Returns the raw SourceFile underlying a ThreadSafeSourceFile.
|
String |
getRawName()
Raw, unprocessed file name for this SourceFile.
|
Object |
getSyncObject() |
static Object |
getSyncObject(SourceFile sf) |
String |
toString() |
static ThreadSafeSourceFile |
wrap(Object syncObj,
SourceFile sourceFile)
Wraps a SourceFile inside a ThreadSafeSourceFile.
|
static ThreadSafeSourceFile[] |
wrapArray(Object syncObj,
SourceFile[] sourceFiles)
Wraps an array of SourceFiles inside an array of ThreadSafeSourceFiles.
|
public static ThreadSafeSourceFile wrap(Object syncObj, SourceFile sourceFile)
public static ThreadSafeSourceFile[] wrapArray(Object syncObj, SourceFile[] sourceFiles)
public static SourceFile getRaw(SourceFile f)
public static Object getSyncObject(SourceFile sf)
public String getRawName()
SourceFile
getRawName
in interface SourceFile
public String getFunctionNameForLine(Session session, int lineNum)
SourceFile
null
if not known or if the line matches more than one function.getFunctionNameForLine
in interface SourceFile
public String[] getFunctionNames(Session session)
SourceFile
getFunctionNames
in interface SourceFile
public int getId()
SourceFile
getId
in interface SourceFile
public String getLine(int lineNum)
SourceFile
getLine
in interface SourceFile
public int getLineCount()
SourceFile
getLineCount
in interface SourceFile
public int getLineForFunctionName(Session session, String name)
SourceFile
getLineForFunctionName
in interface SourceFile
public String getName()
SourceFile
getName
in interface SourceFile
public int getOffsetForLine(int lineNum)
SourceFile
getOffsetForLine
in interface SourceFile
public String getPackageName()
SourceFile
getPackageName
in interface SourceFile
public String getFullPath()
SourceFile
getBasePath + slash + getPackageName() + slash + getName()
where "slash" is a platform-specific slash character.getFullPath
in interface SourceFile
public String getBasePath()
SourceFile
getBasePath
in interface SourceFile
public final Object getSyncObject()
Copyright © 2016 The Apache Software Foundation. All rights reserved.