diff options
author | Sven Gothel <[email protected]> | 2008-07-18 18:21:25 +0000 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2008-07-18 18:21:25 +0000 |
commit | de0eaef37caf13314114ab37cc53edc48610a7bf (patch) | |
tree | 82f23e6a3a93975312108ffd9f29e6ebc462ce3a /src/classes | |
parent | 52a5e479db5e2ad41889d69fb470922f35438e3e (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')
-rw-r--r-- | src/classes/com/sun/opengl/impl/GLReflection.java | 14 |
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 5e55aba31..bbcb7c8ea 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); } } |