From 0fac649aae582635a6131aa444bee2a6596cdb41 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 18 Jul 2008 18:21:25 +0000 Subject: 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 --- src/classes/com/sun/opengl/impl/GLReflection.java | 14 ++++++++++++-- 1 file 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); } } -- cgit v1.2.3