/** * Instantiate the context selector class designated by the user. The selector * must have a constructor taking a LoggerContext instance as an argument. * * @param defaultLoggerContext * @param contextSelectorStr * @return an instance of the designated context selector class * @throws ClassNotFoundException * @throws SecurityException * @throws NoSuchMethodException * @throws IllegalArgumentException * @throws InstantiationException * @throws IllegalAccessException * @throws InvocationTargetException */ static ContextSelector dynamicalContextSelector(LoggerContext defaultLoggerContext, String contextSelectorStr) throws ClassNotFoundException, SecurityException, NoSuchMethodException, IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException { Class<?> contextSelectorClass = Loader.loadClass(contextSelectorStr); Constructor cons = contextSelectorClass.getConstructor(new Class[] { LoggerContext.class }); return (ContextSelector) cons.newInstance(defaultLoggerContext); }
private <T> T getEnhancer(String enhancerClassName) { try { Class<T> clz = (Class<T>) Loader.loadClass(enhancerClassName.trim()); return clz.newInstance(); } catch (Exception ex) { // If we cannot create the enhancer we fallback to null } return null; }
/** * Instantiate the context selector class designated by the user. The selector * must have a constructor taking a LoggerContext instance as an argument. * * @param defaultLoggerContext * @param contextSelectorStr * @return an instance of the designated context selector class * @throws ClassNotFoundException * @throws SecurityException * @throws NoSuchMethodException * @throws IllegalArgumentException * @throws InstantiationException * @throws IllegalAccessException * @throws InvocationTargetException */ static ContextSelector dynamicalContextSelector( LoggerContext defaultLoggerContext, String contextSelectorStr) throws ClassNotFoundException, SecurityException, NoSuchMethodException, IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException { Class<?> contextSelectorClass = Loader.loadClass(contextSelectorStr); Constructor cons = contextSelectorClass .getConstructor(new Class[] { LoggerContext.class }); return (ContextSelector) cons.newInstance(defaultLoggerContext); }
componentClass = Loader.loadClass(className, context); } else {
private <T> T getEnhancer(String enhancerClassName) { try { Class<T> clz = (Class<T>) Loader.loadClass(enhancerClassName.trim()); return clz.newInstance(); } catch (Exception ex) { // If we cannot create the enhancer we fallback to null } return null; }
/** * Instantiate the context selector class designated by the user. The selector * must have a constructor taking a LoggerContext instance as an argument. * * @param defaultLoggerContext * @param contextSelectorStr * @return an instance of the designated context selector class * @throws ClassNotFoundException * @throws SecurityException * @throws NoSuchMethodException * @throws IllegalArgumentException * @throws InstantiationException * @throws IllegalAccessException * @throws InvocationTargetException */ static ContextSelector dynamicalContextSelector(LoggerContext defaultLoggerContext, String contextSelectorStr) throws ClassNotFoundException, SecurityException, NoSuchMethodException, IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException { Class<?> contextSelectorClass = Loader.loadClass(contextSelectorStr); Constructor cons = contextSelectorClass.getConstructor(new Class[] { LoggerContext.class }); return (ContextSelector) cons.newInstance(defaultLoggerContext); }
/** * Instantiate the context selector class designated by the user. The selector * must have a constructor taking a LoggerContext instance as an argument. * * @param defaultLoggerContext * @param contextSelectorStr * @return an instance of the designated context selector class * @throws ClassNotFoundException * @throws SecurityException * @throws NoSuchMethodException * @throws IllegalArgumentException * @throws InstantiationException * @throws IllegalAccessException * @throws InvocationTargetException */ static ContextSelector dynamicalContextSelector( LoggerContext defaultLoggerContext, String contextSelectorStr) throws ClassNotFoundException, SecurityException, NoSuchMethodException, IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException { Class<?> contextSelectorClass = Loader.loadClass(contextSelectorStr); Constructor cons = contextSelectorClass .getConstructor(new Class[] { LoggerContext.class }); return (ContextSelector) cons.newInstance(defaultLoggerContext); }
/** * Instantiate the context selector class designated by the user. The selector * must have a constructor taking a LoggerContext instance as an argument. * * @param defaultLoggerContext * @param contextSelectorStr * @return an instance of the designated context selector class * @throws ClassNotFoundException * @throws SecurityException * @throws NoSuchMethodException * @throws IllegalArgumentException * @throws InstantiationException * @throws IllegalAccessException * @throws InvocationTargetException */ static ContextSelector dynamicalContextSelector(LoggerContext defaultLoggerContext, String contextSelectorStr) throws ClassNotFoundException, SecurityException, NoSuchMethodException, IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException { Class<?> contextSelectorClass = Loader.loadClass(contextSelectorStr); Constructor cons = contextSelectorClass.getConstructor(new Class[] { LoggerContext.class }); return (ContextSelector) cons.newInstance(defaultLoggerContext); }
/** * Instantiate the context selector class designated by the user. The selector * must have a constructor taking a LoggerContext instance as an argument. * * @param defaultLoggerContext * @param contextSelectorStr * @return an instance of the designated context selector class * @throws ClassNotFoundException * @throws SecurityException * @throws NoSuchMethodException * @throws IllegalArgumentException * @throws InstantiationException * @throws IllegalAccessException * @throws InvocationTargetException */ static ContextSelector dynamicalContextSelector(LoggerContext defaultLoggerContext, String contextSelectorStr) throws ClassNotFoundException, SecurityException, NoSuchMethodException, IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException { Class<?> contextSelectorClass = Loader.loadClass(contextSelectorStr); Constructor cons = contextSelectorClass.getConstructor(new Class[] { LoggerContext.class }); return (ContextSelector) cons.newInstance(defaultLoggerContext); }
/** * Instantiate the context selector class designated by the user. The selector * must have a constructor taking a LoggerContext instance as an argument. * * @param defaultLoggerContext * @param contextSelectorStr * @return an instance of the designated context selector class * @throws ClassNotFoundException * @throws SecurityException * @throws NoSuchMethodException * @throws IllegalArgumentException * @throws InstantiationException * @throws IllegalAccessException * @throws InvocationTargetException */ static ContextSelector dynamicalContextSelector( LoggerContext defaultLoggerContext, String contextSelectorStr) throws ClassNotFoundException, SecurityException, NoSuchMethodException, IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException { Class<?> contextSelectorClass = Loader.loadClass(contextSelectorStr); Constructor cons = contextSelectorClass .getConstructor(new Class[] { LoggerContext.class }); return (ContextSelector) cons.newInstance(defaultLoggerContext); }
componentClass = Loader.loadClass(className, context); } else {
componentClass = Loader.loadClass(className, context); } else {
componentClass = Loader.loadClass(className, context); } else {
componentClass = Loader.loadClass(className, context); } else {
componentClass = Loader.loadClass(className, context); } else {
componentClass = Loader.loadClass(className, context); } else {
componentClass = Loader.loadClass(className, context); } else {
componentClass = Loader.loadClass(className, context); } else {