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

org.refactoringminer.astDiff.models.ProjectASTDiff Maven / Gradle / Ivy

package org.refactoringminer.astDiff.models;

import com.github.gumtreediff.tree.TreeContext;
import gr.uom.java.xmi.diff.UMLModelDiff;
import org.refactoringminer.api.Refactoring;

import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;

public class ProjectASTDiff {
	private final Set diffSet = new LinkedHashSet<>();
	private final Set moveDiffSet = new LinkedHashSet<>();
	private final Map fileContentsBefore;
	private final Map fileContentsAfter;
	private List refactorings;
	private Map parentContextMap;
	private Map childContextMap;
	private UMLModelDiff modelDiff;

	public ProjectASTDiff(Map fileContentsBefore, Map fileContentsAfter) {
		this.fileContentsBefore = fileContentsBefore;
		this.fileContentsAfter = fileContentsAfter;
	}

	public Map getFileContentsBefore() {
		return fileContentsBefore;
	}

	public Map getFileContentsAfter() {
		return fileContentsAfter;
	}

	public Set getDiffSet() {
		return diffSet;
	}

	public Set getMoveDiffSet() {
		return moveDiffSet;
	}

	public void addASTDiff(ASTDiff diff) {
		diffSet.add(diff);
	}

	public void addMoveASTDiff(ASTDiff diff) {
		moveDiffSet.add(diff);
	}
	public void addMoveASTDiff(Set diffs) {
		moveDiffSet.addAll(diffs);
	}

	public void setRefactorings(List refactorings) {this.refactorings = refactorings;}

	public List getRefactorings() { return refactorings;}

	public void setModelDiff(UMLModelDiff modelDiff) {
		this.modelDiff = modelDiff;
	}

	public UMLModelDiff getModelDiff() {
		return modelDiff;
	}

	public void setParentContextMap(Map treeContextMap) {
		this.parentContextMap = treeContextMap;
	}

	public void setChildContextMap(Map treeContextMap) {
		this.childContextMap = treeContextMap;
	}

	public Map getParentContextMap() {
		return parentContextMap;
	}

	public Map getChildContextMap() {
		return childContextMap;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy