if (condition.getSelector2Path() == null) return new SameNodeJoinCondition(replacement1, replacement2);
return new SameNodeJoinCondition(replacement1, replacement2, condition.getSelector2Path());
}
if (joinCondition instanceof ChildNodeJoinCondition) {
ChildNodeJoinCondition condition = (ChildNodeJoinCondition)joinCondition;
SelectorName childSelector = condition.childSelectorName();
SelectorName parentSelector = condition.parentSelectorName();
if (childSelector.equals(viewName)) childSelector = sourceName;
if (parentSelector.equals(viewName)) parentSelector = sourceName;
if (childSelector == condition.childSelectorName() && parentSelector == condition.parentSelectorName()) return condition;
node.addSelector(childSelector, parentSelector);