diff options
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 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); } } |