Class VariationTreeAdapter<L extends Label>
java.lang.Object
com.github.gumtreediff.tree.AbstractTree
org.variantsync.diffdetective.gumtree.VariationTreeAdapter<L>
- All Implemented Interfaces:
com.github.gumtreediff.tree.Tree
- Direct Known Subclasses:
VariationDiffAdapter
Adapter for running Gumtree's matching algorithms on variation trees.
This class is an adapter for a
snapshot of a variation tree. This means that it doesn't reflect most changes to the underlying
variation tree. Essentially it creates a copy of the tree structure and the labels of a variation
tree by stores a reference to the variation node which it adapts.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.github.gumtreediff.tree.AbstractTree
com.github.gumtreediff.tree.AbstractTree.EmptyEntryIterator -
Field Summary
FieldsFields inherited from class com.github.gumtreediff.tree.AbstractTree
children, metrics, parentFields inherited from interface com.github.gumtreediff.tree.Tree
NO_LABEL, NO_POS, urlPattern -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.github.gumtreediff.tree.TreedeepCopy()getLabel()intUses line numbers instead of byte indexes.getMetadata(String arg0) intgetPos()Uses line numbers instead of byte indexes.com.github.gumtreediff.tree.TypegetType()VariationNode<?, L> protected VariationTreeAdapternewInstance(VariationNode<?, L> node) voidvoidsetLength(int length) setMetadata(String name, Object value) voidsetPos(int pos) voidsetType(com.github.gumtreediff.tree.Type type) Methods inherited from class com.github.gumtreediff.tree.AbstractTree
addChild, getChildren, getMetrics, getParent, insertChild, setChildren, setMetrics, setParent, setParentAndUpdateChildren, toString, toTreeStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.github.gumtreediff.tree.Tree
breadthFirst, getChild, getChild, getChildPosition, getDescendants, getEndPos, getParents, getTreesBetweenPositions, hasLabel, hasSameType, hasSameTypeAndLabel, isIsomorphicTo, isIsoStructuralTo, isLeaf, isRoot, positionInParent, postOrder, preOrder, searchSubtree
-
Field Details
-
cachedLabel
-
backingNode
-
-
Constructor Details
-
VariationTreeAdapter
-
-
Method Details
-
newInstance
-
getVariationNode
-
getLabel
-
getLength
public int getLength()Uses line numbers instead of byte indexes. -
getMetadata
-
getMetadata
-
getPos
public int getPos()Uses line numbers instead of byte indexes. -
getType
public com.github.gumtreediff.tree.Type getType() -
setLabel
-
setLength
public void setLength(int length) -
setMetadata
-
setPos
public void setPos(int pos) -
setType
public void setType(com.github.gumtreediff.tree.Type type) -
deepCopy
public com.github.gumtreediff.tree.Tree deepCopy()
-