All Downloads are FREE. Search and download functionalities are using the official Maven repository.

gr.uom.java.xmi.diff.CandidateSplitMethodRefactoring Maven / Gradle / Ivy

package gr.uom.java.xmi.diff;

import java.util.LinkedHashSet;
import java.util.Set;

import gr.uom.java.xmi.VariableDeclarationContainer;
import gr.uom.java.xmi.decomposition.UMLOperationBodyMapper;

public class CandidateSplitMethodRefactoring {
	private Set splitMethods = new LinkedHashSet<>();
	private Set mappers = new LinkedHashSet<>();
	private VariableDeclarationContainer originalMethodBeforeSplit;

	public Set getSplitMethods() {
		return splitMethods;
	}

	public void addSplitMethod(VariableDeclarationContainer method) {
		splitMethods.add(method);
	}

	public Set getMappers() {
		return mappers;
	}

	public void addMapper(UMLOperationBodyMapper mapper) {
		mappers.add(mapper);
	}

	public VariableDeclarationContainer getOriginalMethodBeforeSplit() {
		return originalMethodBeforeSplit;
	}

	public void setOriginalMethodBeforeSplit(VariableDeclarationContainer method) {
		this.originalMethodBeforeSplit = method;
	}

	public boolean equals(CandidateSplitMethodRefactoring candidate) {
		return this.splitMethods.containsAll(candidate.splitMethods) &&
				candidate.splitMethods.containsAll(this.splitMethods) &&
				this.originalMethodBeforeSplit.equals(candidate.originalMethodBeforeSplit);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy