diff options
author | Sven Gothel <[email protected]> | 2023-08-08 11:08:16 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-08-08 11:08:16 +0200 |
commit | e33d67ee14f6a5b999564b40ac0c659db92f2ce0 (patch) | |
tree | 2a314eb52ffc21f885e9bf42562234a9b93bdeea /src/main/java/com/jogamp/gluegen/jcpp/SourceIterator.java | |
parent | 00f97cc623469377c59985898b9b765ae66c0aee (diff) | |
parent | 5e50e75ec33f5b4567cabfd60b6baca39524a8b7 (diff) |
Merge remote-tracking branch 'upstream/master' into pulled
# Conflicts:
# build.gradle
# gradle.properties
# gradle/wrapper/gradle-wrapper.jar
# gradle/wrapper/gradle-wrapper.properties
# gradlew
# gradlew.bat
# src/main/java/com/jogamp/gluegen/jcpp/MacroTokenSource.java
# src/main/java/com/jogamp/gluegen/jcpp/Preprocessor.java
# src/main/java/com/jogamp/gluegen/jcpp/SourceIterator.java
# src/main/java/org/anarres/cpp/Main.java
# src/test/java/com/jogamp/gluegen/jcpp/PragmaTest.java
# src/test/java/com/jogamp/gluegen/jcpp/RegressionTest.java
# src/test/java/com/jogamp/gluegen/jcpp/VaArgsPastingTest.java
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(); } |