Returns the class that can be used to derive the logger name from.
For CGLIB advised classes this is the super class of the object class.
@param object The object to query
@return The logging class of the object
768208
public static Class<?> getLoggingClass(Object object) {
        Class<?> result = object.getClass();
        if (result.getSimpleName().matches(".*[$].*CGLIB.*")) {
            result = result.getSuperclass();
        }
        return result;
    }
56785
@SuppressWarnings("unchecked")
	public static <T, L extends LoggerInformer> L getLogger(Class<T> clazz) {
		return (L)SLF4JLoggerFactory.getLogger(clazz);
	}
366166
private static Class<?>[] getListenerGenericTypes(Class<?> listenerClass, Logger log) {
    List<Class<?>> configClasses = new ArrayList<Class<?>>();
    Type[] typeVars = listenerClass.getGenericInterfaces();
    if(typeVars != null) {
      for(Type interfaceClass : typeVars) {
        if(interfaceClass instanceof ParameterizedType) {
          if(((ParameterizedType) interfaceClass).getRawType() instanceof Class) {
            if(ConfigurationListener.class.isAssignableFrom((Class<?>) ((ParameterizedType) interfaceClass).getRawType())) {
              ParameterizedType pType = (ParameterizedType) interfaceClass;
              Type[] typeArgs = pType.getActualTypeArguments();
              if(typeArgs != null && typeArgs.length == 1 && typeArgs[0] instanceof Class) {
                Class<?> type = (Class<?>) typeArgs[0];
                if(type.isAnnotationPresent(CadmiumConfig.class)){
                  log.debug("Adding "+type+" to the configuration types interesting to "+listenerClass);
                  configClasses.add(type);
                }
              }
            }
          }
        }
      }
    }
    return configClasses.toArray(new Class<?>[] {});
  }
300586
private function getObjectClassname($object)
    {
        if (!is_object($object)) {
            return null;
        }

        if (!$this->isClassMappingEnabled()) {
            return '';
        }

        if(is_callable($this->getClassmappingCallback())) {
            $className = call_user_func_array($this->getClassmappingCallback(), [$object]);
        } else {
            $className = get_class($object);
        }

        return $className == 'stdClass' ? '' : $className;
    }
580997
public static function getObjectClass($object)
    {
        if(is_object($object))
        {
            if($object instanceof IBean)
            {
                return get_parent_class($object);
            }
            else
            {
                return get_class($object);
            }
        }
        else
        {
            return (string)$object;
        }
    }
1358413
def get_class_logger(obj):
    
    return logging.getLogger(obj.__class__.__module__ + '.' + obj.__class__.__name__)
868296
@SuppressWarnings( { "unchecked" })
    public Class<Object> getCaller() {
        Class<Object> aClass = null;

        // Walk the stack backwards to find the calling class: don't
        // want to use Class.forName, because we want the class as loaded
        // by it's original classloader
        Class<Object> stack[] = (Class<Object>[]) this.getClassContext();
        for (Class<Object> bClass : stack) {
            // Find the first class in the stack that _isn't_ Tr or StackFinder,
            // etc. Use the name rather than the class instance (to also work across
            // classloaders, should that happen)
            String name = bClass.getName();
            if (!name.endsWith("ras.Tr") && // ejs or websphere
                !name.endsWith("ras.TraceNLS") &&
                !name.endsWith("internal.StackFinder") &&
                !name.endsWith("internal.TraceNLSResolver") &&
                !name.endsWith("internal.WsLogger")) {
                aClass = bClass;
                break;
            }
        }

        return aClass;
    }
613152
private JavaClass getSuperclass(JavaClass javaClass) {
    try {
      return javaClass.getSuperClass();
    } catch (ClassNotFoundException e) {
      bugReporter.reportMissingClass(e);
      return null;
    }
  }
1362658
protected String get_object_type()
	{
		String name = this.getClass().getName();
		int index = name.lastIndexOf(".");
		if(index > 0)
			name = name.substring(index+1);
		index = name.lastIndexOf("_stats");
		if (index > 0) {	
			name = name.substring(0, index);
		}
		return name;
	}
431611
public Object getProperty(Object object, String name) {
        if (hasOverrideGetProperty(name) && getJavaClass().isInstance(object)) {
            return getPropertyMethod.invoke(object, new Object[]{name});
        }
        return super.getProperty(object, name);
    }
543245
@Nullable
  public static Class <?> getClass (@Nullable final Object aObject)
  {
    return aObject == null ? null : aObject.getClass ();
  }
1307522
public static function getClass($object)
    {
        $inflector                       = self::$classNameInflector
            ?? self::$classNameInflector = (new Configuration())->getClassNameInflector();

        return $inflector->getUserClassName(get_class($object));
    }
33343
@Deprecated
    public String getCollectionName(final Object object) {
        if (object == null) {
            throw new IllegalArgumentException();
        }

        final MappedClass mc = getMappedClass(object);
        return mc.getCollectionName();
    }
478902
public JClass getSuperClass()
  {
    Class cl = _class.getSuperclass();

    if (cl != null)
      return _loader.forName(cl.getName());
    else
      return null;
  }
1222766
public static String objectId(Object object) {
        if (object == null) {
            return "?";
        }
        if (object instanceof IdInfoProvider) {
            return getId(((IdInfoProvider) object).idScope(),
                ((IdInfoProvider) object).idObject());
        } else {
            return getId(object.getClass(), object);
        }
    }
737748
@CheckForNull
    public static JavaClass getOuterClass(JavaClass obj) throws ClassNotFoundException {
        for (Attribute a : obj.getAttributes()) {
            if (a instanceof InnerClasses) {
                for (InnerClass ic : ((InnerClasses) a).getInnerClasses()) {
                    if (obj.getClassNameIndex() == ic.getInnerClassIndex()) {
                        // System.out.println("Outer class is " +
                        // ic.getOuterClassIndex());
                        ConstantClass oc = (ConstantClass) obj.getConstantPool().getConstant(ic.getOuterClassIndex());
                        String ocName = oc.getBytes(obj.getConstantPool());
                        return Repository.lookupClass(ocName);
                    }
                }
            }
        }
        return null;
    }
497825
public static Class[] getClasses(Object[] objs) {
	Class[] cls = new Class[objs.length];
	for (int i = 0; i < objs.length; i++) {
	    if (objs[i] == null) cls[i] = Object.class;
	    else cls[i] = objs[i].getClass();
	}
	return cls;
    }