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()
SourceFilegetRawName in interface SourceFilepublic String getFunctionNameForLine(Session session, int lineNum)
SourceFilenull
if not known or if the line matches more than one function.getFunctionNameForLine in interface SourceFilepublic String[] getFunctionNames(Session session)
SourceFilegetFunctionNames in interface SourceFilepublic int getId()
SourceFilegetId in interface SourceFilepublic String getLine(int lineNum)
SourceFilegetLine in interface SourceFilepublic int getLineCount()
SourceFilegetLineCount in interface SourceFilepublic int getLineForFunctionName(Session session, String name)
SourceFilegetLineForFunctionName in interface SourceFilepublic String getName()
SourceFilegetName in interface SourceFilepublic int getOffsetForLine(int lineNum)
SourceFilegetOffsetForLine in interface SourceFilepublic String getPackageName()
SourceFilegetPackageName in interface SourceFilepublic String getFullPath()
SourceFilegetBasePath + slash + getPackageName() + slash + getName()
where "slash" is a platform-specific slash character.getFullPath in interface SourceFilepublic String getBasePath()
SourceFilegetBasePath in interface SourceFilepublic final Object getSyncObject()
Copyright © 2016 The Apache Software Foundation. All rights reserved.