net.mtu.eggplant.dbc
Class CodeModification
java.lang.Object
net.mtu.eggplant.dbc.CodeFragment
net.mtu.eggplant.dbc.CodeModification
- All Implemented Interfaces:
- Comparable
- public class CodeModification
- extends CodeFragment
Used for representing a modification to code, rather than just a chunck of
code to be inserted.
- Version:
- $Revision: 1.6 $
CodeModification
public CodeModification(CodePoint start,
String searchText,
String replaceText,
CodeFragmentType type)
- Parameters:
start
- the start of the region to modifysearchText
- what to find in the regionreplaceText
- what to replace search withtype
- the type of assertion this is- PreConditions
- (start != null), (searchText != null), (replaceText != null)
getSearchText
public final String getSearchText()
getReplaceText
public final String getReplaceText()
instrumentLine
public int instrumentLine(int offset,
StringBuffer line)
- Description copied from class:
CodeFragment
- Instrument the given line.
- Overrides:
instrumentLine
in class CodeFragment
- Parameters:
offset
- how many characters have been added to this line since it was pulled from the fileline
- the line to modify
- Returns:
- the new offset