public static Class getType(Class c)
  {
    if (c == null)
    {
      Logger.warn("no (typed) class given");
      return null;
    }
    
    // Gefunden in http://www.nautsch.net/2008/10/29/class-von-type-parameter-java-generics-gepimpt/
    // Generics-Voodoo ;)
    
    // 1. check super class
    Class ct = getActualType(c.getGenericSuperclass());
    if (ct != null)
      return ct;
    
    // 2. check interfaces
    Type[] interfaces = c.getGenericInterfaces();
    if (interfaces == null || interfaces.length == 0)
      return null; // keine Interfaces
    for (Type t:interfaces)
    {
      ct = getActualType(t);
      if (ct != null)
        return ct;
    }
    
    return null; // kein Typ gefunden
  }