public DelegatingCodeBaseIterator(ICodeBase frontEndCodeBase, IScannableCodeBase delegateCodeBase) throws InterruptedException { this.frontEndCodeBase = frontEndCodeBase; this.delegateCodeBaseIterator = delegateCodeBase.iterator(); }
public ICodeBaseIterator iterator() throws InterruptedException { if (codeBase instanceof IScannableCodeBase) { return ((IScannableCodeBase) codeBase).iterator(); } else { return new ICodeBaseIterator() { @Override public boolean hasNext() throws InterruptedException { return false; } @Override public ICodeBaseEntry next() throws InterruptedException { throw new UnsupportedOperationException(); } }; } } }
private void assertHasCodeBase(IScannableCodeBase codeBase) throws Exception { assertNotNull(codeBase); assertTrue(codeBase.iterator().hasNext()); } }
private void assertHasNoCodeBase(IScannableCodeBase codeBase) throws Exception { assertNotNull(codeBase); assertFalse(codeBase.iterator().hasNext()); }
ICodeBaseIterator i = codeBase.iterator(); while (i.hasNext()) { ICodeBaseEntry entry = i.next();
public DelegatingCodeBaseIterator(ICodeBase frontEndCodeBase, IScannableCodeBase delegateCodeBase) throws InterruptedException { this.frontEndCodeBase = frontEndCodeBase; this.delegateCodeBaseIterator = delegateCodeBase.iterator(); }
public ICodeBaseIterator iterator() throws InterruptedException { if (codeBase instanceof IScannableCodeBase) { return ((IScannableCodeBase) codeBase).iterator(); } else { return new ICodeBaseIterator() { @Override public boolean hasNext() throws InterruptedException { return false; } @Override public ICodeBaseEntry next() throws InterruptedException { throw new UnsupportedOperationException(); } }; } } }
ICodeBaseIterator i = codeBase.iterator(); while (i.hasNext()) { ICodeBaseEntry entry = i.next();