public class DModule extends Object implements SourceFile
| Constructor and Description |
|---|
DModule(SourceLocator sourceLocator,
int id,
int bitmap,
String name,
String script,
int isolateId) |
| Modifier and Type | Method and Description |
|---|---|
String |
getBasePath()
Base path for this filename, without the package-name portion.
|
int |
getBitmap() |
String |
getFullPath()
Full path and file name, if its exists, for this SourceFile.
|
String |
getFunctionNameForLine(Session s,
int line)
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 s)
Get a list of all function names for this SourceFile
|
int |
getId()
Return a unique identifier for this SourceFile.
|
String |
getLine(int i)
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 s,
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 line)
Return the offset within the SWF for a given line
number.
|
String |
getPackageName()
Get the package name portion of the path for this file.
|
String |
getRawName()
Raw, unprocessed file name for this SourceFile.
|
ScriptText |
getScript() |
void |
lineMapping(StringBuilder sb) |
String |
toString()
for debugging
|
public DModule(SourceLocator sourceLocator, int id, int bitmap, String name, String script, int isolateId)
name - filename in "basepath;package;filename" formatpublic ScriptText getScript()
public String getBasePath()
SourceFilegetBasePath in interface SourceFilepublic String getName()
SourceFilegetName in interface SourceFilepublic String getFullPath()
SourceFilegetBasePath + slash + getPackageName() + slash + getName()
where "slash" is a platform-specific slash character.getFullPath in interface SourceFilepublic String getPackageName()
SourceFilegetPackageName in interface SourceFilepublic String getRawName()
SourceFilegetRawName in interface SourceFilepublic int getId()
SourceFilegetId in interface SourceFilepublic int getBitmap()
public int getLineCount()
SourceFilegetLineCount in interface SourceFilepublic String getLine(int i)
SourceFilegetLine in interface SourceFilepublic int getOffsetForLine(int line)
SourceFilegetOffsetForLine in interface SourceFilepublic int getLineForFunctionName(Session s, String name)
SourceFilegetLineForFunctionName in interface SourceFilepublic String getFunctionNameForLine(Session s, int line)
SourceFilenull
if not known or if the line matches more than one function.getFunctionNameForLine in interface SourceFilepublic String[] getFunctionNames(Session s)
SourceFilegetFunctionNames in interface SourceFilepublic void lineMapping(StringBuilder sb)
Copyright © 2016 The Apache Software Foundation. All rights reserved.