JBBPTokenizer implements Iterable<JBBPToken>, Iterator<JBBPToken> { @Override public JBBPToken next() { if (this.detectedException != null) { final JBBPTokenizerException ex = this.detectedException; this.detectedException = null; throw ex; } final JBBPToken current = this.nextItem; if (current == null) { throw new NoSuchElementException("Parsing has been completed"); } readNextItem(); return current; } JBBPTokenizer(final String str);  JBBPTokenizer(final String str, final JBBPCustomFieldTypeProcessor customFieldTypeProcessor); static boolean isGlobalReservedName(final String name); @SuppressWarnings("NullableProblems") @Override Iterator<JBBPToken> iterator(); @Override boolean hasNext(); @Override JBBPToken next(); @Override void remove();  }
@Test public void testNotAllowesNameError() { assertThrows(JBBPTokenizerException.class, () -> new JBBPTokenizer("int $$;").next()); assertThrows(JBBPTokenizerException.class, () -> new JBBPTokenizer("int $a;").next()); assertThrows(JBBPTokenizerException.class, () -> new JBBPTokenizer("int a%d;").next()); assertThrows(JBBPTokenizerException.class, () -> new JBBPTokenizer("int 1a;").next()); assertThrows(JBBPTokenizerException.class, () -> new JBBPTokenizer("int _;").next()); }