@Test @SuppressWarnings("unchecked") public void testNotAccepts() { when(ruleExtension.getTypeArguments()).thenReturn(new Class[]{DefinitionC.class}); when(containmentContext.getCandidates()).thenReturn(candidates); when(containmentContext.getParent()).thenReturn(parentNode); assertFalse(tested.accepts(ruleExtension, containmentContext)); }
@Override @SuppressWarnings("unchecked") public boolean accepts(final RuleExtension rule, final NodeContainmentContext context) { final Collection<Node<? extends Definition<?>, ? extends Edge>> candidates = context.getCandidates(); return candidates.stream() .anyMatch(node -> hasAnyEdgeOfInterest(node, rule.getId())); }
ConnectorParentsMatchContainmentHandler extends AbstractParentsMatchHandler<ConnectorParentsMatchContainmentHandler, NodeContainmentContext> { @Override @SuppressWarnings("unchecked") public boolean accepts(final RuleExtension rule, final NodeContainmentContext context) { final Collection<Node<? extends Definition<?>, ? extends Edge>> candidates = context.getCandidates(); return candidates.stream() .anyMatch(node -> hasAnyEdgeOfInterest(node, rule.getId())); } }
ConnectorParentsMatchContainmentHandler extends AbstractParentsMatchHandler<ConnectorParentsMatchContainmentHandler, NodeContainmentContext> { @Override @SuppressWarnings("unchecked") public boolean accepts(final RuleExtension rule, final NodeContainmentContext context) { final Collection<Node<? extends Definition<?>, ? extends Edge>> candidates = context.getCandidates(); return candidates.stream() .anyMatch(node -> hasAnyEdgeOfInterest(node, rule.getId())); } protected  ConnectorParentsMatchContainmentHandler(); @Inject  ConnectorParentsMatchContainmentHandler(final DefinitionManager definitionManager,
                                                   final TreeWalkTraverseProcessor treeWalkTraverseProcessor); }
ConnectorParentsMatchContainmentHandler extends AbstractParentsMatchHandler<ConnectorParentsMatchContainmentHandler, NodeContainmentContext> { @Override @SuppressWarnings("unchecked") public boolean accepts(final RuleExtension rule, final NodeContainmentContext context) { final Collection<Node<? extends Definition<?>, ? extends Edge>> candidates = context.getCandidates(); return candidates.stream() .anyMatch(node -> hasAnyEdgeOfInterest(node, rule.getId())); } protected  ConnectorParentsMatchContainmentHandler(); @Inject  ConnectorParentsMatchContainmentHandler(final DefinitionManager definitionManager,
                                                   final TreeWalkTraverseProcessor treeWalkTraverseProcessor); @Override Class<ConnectorParentsMatchContainmentHandler> getExtensionType(); @Override Class<NodeContainmentContext> getContextType(); @Override @SuppressWarnings("unchecked") boolean accepts(final RuleExtension rule,
                           final NodeContainmentContext context); @Override RuleViolations evaluate(final RuleExtension rule,
                                   final NodeContainmentContext context); }
ConnectorParentsMatchContainmentHandler extends AbstractParentsMatchHandler<ConnectorParentsMatchContainmentHandler, NodeContainmentContext> { @Override @SuppressWarnings("unchecked") public boolean accepts(final RuleExtension rule, final NodeContainmentContext context) { final Collection<Node<? extends Definition<?>, ? extends Edge>> candidates = context.getCandidates(); return candidates.stream() .anyMatch(node -> hasAnyEdgeOfInterest(node, rule.getId())); } protected  ConnectorParentsMatchContainmentHandler(); @Inject  ConnectorParentsMatchContainmentHandler(final DefinitionManager definitionManager,
                                                   final TreeWalkTraverseProcessor treeWalkTraverseProcessor); @Override Class<ConnectorParentsMatchContainmentHandler> getExtensionType(); @Override Class<NodeContainmentContext> getContextType(); @Override @SuppressWarnings("unchecked") boolean accepts(final RuleExtension rule,
                           final NodeContainmentContext context); @Override RuleViolations evaluate(final RuleExtension rule,
                                   final NodeContainmentContext context);  }