From 7607867f0bba56792cad320695d6209b49acce9d Mon Sep 17 00:00:00 2001 From: Harvey Harrison Date: Thu, 17 Oct 2013 21:34:47 -0700 Subject: gluegen: add all missing @Override annotations Signed-off-by: Harvey Harrison --- src/java/com/jogamp/common/nio/AbstractBuffer.java | 13 +++++++++++++ src/java/com/jogamp/common/nio/PointerBuffer.java | 5 +++++ 2 files changed, 18 insertions(+) (limited to 'src/java/com/jogamp/common/nio') diff --git a/src/java/com/jogamp/common/nio/AbstractBuffer.java b/src/java/com/jogamp/common/nio/AbstractBuffer.java index 4213a4d..1be279b 100644 --- a/src/java/com/jogamp/common/nio/AbstractBuffer.java +++ b/src/java/com/jogamp/common/nio/AbstractBuffer.java @@ -68,22 +68,27 @@ public abstract class AbstractBuffer implements Native this.position = 0; } + @Override public final int elementSize() { return elementSize; } + @Override public final int limit() { return capacity; } + @Override public final int capacity() { return capacity; } + @Override public final int position() { return position; } + @Override public final B position(int newPos) { if (0 > newPos || newPos >= capacity) { throw new IndexOutOfBoundsException("Sorry to interrupt, but the position "+newPos+" was out of bounds. " + @@ -93,31 +98,38 @@ public abstract class AbstractBuffer implements Native return (B)this; } + @Override public final int remaining() { return capacity - position; } + @Override public final boolean hasRemaining() { return position < capacity; } + @Override public final B rewind() { position = 0; return (B) this; } + @Override public final Buffer getBuffer() { return buffer; } + @Override public final boolean isDirect() { return buffer.isDirect(); } + @Override public final boolean hasArray() { return buffer.hasArray(); } + @Override public final int arrayOffset() { if( hasArray() ) { return buffer.arrayOffset(); @@ -126,6 +138,7 @@ public abstract class AbstractBuffer implements Native } } + @Override public Object array() throws UnsupportedOperationException { return buffer.array(); } diff --git a/src/java/com/jogamp/common/nio/PointerBuffer.java b/src/java/com/jogamp/common/nio/PointerBuffer.java index 4a479f0..5d470d5 100644 --- a/src/java/com/jogamp/common/nio/PointerBuffer.java +++ b/src/java/com/jogamp/common/nio/PointerBuffer.java @@ -117,6 +117,7 @@ public class PointerBuffer extends AbstractBuffer { /** * Relative bulk get method. Copy the source values src[position .. capacity] [ * to this buffer and increment the position by capacity-position. */ + @Override public final PointerBuffer put(PointerBuffer src) { if (remaining() < src.remaining()) { throw new IndexOutOfBoundsException(); @@ -147,6 +148,7 @@ public class PointerBuffer extends AbstractBuffer { } /** Relative get method. Get the pointer value at the current position and increment the position by one. */ + @Override public final long get() { long r = get(position); position++; @@ -154,6 +156,7 @@ public class PointerBuffer extends AbstractBuffer { } /** Absolute get method. Get the pointer value at the given index */ + @Override public final long get(int idx) { if (0 > idx || idx >= capacity) { throw new IndexOutOfBoundsException(); @@ -184,6 +187,7 @@ public class PointerBuffer extends AbstractBuffer { } /** Absolute put method. Put the pointer value at the given index */ + @Override public final PointerBuffer put(int idx, long v) { if (0 > idx || idx >= capacity) { throw new IndexOutOfBoundsException(); @@ -197,6 +201,7 @@ public class PointerBuffer extends AbstractBuffer { } /** Relative put method. Put the pointer value at the current position and increment the position by one. */ + @Override public final PointerBuffer put(long value) { put(position, value); position++; -- cgit v1.2.3