|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object frysk.dom.DOMSource
public class DOMSource
DOMSource represents a source code file within the frysk source window dom
Field Summary | |
---|---|
static String |
ADDR_ATTR
|
private String |
content
|
static String |
FILENAME_ATTR
Name of this file |
static String |
FILEPATH_ATTR
Path to this file |
static String |
INCLUDES
|
static String |
IS_PARSED
Whether this source file has already been parsed |
private Element |
myElement
|
static String |
PARSER_ERROR
Whether the parser errored out while while this source was being parsed |
static String |
SOURCE_NODE
Name of this node in the DOM tree |
static String |
TEXT_ATTR
|
Constructor Summary | |
---|---|
DOMSource(Element data)
Creates a new DOMSource object with the given data as it's Element. |
|
DOMSource(String filename,
String filepath,
String[] includepaths)
Creates a new DOMSource |
Method Summary | |
---|---|
void |
addFunction(String inline_name,
int startLine,
int endLine,
int start_offset,
int end_offset,
String function_call)
adds an inline function to this DOMSource object. |
void |
addInlineFunction(DOMFunction function)
Adds an inline function to this source. |
void |
addInlineInst(String instance,
int start_inline,
int length,
int PCLine,
int line)
add an inline instance to this source instance. |
void |
addLine(DOMLine line)
add a DOMLine element |
void |
addLine(int lineno,
String text,
boolean is_executable,
boolean has_break,
int offset_index,
long pc)
creates a line Element under this source Element |
DOMFunction |
findFunction(int lineNum)
Search the functions which are children to this DOMSource to find the DOMFunction which contains the requested line number. |
String |
getContent()
|
protected Element |
getElement()
This method should only be used internally from the frysk source window dom |
String |
getFileName()
get the name of the source file where this source resides |
String |
getFilePath()
get the path to the source file |
DOMFunction |
getFunction(String name)
attempts to fetch an inlined function DOM element |
Iterator |
getFunctions()
|
String |
getIncludes()
get the path to the source file |
Iterator |
getInlinedFunctions()
get all of the inlined function declarations in this source file |
DOMInlineInstance |
getInlineInst(String inst_name)
get the DOMInlineInstance associated with this instance |
Iterator |
getInlines(int lineNum)
gets all of the inline instances attached with the requested line number |
DOMLine |
getLine(int num)
Attempts to return the DOMLine corresponding to the given line in the file. |
int |
getLineCount()
get the line count for this Source element |
Iterator |
getLines()
gets all of the lines in this source file |
DOMLine |
getLineSpanningOffset(int offset)
find out which line a given character offset resides is |
boolean |
getParserError()
get the parseError value for this source |
boolean |
isParsed()
return a boolean indicating whether or not this source has been parsed for marking up |
void |
setContent(String con)
|
void |
setFileName(String name)
sets the name of the file containing the source |
void |
setFilePath(String path)
set the path to the source file for this source element |
void |
setParsed(boolean value)
set the isParsed boolean value for this source |
void |
setParserError(boolean value)
set the parseError value for this source |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String FILEPATH_ATTR
public static final String FILENAME_ATTR
public static final String SOURCE_NODE
public static final String IS_PARSED
public static final String PARSER_ERROR
public static final String ADDR_ATTR
public static final String TEXT_ATTR
public static final String INCLUDES
private String content
private Element myElement
Constructor Detail |
---|
public DOMSource(Element data)
JDOM
- element datapublic DOMSource(String filename, String filepath, String[] includepaths)
filename
- is a String with the name of the filefilepath
- is a String with the path to the fileinclude
- paths is a String array with the include paths used to
compile this source fileMethod Detail |
---|
public void setFileName(String name)
name
- to set the filename topublic int getLineCount()
public String getFileName()
public void setFilePath(String path)
new
- path to set the FILEPATH_ATTR topublic String getFilePath()
public String getIncludes()
public void addFunction(String inline_name, int startLine, int endLine, int start_offset, int end_offset, String function_call)
inline_name
- is the name of the inline functionsource
- is the name of the source this function came fromstartLine
- is the starting line number of this function in the sourceendLine
- is the ending line number of this function in the sourcestart_offset
- is the starting character offset from the beginning
of the file of the first character of the functionend_offset
- is the ending character offset from the beginning
of the file of the last character of the functionpublic Iterator getFunctions()
public DOMFunction findFunction(int lineNum)
lineNum
- The source line inside the function being searched for.
public DOMFunction getFunction(String name)
name
- of the inlined function to return
public void addLine(int lineno, String text, boolean is_executable, boolean has_break, int offset_index, long pc)
lineno
- - line number to addtext
- - text of the line to addis_executable
- - is this line executablehas_break
- - does this line have a breakpointoffset_index
- - character offset of this line from the start of the
filepc(program
- counter) for this linepublic Iterator getLines()
public DOMLine getLine(int num)
num
- The line number to get
public DOMLine getLineSpanningOffset(int offset)
offset
- is the character position from the start of the file
public void addLine(DOMLine line)
line
- is the DOMLine element to addpublic void addInlineInst(String instance, int start_inline, int length, int PCLine, int line)
instance
- is the name of the instance to addstart_inline
- is the starting character of this instance in this lineend_line
- is the ending character of this instance in this linepublic DOMInlineInstance getInlineInst(String inst_name)
inst
- is the name of the instance to retrieve
public Iterator getInlines(int lineNum)
lineNum
- The line number in the source jumping to the inlined instance.
public Iterator getInlinedFunctions()
public void addInlineFunction(DOMFunction function)
function
- The inlined function declaration to addprotected Element getElement()
public boolean isParsed()
public void setParsed(boolean value)
value
- is the boolean value to set the isParsed attribute topublic void setParserError(boolean value)
value
- = true is the parser errored while parsing this source code
false if notpublic boolean getParserError()
public void setContent(String con)
public String getContent()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |