diff options
Diffstat (limited to 'src/main/java/com/jogamp/gluegen/jcpp/SourceIterator.java')
-rw-r--r-- | src/main/java/com/jogamp/gluegen/jcpp/SourceIterator.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/main/java/com/jogamp/gluegen/jcpp/SourceIterator.java b/src/main/java/com/jogamp/gluegen/jcpp/SourceIterator.java index 4990512..db29822 100644 --- a/src/main/java/com/jogamp/gluegen/jcpp/SourceIterator.java +++ b/src/main/java/com/jogamp/gluegen/jcpp/SourceIterator.java @@ -1,6 +1,6 @@ /* * Anarres C Preprocessor - * Copyright (c) 2007-2008, Shevek + * Copyright (c) 2007-2015, Shevek * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,6 +20,7 @@ import java.io.IOException; import java.util.Iterator; import java.util.NoSuchElementException; +import javax.annotation.Nonnull; import static com.jogamp.gluegen.jcpp.Token.EOF; /** @@ -31,7 +32,7 @@ public class SourceIterator implements Iterator<Token> { private final Source source; private Token tok; - public SourceIterator(Source s) { + public SourceIterator(@Nonnull Source s) { this.source = s; this.tok = null; } @@ -57,6 +58,7 @@ public class SourceIterator implements Iterator<Token> { * @throws IllegalStateException if the Source * throws a LexerException or IOException */ + @Override public boolean hasNext() { advance(); return tok.getType() != EOF; @@ -69,6 +71,7 @@ public class SourceIterator implements Iterator<Token> { * @throws IllegalStateException if the Source * throws a LexerException or IOException */ + @Override public Token next() { if (!hasNext()) throw new NoSuchElementException(); @@ -80,8 +83,9 @@ public class SourceIterator implements Iterator<Token> { /** * Not supported. * - * @throws UnsupportedOperationException. + * @throws UnsupportedOperationException unconditionally. */ + @Override public void remove() { throw new UnsupportedOperationException(); } |