@Test public void testCatchProcessor() throws Exception { final String[] args = { "-i", "src/test/resources/src/", "-o", "target/spooned/" }; final Launcher launcher = new Launcher(); launcher.setArgs(args); launcher.run(); final Factory factory = launcher.getFactory(); final ProcessingManager processingManager = new QueueProcessingManager(factory); final CatchProcessor processor = new CatchProcessor(); processingManager.addProcessor(processor); processingManager.process(factory.Class().getAll()); assertEquals(2, processor.emptyCatchs.size()); }
@Override public void process(CtCatch element) { getEnvironment().report(this, Level.WARN, element, "empty catch clause " + element.getPosition().toString()); emptyCatchs.add(element); }
CatchProcessor extends AbstractProcessor<CtCatch> { @Override public void process(CtCatch element) { getEnvironment().report(this, Level.WARN, element, "empty catch clause " + element.getPosition().toString()); emptyCatchs.add(element); } }
CatchProcessor extends AbstractProcessor<CtCatch> { @Override public void process(CtCatch element) { getEnvironment().report(this, Level.WARN, element, "empty catch clause " + element.getPosition().toString()); emptyCatchs.add(element); }  }
CatchProcessor extends AbstractProcessor<CtCatch> { @Override public void process(CtCatch element) { getEnvironment().report(this, Level.WARN, element, "empty catch clause " + element.getPosition().toString()); emptyCatchs.add(element); }  @Override boolean isToBeProcessed(CtCatch candidate); @Override void process(CtCatch element); }
CatchProcessor extends AbstractProcessor<CtCatch> { @Override public void process(CtCatch element) { getEnvironment().report(this, Level.WARN, element, "empty catch clause " + element.getPosition().toString()); emptyCatchs.add(element); }  @Override boolean isToBeProcessed(CtCatch candidate); @Override void process(CtCatch element); final List<CtCatch> emptyCatchs; }