Return a logger named corresponding to the class passed as parameter, using the statically bound {@link ILoggerFactory} instance.

@param clazz the returned logger will be named after clazz

@return the logger adapter
973154
public static JRLogger getLogger(final Class<?> clazz) {

        JRLogger logger = loggerMap.get(clazz.getName());
        if (logger == null) {
            JRLogger newInstance = null;

            // Get the logger instance according to slf4j configuration
            final org.slf4j.Logger innerLogger = LoggerFactory.getLogger(clazz);

            if ("ch.qos.logback.classic.Logger".equals(innerLogger.getClass().getName())) {
                newInstance = new LogbackAdapter((ch.qos.logback.classic.Logger) innerLogger);
            } else {

                newInstance = new Slf4jAdapter(innerLogger);
            }

            final JRLogger oldInstance = loggerMap.putIfAbsent(clazz.getName(), newInstance);
            logger = oldInstance == null ? newInstance : oldInstance;
        }
        return logger;
    }
582128
public Config getConfig(Class<?> clazz) {
        Config config = DEFAULT_CONFIG;

        Config globalConfig = Config.Implementation.fromProperties(getConfigProperties());
        if (globalConfig != null) {
            config = new Config.Implementation(config, globalConfig);
        }

        Config classConfig = clazz.getAnnotation(Config.class);
        if (classConfig != null) {
            config = new Config.Implementation(config, classConfig);
        }

        return config;
    }
263974
public static Constructor<?> getConstructor(final Class<?> clazz,
        final Class<?>... argumentTypes) throws NoSuchMethodException {
        try {
            return AccessController
                .doPrivileged(new PrivilegedExceptionAction<Constructor<?>>() {
                    public Constructor<?> run()
                        throws NoSuchMethodException {
                        return clazz.getConstructor(argumentTypes);
                    }
                });
        }
        // Unwrap
        catch (final PrivilegedActionException pae) {
            final Throwable t = pae.getCause();
            // Rethrow
            if (t instanceof NoSuchMethodException) {
                throw (NoSuchMethodException) t;
            } else {
                // No other checked Exception thrown by Class.getConstructor
                try {
                    throw (RuntimeException) t;
                }
                // Just in case we've really messed up
                catch (final ClassCastException cce) {
                    throw new RuntimeException(
                        "Obtained unchecked Exception; this code should never be reached",
                        t);
                }
            }
        }
    }
720608
def get_logger(cls):
        
        if cls.logger is None:
            cls.logger = logging.getLogger("django_auth_ldap")
            cls.logger.addHandler(logging.NullHandler())

        return cls.logger
1224589
private static LogAdapterFactory getAdapterFactory()
   {
      // double-checked locking
      if (_adapterFactory == null)
      {
         synchronized (Logger.class)
         {
            if (_adapterFactory == null)
            {
               _adapterFactory = createAdapterFactory();
            }
         }
      }
      return _adapterFactory;
   }
19573
protected Class<?> loadClass(String clazz) throws ClassNotFoundException {
		if (this.classLoader == null){
			return Class.forName(clazz);
		}

		return Class.forName(clazz, true, this.classLoader);

	}
497431
private Logger getLogger()
    {
        if ( logger != null )
        {
            return logger;
        }

        logger = LoggerFactory.getLogger( ResourceReaderImpl.class );

        return logger;
    }
1354092
public static Logger getLogger(final String logger)
   {
      LogAdapterFactory adapterFactory = getAdapterFactory();
      return adapterFactory.createLogAdapter(logger);
   }
341775
public static List<Method> getAccessors(Class<?> clazz) {
    if (clazz == null) {
      throw new IllegalArgumentException("The 'clazz' parameter cannot be null.");
    }

    List<Method> methods = new ArrayList<>();
    for (Method method : clazz.getMethods()) {
      String methodName = method.getName();
      if (!"getClass".equals(methodName) && !"hashCode".equals(methodName) && method.getReturnType() != null
          && !Void.class.equals(method.getReturnType()) && method.getParameterTypes().length == 0
          && ((methodName.startsWith("get") && methodName.length() > 3)
              || (methodName.startsWith("is") && methodName.length() > 2)
              || (methodName.startsWith("has") && methodName.length() > 3))) {
        methods.add(method);
      }
    }

    // Order the methods alphabetically by name
    sort(methods, new Comparator<Method>() {
      /**
       * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
       */
      @Override
      public int compare(Method method1, Method method2) {
        return method1.getName().compareTo(method2.getName());
      }
    });

    return unmodifiableList(methods);
  }
561376
public <T extends DajlabModelInterface> T get(Class<T> clazz) {

		T ret = null;
		try {
			ret = (T) dajlab.get(clazz.getName());
		} catch (ClassCastException e) {
			e.printStackTrace();
		}
		return ret;
	}
40130
public static @Nonnull Logger getLogger(@Nonnull Class type) {
        if (ENABLE_CLASS_LOADER_LOGGING) {
            return LoggerFactory.getLogger(type);
        } else {
            return NOPLogger.NOP_LOGGER;
        }
    }
1294574
public static <T> Parameters.Builder<T> logger(Class<?> cls) {
        return Parameters.<T> builder().logger(cls);
    }
1364896
public static ClassLoader getClassLoader(Class clazz){
        ClassLoader classLoader = clazz.getClassLoader();
        return classLoader==null ? ClassLoader.getSystemClassLoader() : classLoader;
    }
1262072
public static Logger getLogger(String name) {
    if (name == null) {
      throw new NullPointerException("Logger name may not be null.");
    }
    init();
    return (instance.internalGetLogger(name));
  }
547759
protected Logger getSLF4JLogger(LogRecord record) {
        String name = record.getLoggerName();
        if (name == null) {
            name = UNKNOWN_LOGGER_NAME;
        }
        return LoggerFactory.getLogger(name);
    }
1270739
public static File getClassJar(Class clazz) {
		File file = null;

		try {
			file = new File(clazz.getProtectionDomain().getCodeSource().getLocation().toURI());
		} catch (URISyntaxException e) {}

		return file;
	}
54767
public static <T, E extends I18nId> SLF4JLogger<T, ?, E> getLogger(Class<T> clazz, Class<?> caller) {
		org.slf4j.Logger logger = LoggerFactory.getLogger(clazz);
		if(logger instanceof LocationAwareLogger) {
			return new SLF4JCallerLocationAwareLogger<T, E>((LocationAwareLogger)logger, caller);
		} else {
			return new SLF4JLogger<T, org.slf4j.Logger, E>(logger);
		}
	}