org.apache.commons.jrcs.diff
Class MergeVisitor

java.lang.Object
  extended by org.apache.commons.jrcs.diff.MergeVisitor
All Implemented Interfaces:
org.apache.commons.jrcs.diff.RevisionVisitor

public class MergeVisitor
extends java.lang.Object
implements org.apache.commons.jrcs.diff.RevisionVisitor

.. makes changes to the revisions it visits, so if a conflict is detected, the revisions should be discarded.

TODO: Support ignoring whitespace.


Field Summary
static org.apache.log4j.Category log
           
 
Constructor Summary
MergeVisitor()
           
 
Method Summary
 void init(java.lang.Object[] orig)
          Initialise this visitor instance with a copy of the original object array being diffed.
 void visit(org.apache.commons.jrcs.diff.AddDelta delta)
          Implementation of the Revision Visitor interface.
 void visit(org.apache.commons.jrcs.diff.ChangeDelta delta)
          Implementation of the Revision Visitor interface.
 void visit(org.apache.commons.jrcs.diff.DeleteDelta delta)
          Implementation of the Revision Visitor interface.
 void visit(org.apache.commons.jrcs.diff.Revision revision)
          Implementation of the Revision Visitor interface.
 boolean wasConflictDetected()
          Returns true if a conflict was detected.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

public static final org.apache.log4j.Category log
Constructor Detail

MergeVisitor

public MergeVisitor()
Method Detail

wasConflictDetected

public boolean wasConflictDetected()
Returns true if a conflict was detected.

Returns:
true if a conflict has been detected, false otherwise.

init

public void init(java.lang.Object[] orig)
Initialise this visitor instance with a copy of the original object array being diffed.

Parameters:
orig -

visit

public void visit(org.apache.commons.jrcs.diff.Revision revision)
Implementation of the Revision Visitor interface.

Specified by:
visit in interface org.apache.commons.jrcs.diff.RevisionVisitor
Parameters:
revision -

visit

public void visit(org.apache.commons.jrcs.diff.DeleteDelta delta)
Implementation of the Revision Visitor interface.

Specified by:
visit in interface org.apache.commons.jrcs.diff.RevisionVisitor
Parameters:
delta -

visit

public void visit(org.apache.commons.jrcs.diff.ChangeDelta delta)
Implementation of the Revision Visitor interface.

Specified by:
visit in interface org.apache.commons.jrcs.diff.RevisionVisitor
Parameters:
delta -

visit

public void visit(org.apache.commons.jrcs.diff.AddDelta delta)
Implementation of the Revision Visitor interface.

Specified by:
visit in interface org.apache.commons.jrcs.diff.RevisionVisitor
Parameters:
delta -


Copyright © 2003-2010 Atlassian. All Rights Reserved.