*
* @param candidate
* to add to the container
*/
public void addCandidate(RefactoringCandidate candidate) {
StructureDiffNode node = candidate.getDiffNode();
if (node.isAddition()) {
if (node.getRight().isClassOrInterface()) {
fAddedInnerClasses.add(candidate);
} else if (node.getRight().isMethodOrConstructor()) {
fAddedMethods.add(candidate);
} else if (node.getRight().isField()) {
fAddedFields.add(candidate);
}
} else if (node.isDeletion()) {
if (node.getLeft().isClassOrInterface()) {
fDeletedInnerClasses.add(candidate);
} else if (node.getLeft().isMethodOrConstructor()) {
fDeletedMethods.add(candidate);
} else if (node.getLeft().isField()) {
fDeletedFields.add(candidate);
}
}
}