/** * Parent must match {@link #filterSourceSection} and child must match {@link #inputFilter}. */ boolean isChildInstrumentedLeaf(Set<Class<?>> providedTags, RootNode rootNode, Node parent, SourceSection parentSourceSection, Node current, SourceSection currentSourceSection) { if (inputFilter == null) { return false; } else if (rootNode == null) { return false; } else if (!InstrumentationHandler.isInstrumentableNode(parent, parentSourceSection)) { return false; } if (isInstrumentedLeaf(providedTags, parent, parentSourceSection) && inputFilter.isInstrumentedNode(providedTags, current, currentSourceSection)) { return true; } return false; }
/** * Parent must match {@link #filterSourceSection} and child must match {@link #inputFilter}. */ boolean isChildInstrumentedLeaf(Set<Class<?>> providedTags, RootNode rootNode, Node parent, SourceSection parentSourceSection, Node current, SourceSection currentSourceSection) { if (inputFilter == null) { return false; } else if (rootNode == null) { return false; } else if (!InstrumentationHandler.isInstrumentableNode(parent, parentSourceSection)) { return false; } if (isInstrumentedLeaf(providedTags, parent, parentSourceSection) && inputFilter.isInstrumentedNode(providedTags, current, currentSourceSection)) { return true; } return false; }
/** * Parent must match {@link #filterSourceSection} and child must match {@link #inputFilter}. */ boolean isChildInstrumentedFull(Set<Class<?>> providedTags, RootNode rootNode, Node parent, SourceSection parentSourceSection, Node current, SourceSection currentSourceSection) { if (inputFilter == null) { return false; } else if (rootNode == null) { return false; } else if (!InstrumentationHandler.isInstrumentableNode(parent, parentSourceSection)) { return false; } if (isInstrumentedLeaf(providedTags, parent, parentSourceSection) && inputFilter.isInstrumentedNode(providedTags, current, currentSourceSection)) { return isInstrumentedRoot(providedTags, rootNode, rootNode.getSourceSection(), 0); } return false; }
/** * Parent must match {@link #filterSourceSection} and child must match {@link #inputFilter}. */ boolean isChildInstrumentedFull(Set<Class<?>> providedTags, RootNode rootNode, Node parent, SourceSection parentSourceSection, Node current, SourceSection currentSourceSection) { if (inputFilter == null) { return false; } else if (rootNode == null) { return false; } else if (!InstrumentationHandler.isInstrumentableNode(parent, parentSourceSection)) { return false; } if (isInstrumentedLeaf(providedTags, parent, parentSourceSection) && inputFilter.isInstrumentedNode(providedTags, current, currentSourceSection)) { return isInstrumentedRoot(providedTags, rootNode, rootNode.getSourceSection(), 0); } return false; }
@Override protected final void visitInstrumentable(Node parentInstrumentable, SourceSection parentSourceSection, Node instrumentableNode, SourceSection sourceSection) { if (binding.isInstrumentedLeaf(providedTags, instrumentableNode, sourceSection) || binding.isChildInstrumentedLeaf(providedTags, root, parentInstrumentable, parentSourceSection, instrumentableNode, sourceSection)) { if (TRACE) { traceFilterCheck("hit", providedTags, binding, instrumentableNode, sourceSection); } visitInstrumented(instrumentableNode, sourceSection); } else { if (TRACE) { traceFilterCheck("miss", providedTags, binding, instrumentableNode, sourceSection); } } }
@Override protected final void visitInstrumentable(Node parentInstrumentable, SourceSection parentSourceSection, Node instrumentableNode, SourceSection sourceSection) { if (binding.isInstrumentedLeaf(providedTags, instrumentableNode, sourceSection) || binding.isChildInstrumentedLeaf(providedTags, root, parentInstrumentable, parentSourceSection, instrumentableNode, sourceSection)) { if (TRACE) { traceFilterCheck("hit", providedTags, binding, instrumentableNode, sourceSection); } visitInstrumented(instrumentableNode, sourceSection); } else { if (TRACE) { traceFilterCheck("miss", providedTags, binding, instrumentableNode, sourceSection); } } }
boolean isInstrumentedFull(Set<Class<?>> providedTags, RootNode rootNode, Node node, SourceSection nodeSourceSection) { if (isInstrumentedLeaf(providedTags, node, nodeSourceSection)) { if (rootNode == null) { return false; } return isInstrumentedRoot(providedTags, rootNode, rootNode.getSourceSection(), 0); } return false; }
boolean isInstrumentedFull(Set<Class<?>> providedTags, RootNode rootNode, Node node, SourceSection nodeSourceSection) { if (isInstrumentedLeaf(providedTags, node, nodeSourceSection)) { if (rootNode == null) { return false; } return isInstrumentedRoot(providedTags, rootNode, rootNode.getSourceSection(), 0); } return false; }