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
Fields inherited from class com.github.gumtreediff.tree.AbstractTree
children, metrics, parent
Fields inherited from interface com.github.gumtreediff.tree.Tree
NO_LABEL, NO_POS, urlPattern
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncom.github.gumtreediff.tree.Tree
deepCopy()
getLabel()
int
Uses line numbers instead of byte indexes.getMetadata
(String arg0) int
getPos()
Uses line numbers instead of byte indexes.com.github.gumtreediff.tree.Type
getType()
VariationNode<?,
L> protected VariationTreeAdapter
newInstance
(VariationNode<?, L> node) void
void
setLength
(int length) setMetadata
(String name, Object value) void
setPos
(int pos) void
setType
(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, toTreeString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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()
-