summaryrefslogtreecommitdiffstats
path: root/src/classes/com
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2008-07-18 18:21:25 +0000
committerSven Gothel <[email protected]>2010-04-19 00:55:57 +0200
commit0fac649aae582635a6131aa444bee2a6596cdb41 (patch)
treec4308dcad31c33c90a6590fd4bfc6b229f6ced2e /src/classes/com
parent758f6eed4b97667f2024b5c62fc04cbb62e57740 (diff)
Cleanup and partitioning of GLU
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1728 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/classes/com')
-rw-r--r--src/classes/com/sun/opengl/impl/GLReflection.java14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/classes/com/sun/opengl/impl/GLReflection.java b/src/classes/com/sun/opengl/impl/GLReflection.java
index 5e55aba..bbcb7c8 100644
--- a/src/classes/com/sun/opengl/impl/GLReflection.java
+++ b/src/classes/com/sun/opengl/impl/GLReflection.java
@@ -41,6 +41,16 @@ import javax.media.opengl.*;
public final class GLReflection {
+ public static final boolean isClassAvailable(String clazzName) {
+ try {
+ Class clazz = Class.forName(clazzName);
+ if (null!=clazz) {
+ return true;
+ }
+ } catch (Exception e) { }
+ return false;
+ }
+
public static final Constructor getConstructor(String clazzName, Class[] cstrArgTypes) {
Class factoryClass = null;
Constructor factory = null;
@@ -57,7 +67,7 @@ public final class GLReflection {
}
return factory;
} catch (Exception e) {
- throw new GLException(e);
+ throw new GLUnsupportedException(e);
}
}
@@ -72,7 +82,7 @@ public final class GLReflection {
factory = getConstructor(clazzName, cstrArgTypes);
return factory.newInstance( cstrArgs ) ;
} catch (Exception e) {
- throw new GLException(e);
+ throw new GLUnsupportedException(e);
}
}