|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.redhat.rhn.common.filediff.RhnPatchDiffWriter
public class RhnPatchDiffWriter
Converts a list of hunks from a file diff to a unified output format for use with the Unix patch tool.
| Constructor Summary | |
|---|---|
RhnPatchDiffWriter(java.lang.String fromPath,
java.lang.String toPath,
java.util.Date fromDate,
java.util.Date toDate)
|
|
| Method Summary | |
|---|---|
void |
accept(ChangeHunk hunk)
Standard visitor |
void |
accept(DeleteHunk hunk)
Standard visitor |
void |
accept(InsertHunk hunk)
Standard visitor |
void |
accept(MatchHunk hunk)
Standard visitor |
java.lang.String |
getResult()
|
void |
writeHunk(Hunk hunkIn)
Write the diff, one hunk at a time. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RhnPatchDiffWriter(java.lang.String fromPath,
java.lang.String toPath,
java.util.Date fromDate,
java.util.Date toDate)
fromPath - The from(old, first) file's pathtoPath - The to(new, second) file's pathfromDate - The from(old, first) file's last modified date.toDate - The to(new, second) file's last modified date.| Method Detail |
|---|
public void writeHunk(Hunk hunkIn)
writeHunk in interface DiffWriterhunkIn - A collection of lines for a diff that represents a similar edit statepublic void accept(ChangeHunk hunk)
accept in interface DiffVisitorhunk - ChangeHunkpublic void accept(DeleteHunk hunk)
accept in interface DiffVisitorhunk - DeleteHunkpublic void accept(InsertHunk hunk)
accept in interface DiffVisitorhunk - InsertHunkpublic void accept(MatchHunk hunk)
accept in interface DiffVisitorhunk - MatchHunkpublic java.lang.String getResult()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||