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

gumtree.spoon.diff.operations.AdditionOperation Maven / Gradle / Ivy

Go to download

Computes the AST difference between two Spoon abstract syntax trees using the Gumtree algorithm.

There is a newer version: 1.94
Show newest version
package gumtree.spoon.diff.operations;

import com.github.gumtreediff.actions.model.Addition;
import gumtree.spoon.builder.SpoonGumTreeBuilder;
import spoon.reflect.declaration.CtElement;

abstract class AdditionOperation extends Operation {
	private final CtElement parent;
	private final int position;

	AdditionOperation(T action) {
		super(action);
		position = action.getPosition();
		parent = (CtElement) action.getParent().getMetadata(SpoonGumTreeBuilder.SPOON_OBJECT);
	}

	public int getPosition() {
		return position;
	}

	public CtElement getParent() {
		return parent;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy