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.
  • Field Details

  • Constructor Details

    • VariationTreeAdapter

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

    • newInstance

      protected VariationTreeAdapter<L> 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 key)
    • 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 key, 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()