Class CommentBasedModelTraversal<E extends ITraverser>

java.lang.Object
de.monticore.tf.runtime.matching.ModelTraversal<E>
de.monticore.tf.runtime.matching.CommentBasedModelTraversal<E>
Type Parameters:
E - a language traverser type

public class CommentBasedModelTraversal<E extends ITraverser> extends ModelTraversal<E>
This CommentBasedModelTraversal is a more efficient implementation of the default ModelTraversal. Instead of using a HashMap to store node parents, which showed unexpected performance issues due to the suboptimal hash function of ASTNodes, this Traversal stores node parents as Comment objects in the respective child nodes. Thereby map lookups are prevented and replaced by efficient direct lookups.
  • Constructor Details

    • CommentBasedModelTraversal

      protected CommentBasedModelTraversal(E traverser)
  • Method Details