diff options
author | Sven Gothel <[email protected]> | 2010-12-19 00:14:22 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2010-12-19 00:14:22 +0100 |
commit | 10c62de831ef208007402134fa2ac9cca85f4770 (patch) | |
tree | 0b756c4d1aec24b672cd14565ba2f1a9414932f4 /src/java/com/jogamp | |
parent | d96c2a52b8824a0330d9c388c7f60bbf9a62e4f1 (diff) |
ReflectionUtil: Add getBaseName(Class)
Diffstat (limited to 'src/java/com/jogamp')
-rw-r--r-- | src/java/com/jogamp/common/util/ReflectionUtil.java | 5 |
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); + } } |