From 10c62de831ef208007402134fa2ac9cca85f4770 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sun, 19 Dec 2010 00:14:22 +0100 Subject: ReflectionUtil: Add getBaseName(Class) --- src/java/com/jogamp/common/util/ReflectionUtil.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/java') 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); + } } -- cgit v1.2.3