summaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/common/os
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-01-19 03:57:52 +0100
committerSven Gothel <[email protected]>2013-01-19 03:57:52 +0100
commit039ff52d12f5dd750494fb2dea580946291bdb7e (patch)
tree120fedf7cc88637a087c51ae801d857c3ee82223 /src/java/com/jogamp/common/os
parent9bcec728aebc74c81cdd7c92aba5ac2706a7da19 (diff)
Modified Java 1.5 Buffers patch 2b7d1b1d25cb2cd73311ec9159b465f0391bf5e0 - May break GCJ/ECJ .. needs to be revised.
- Adding JAVA_6 in PlatformPropsImpl - Buffers.isDirect() chooses fast-path iff JAVA_6, otherwise using reflection (GCJ/ECJ) - Adding JAVA_6 info in VersionUtil - API doc: Refine JAVA_SE and JAVA_6 spec. TODO: In case GCJ etc is unable to compile the JAVA_6 code even though it uses a static condition (probably not), We have to wrap isStatic in an own class, one for JAVA_6 and one for <= 1.5. This will be a good exercise for further issues we may have w/ Java <= 1.5.
Diffstat (limited to 'src/java/com/jogamp/common/os')
-rw-r--r--src/java/com/jogamp/common/os/Platform.java15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/java/com/jogamp/common/os/Platform.java b/src/java/com/jogamp/common/os/Platform.java
index 72a0b3d..e58e72c 100644
--- a/src/java/com/jogamp/common/os/Platform.java
+++ b/src/java/com/jogamp/common/os/Platform.java
@@ -257,13 +257,26 @@ public class Platform extends PlatformPropsImpl {
public static void initSingleton() { }
/**
- * Returns true only if this program is running on the Java Standard Edition.
+ * Returns true only if having {@link java.nio.LongBuffer} and {@link java.nio.DoubleBuffer} available.
*/
public static boolean isJavaSE() {
return JAVA_SE;
}
/**
+ * Returns true only if being compatible w/ language level 6, e.g. JRE 1.6.
+ * <p>
+ * Implies {@link #isJavaSE()}.
+ * </p>
+ * <p>
+ * <i>Note</i>: We claim Android is compatible.
+ * </p>
+ */
+ public static boolean isJava6() {
+ return JAVA_6;
+ }
+
+ /**
* Returns true if this machine is little endian, otherwise false.
*/
public static boolean isLittleEndian() {