org.eclipse.viatra.query.runtime.api.ViatraQueryEngine.getCurrentMatchers()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(62)

本文整理了Java中org.eclipse.viatra.query.runtime.api.ViatraQueryEngine.getCurrentMatchers()方法的一些代码示例,展示了ViatraQueryEngine.getCurrentMatchers()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ViatraQueryEngine.getCurrentMatchers()方法的具体详情如下:
包路径:org.eclipse.viatra.query.runtime.api.ViatraQueryEngine
类名称:ViatraQueryEngine
方法名:getCurrentMatchers

ViatraQueryEngine.getCurrentMatchers介绍

[英]Access a copy of available ViatraQueryMatcher pattern matchers.
[中]访问可用ViatraQueryMatcher模式匹配器的副本。

代码示例

代码示例来源:origin: org.eclipse.viatra/org.eclipse.viatra.query.runtime

public Set<IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>> getRegisteredQuerySpecifications() {
  return getCurrentMatchers().stream().map(ViatraQueryMatcher::getSpecification).collect(Collectors.toSet());
}

代码示例来源:origin: org.eclipse.viatra/org.eclipse.viatra.query.patternlanguage.emf

/**
 * Initializes a pattern-specification mapping with the contents of an existing {@link ViatraQueryEngine}. </p>
 * <p>
 * <strong>Warning</strong> It is assumed that each query specification in the engine has a unique fqn - if the
 * assumption fails, the resulting map is unspecified.
 * 
 * @param engine
 */
public NameToSpecificationMap(ViatraQueryEngine engine) {
  this();
  for (ViatraQueryMatcher<?> matcher : engine.getCurrentMatchers()) {
    IQuerySpecification<?> specification = matcher.getSpecification();
    map.put(specification.getFullyQualifiedName(), specification);
  }
}

相关文章