summaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/common
diff options
context:
space:
mode:
authorHarvey Harrison <[email protected]>2013-10-17 21:34:47 -0700
committerHarvey Harrison <[email protected]>2013-10-17 21:34:47 -0700
commit7607867f0bba56792cad320695d6209b49acce9d (patch)
tree36f348562c272f5b994c12519c27d5b06b233566 /src/java/com/jogamp/common
parent791a2749886f02ec7b8db25bf8862e8269b96da5 (diff)
gluegen: add all missing @Override annotations
Signed-off-by: Harvey Harrison <[email protected]>
Diffstat (limited to 'src/java/com/jogamp/common')
-rw-r--r--src/java/com/jogamp/common/jvm/JNILibLoaderBase.java3
-rw-r--r--src/java/com/jogamp/common/net/GenericURLStreamHandlerFactory.java1
-rw-r--r--src/java/com/jogamp/common/nio/AbstractBuffer.java13
-rw-r--r--src/java/com/jogamp/common/nio/PointerBuffer.java5
-rw-r--r--src/java/com/jogamp/common/os/DynamicLibraryBundle.java1
-rw-r--r--src/java/com/jogamp/common/os/MachineDescription.java1
-rw-r--r--src/java/com/jogamp/common/os/NativeLibrary.java5
-rw-r--r--src/java/com/jogamp/common/os/Platform.java1
-rw-r--r--src/java/com/jogamp/common/util/FloatStack.java1
-rw-r--r--src/java/com/jogamp/common/util/IntIntHashMap.java2
-rw-r--r--src/java/com/jogamp/common/util/LFRingbuffer.java2
-rw-r--r--src/java/com/jogamp/common/util/PropertyAccess.java1
-rw-r--r--src/java/com/jogamp/common/util/Ringbuffer.java1
-rw-r--r--src/java/com/jogamp/common/util/SecurityUtil.java2
-rw-r--r--src/java/com/jogamp/common/util/cache/TempFileCache.java3
15 files changed, 42 insertions, 0 deletions
diff --git a/src/java/com/jogamp/common/jvm/JNILibLoaderBase.java b/src/java/com/jogamp/common/jvm/JNILibLoaderBase.java
index 1b19d04..201fc59 100644
--- a/src/java/com/jogamp/common/jvm/JNILibLoaderBase.java
+++ b/src/java/com/jogamp/common/jvm/JNILibLoaderBase.java
@@ -88,6 +88,7 @@ public class JNILibLoaderBase {
}
private static class DefaultAction implements LoaderAction {
+ @Override
public boolean loadLibrary(String libname, boolean ignoreError, ClassLoader cl) {
boolean res = true;
if(!isLoaded(libname)) {
@@ -110,6 +111,7 @@ public class JNILibLoaderBase {
return res;
}
+ @Override
public void loadLibrary(String libname, String[] preload, boolean preloadIgnoreError, ClassLoader cl) {
if(!isLoaded(libname)) {
if (null!=preload) {
@@ -437,6 +439,7 @@ public class JNILibLoaderBase {
final String sunAppletLauncherClassName = "org.jdesktop.applet.util.JNLPAppletLauncher";
final Method loadLibraryMethod = AccessController.doPrivileged(new PrivilegedAction<Method>() {
+ @Override
public Method run() {
// FIXME: remove
final boolean usingJNLPAppletLauncher = Debug.getBooleanProperty(sunAppletLauncherProperty, true);
diff --git a/src/java/com/jogamp/common/net/GenericURLStreamHandlerFactory.java b/src/java/com/jogamp/common/net/GenericURLStreamHandlerFactory.java
index 4ec3f19..b5c5177 100644
--- a/src/java/com/jogamp/common/net/GenericURLStreamHandlerFactory.java
+++ b/src/java/com/jogamp/common/net/GenericURLStreamHandlerFactory.java
@@ -49,6 +49,7 @@ public class GenericURLStreamHandlerFactory implements URLStreamHandlerFactory {
public synchronized static GenericURLStreamHandlerFactory register() {
if(null == factory) {
factory = AccessController.doPrivileged(new PrivilegedAction<GenericURLStreamHandlerFactory>() {
+ @Override
public GenericURLStreamHandlerFactory run() {
boolean ok = false;
GenericURLStreamHandlerFactory f = new GenericURLStreamHandlerFactory();
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<B extends 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<B extends 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<B extends 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<PointerBuffer> {
/**
* Relative bulk get method. Copy the source values <code> src[position .. capacity] [</code>
* to this buffer and increment the position by <code>capacity-position</code>. */
+ @Override
public final PointerBuffer put(PointerBuffer src) {
if (remaining() < src.remaining()) {
throw new IndexOutOfBoundsException();
@@ -147,6 +148,7 @@ public class PointerBuffer extends AbstractBuffer<PointerBuffer> {
}
/** 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<PointerBuffer> {
}
/** 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<PointerBuffer> {
}
/** 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<PointerBuffer> {
}
/** 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++;
diff --git a/src/java/com/jogamp/common/os/DynamicLibraryBundle.java b/src/java/com/jogamp/common/os/DynamicLibraryBundle.java
index a69fd7a..6ac8d94 100644
--- a/src/java/com/jogamp/common/os/DynamicLibraryBundle.java
+++ b/src/java/com/jogamp/common/os/DynamicLibraryBundle.java
@@ -119,6 +119,7 @@ public class DynamicLibraryBundle implements DynamicLookupHelper {
}
info.getLibLoaderExecutor().invoke(true, new Runnable() {
+ @Override
public void run() {
loadLibraries();
} } ) ;
diff --git a/src/java/com/jogamp/common/os/MachineDescription.java b/src/java/com/jogamp/common/os/MachineDescription.java
index aea9de1..8ff3ff7 100644
--- a/src/java/com/jogamp/common/os/MachineDescription.java
+++ b/src/java/com/jogamp/common/os/MachineDescription.java
@@ -291,6 +291,7 @@ public class MachineDescription {
* @return <code>true</code> if the two MachineDescription are equal;
* otherwise <code>false</code>.
*/
+ @Override
public final boolean equals(Object obj) {
if (this == obj) { return true; }
if ( !(obj instanceof MachineDescription) ) { return false; }
diff --git a/src/java/com/jogamp/common/os/NativeLibrary.java b/src/java/com/jogamp/common/os/NativeLibrary.java
index df59611..794d712 100644
--- a/src/java/com/jogamp/common/os/NativeLibrary.java
+++ b/src/java/com/jogamp/common/os/NativeLibrary.java
@@ -132,6 +132,7 @@ public final class NativeLibrary implements DynamicLookupHelper {
}
}
+ @Override
public final String toString() {
return "NativeLibrary[" + libraryPath + ", 0x" + Long.toHexString(libraryHandle) + ", global " + global + "]";
}
@@ -362,6 +363,7 @@ public final class NativeLibrary implements DynamicLookupHelper {
// Add entries from java.library.path
final String[] javaLibraryPaths =
AccessController.doPrivileged(new PrivilegedAction<String[]>() {
+ @Override
public String[] run() {
int count = 0;
final String usrPath = System.getProperty("java.library.path");
@@ -402,6 +404,7 @@ public final class NativeLibrary implements DynamicLookupHelper {
// Add current working directory
String userDir =
AccessController.doPrivileged(new PrivilegedAction<String>() {
+ @Override
public String run() {
return System.getProperty("user.dir");
}
@@ -523,6 +526,7 @@ public final class NativeLibrary implements DynamicLookupHelper {
}
if (!initializedFindLibraryMethod) {
AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ @Override
public Object run() {
try {
findLibraryMethod = ClassLoader.class.getDeclaredMethod("findLibrary",
@@ -539,6 +543,7 @@ public final class NativeLibrary implements DynamicLookupHelper {
if (findLibraryMethod != null) {
try {
return AccessController.doPrivileged(new PrivilegedAction<String>() {
+ @Override
public String run() {
try {
return (String) findLibraryMethod.invoke(loader, new Object[] { libName });
diff --git a/src/java/com/jogamp/common/os/Platform.java b/src/java/com/jogamp/common/os/Platform.java
index 896ea56..23135ae 100644
--- a/src/java/com/jogamp/common/os/Platform.java
+++ b/src/java/com/jogamp/common/os/Platform.java
@@ -171,6 +171,7 @@ public class Platform extends PlatformPropsImpl {
final boolean[] _AWT_AVAILABLE = new boolean[] { false };
AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ @Override
public Object run() {
PlatformPropsImpl.initSingleton(); // documenting the order of static initialization
diff --git a/src/java/com/jogamp/common/util/FloatStack.java b/src/java/com/jogamp/common/util/FloatStack.java
index 725491c..8cb2e5b 100644
--- a/src/java/com/jogamp/common/util/FloatStack.java
+++ b/src/java/com/jogamp/common/util/FloatStack.java
@@ -79,6 +79,7 @@ public class /*name*/FloatStack/*name*/ implements PrimitiveStack {
@Override
public final void setGrowSize(int newGrowSize) { growSize = newGrowSize; }
+ @Override
public final String toString() {
return "FloatStack[0..(pos "+position+").."+buffer.length+", remaining "+remaining()+"]";
}
diff --git a/src/java/com/jogamp/common/util/IntIntHashMap.java b/src/java/com/jogamp/common/util/IntIntHashMap.java
index 06b9a3f..ef6159b 100644
--- a/src/java/com/jogamp/common/util/IntIntHashMap.java
+++ b/src/java/com/jogamp/common/util/IntIntHashMap.java
@@ -85,6 +85,7 @@ public class /*name*/IntIntHashMap/*name*/ implements Cloneable,
if(!isPrimitive) {
final EntryCM cm = AccessController.doPrivileged(new PrivilegedAction<EntryCM>() {
+ @Override
@SuppressWarnings("unchecked")
public EntryCM run() {
EntryCM r = new EntryCM();
@@ -501,6 +502,7 @@ public class /*name*/IntIntHashMap/*name*/ implements Cloneable,
private static Method getCloneMethod(Object obj) {
final Class<?> clazz = obj.getClass();
return AccessController.doPrivileged(new PrivilegedAction<Method>() {
+ @Override
public Method run() {
try {
return clazz.getDeclaredMethod("clone");
diff --git a/src/java/com/jogamp/common/util/LFRingbuffer.java b/src/java/com/jogamp/common/util/LFRingbuffer.java
index 1ca1e20..a0418c5 100644
--- a/src/java/com/jogamp/common/util/LFRingbuffer.java
+++ b/src/java/com/jogamp/common/util/LFRingbuffer.java
@@ -81,10 +81,12 @@ public class LFRingbuffer<T> implements Ringbuffer<T> {
private volatile int writePos;
private volatile int size;
+ @Override
public final String toString() {
return "LFRingbuffer<?>[filled "+size+" / "+(capacityPlusOne-1)+", writePos "+writePos+", readPos "+readPos+"]";
}
+ @Override
public final void dump(PrintStream stream, String prefix) {
stream.println(prefix+" "+toString()+" {");
for(int i=0; i<capacityPlusOne; i++) {
diff --git a/src/java/com/jogamp/common/util/PropertyAccess.java b/src/java/com/jogamp/common/util/PropertyAccess.java
index 5a8f082..830bfe4 100644
--- a/src/java/com/jogamp/common/util/PropertyAccess.java
+++ b/src/java/com/jogamp/common/util/PropertyAccess.java
@@ -176,6 +176,7 @@ public class PropertyAccess {
private static final String getTrustedPropKey(final String propertyKey) {
return AccessController.doPrivileged(new PrivilegedAction<String>() {
+ @Override
public String run() {
try {
return System.getProperty(propertyKey);
diff --git a/src/java/com/jogamp/common/util/Ringbuffer.java b/src/java/com/jogamp/common/util/Ringbuffer.java
index 7faf5dd..6c2507f 100644
--- a/src/java/com/jogamp/common/util/Ringbuffer.java
+++ b/src/java/com/jogamp/common/util/Ringbuffer.java
@@ -45,6 +45,7 @@ import java.io.PrintStream;
public interface Ringbuffer<T> {
/** Returns a short string representation incl. size/capacity and internal r/w index (impl. dependent). */
+ @Override
public String toString();
/** Debug functionality - Dumps the contents of the internal array. */
diff --git a/src/java/com/jogamp/common/util/SecurityUtil.java b/src/java/com/jogamp/common/util/SecurityUtil.java
index 742de84..4586d22 100644
--- a/src/java/com/jogamp/common/util/SecurityUtil.java
+++ b/src/java/com/jogamp/common/util/SecurityUtil.java
@@ -48,6 +48,7 @@ public class SecurityUtil {
final boolean hasAllPermissions;
{
final ProtectionDomain insecPD = AccessController.doPrivileged(new PrivilegedAction<ProtectionDomain>() {
+ @Override
public ProtectionDomain run() {
return SecurityUtil.class.getProtectionDomain();
} } );
@@ -64,6 +65,7 @@ public class SecurityUtil {
System.err.println("SecurityUtil: Has SecurityManager: "+ ( null != securityManager ) ) ;
System.err.println("SecurityUtil: Has AllPermissions: "+hasAllPermissions);
final Certificate[] certs = AccessController.doPrivileged(new PrivilegedAction<Certificate[]>() {
+ @Override
public Certificate[] run() {
return getCerts(SecurityUtil.class);
} } );
diff --git a/src/java/com/jogamp/common/util/cache/TempFileCache.java b/src/java/com/jogamp/common/util/cache/TempFileCache.java
index 5898d50..cc7014a 100644
--- a/src/java/com/jogamp/common/util/cache/TempFileCache.java
+++ b/src/java/com/jogamp/common/util/cache/TempFileCache.java
@@ -237,6 +237,7 @@ public class TempFileCache {
// We do this so that the locks never get garbage-collected.
Runtime.getRuntime().addShutdownHook(new Thread() {
/* @Override */
+ @Override
public void run() {
// NOTE: we don't really expect that this code will ever
// be called. If it does, we will close the output
@@ -263,6 +264,7 @@ public class TempFileCache {
// Start a new Reaper thread to do stuff...
Thread reaperThread = new Thread() {
/* @Override */
+ @Override
public void run() {
deleteOldTempDirs();
}
@@ -286,6 +288,7 @@ public class TempFileCache {
final String ourLockFile = tmpRootPropValue + ".lck";
FilenameFilter lckFilter = new FilenameFilter() {
/* @Override */
+ @Override
public boolean accept(File dir, String name) {
return name.endsWith(".lck") && !name.equals(ourLockFile);
}