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

public class VariationTreeAdapter<L extends Label> extends com.github.gumtreediff.tree.AbstractTree
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
    Modifier and Type
    Field
    Description
    private VariationNode<?,L>
     
    private String
     

    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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.github.gumtreediff.tree.Tree
     
     
    int
    Uses line numbers instead of byte indexes.
     
     
    int
    Uses line numbers instead of byte indexes.
    com.github.gumtreediff.tree.Type
     
     
     
    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

  • Constructor Details

    • VariationTreeAdapter

      public VariationTreeAdapter(VariationNode<?,L> node)
  • Method Details

    • newInstance

      protected VariationTreeAdapter newInstance(VariationNode<?,L> node)
    • getVariationNode

      public VariationNode<?,L> getVariationNode()
    • getLabel

      public String getLabel()
    • getLength

      public int getLength()
      Uses line numbers instead of byte indexes.
    • getMetadata

      public Iterator<Map.Entry<String,Object>> getMetadata()
    • getMetadata

      public Object getMetadata(String arg0)
    • getPos

      public int getPos()
      Uses line numbers instead of byte indexes.
    • getType

      public com.github.gumtreediff.tree.Type getType()
    • setLabel

      public void setLabel(String label)
    • setLength

      public void setLength(int length)
    • setMetadata

      public Object setMetadata(String name, Object value)
    • setPos

      public void setPos(int pos)
    • setType

      public void setType(com.github.gumtreediff.tree.Type type)
    • deepCopy

      public com.github.gumtreediff.tree.Tree deepCopy()