@Test public void match() { MacroMarkerBlockMatcher matcher = new MacroMarkerBlockMatcher("macro1", "macro2"); MacroMarkerBlock macroMarkerBlock1 = new MacroMarkerBlock("macro1", Collections.emptyMap(), "content1", Collections.emptyList(), false); MacroMarkerBlock macroMarkerBlock2 = new MacroMarkerBlock("macro2", Collections.emptyMap(), "content2", Collections.emptyList(), false); MacroMarkerBlock macroMarkerBlock3 = new MacroMarkerBlock("macro3", Collections.emptyMap(), "content3", Collections.emptyList(), false); assertTrue(matcher.match(macroMarkerBlock1)); assertTrue(matcher.match(macroMarkerBlock2)); assertFalse(matcher.match(macroMarkerBlock3)); assertFalse(matcher.match(new WordBlock("nomatch"))); }
@Override public boolean match(Block block) { return super.match(block) && this.macroIds.contains(((MacroMarkerBlock) block).getId()); }
MacroMarkerBlockMatcher extends ClassBlockMatcher { @Override public boolean match(Block block) { return super.match(block) && this.macroIds.contains(((MacroMarkerBlock) block).getId()); } }
MacroMarkerBlockMatcher extends ClassBlockMatcher { @Override public boolean match(Block block) { return super.match(block) && this.macroIds.contains(((MacroMarkerBlock) block).getId()); } MacroMarkerBlockMatcher(String... macroIds); }
MacroMarkerBlockMatcher extends ClassBlockMatcher { @Override public boolean match(Block block) { return super.match(block) && this.macroIds.contains(((MacroMarkerBlock) block).getId()); } MacroMarkerBlockMatcher(String... macroIds); @Override boolean match(Block block); }
MacroMarkerBlockMatcher extends ClassBlockMatcher { @Override public boolean match(Block block) { return super.match(block) && this.macroIds.contains(((MacroMarkerBlock) block).getId()); } MacroMarkerBlockMatcher(String... macroIds); @Override boolean match(Block block);  }