summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-12-19 00:14:22 +0100
committerSven Gothel <[email protected]>2010-12-19 00:14:22 +0100
commit10c62de831ef208007402134fa2ac9cca85f4770 (patch)
tree0b756c4d1aec24b672cd14565ba2f1a9414932f4
parentd96c2a52b8824a0330d9c388c7f60bbf9a62e4f1 (diff)
ReflectionUtil: Add getBaseName(Class)
-rw-r--r--src/java/com/jogamp/common/util/ReflectionUtil.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/java/com/jogamp/common/util/ReflectionUtil.java b/src/java/com/jogamp/common/util/ReflectionUtil.java
index f4840e7..a04a160 100644
--- a/src/java/com/jogamp/common/util/ReflectionUtil.java
+++ b/src/java/com/jogamp/common/util/ReflectionUtil.java
@@ -288,5 +288,10 @@ public final class ReflectionUtil {
{
return callMethod(null, getMethod(clazzName, methodName, argTypes, cl), args);
}
+
+ public static String getBaseName(Class clazz) {
+ String s = clazz.toString();
+ return s.substring(s.lastIndexOf(".")+1);
+ }
}