private void populateMethodCacheWith(MethodCache methodCache, Class classToReflect) { if (debugReflection && log.isDebugEnabled()) { log.debug("Reflecting " + classToReflect); } try { Method[] methods = classToReflect.getDeclaredMethods(); for (int i = 0; i < methods.length; i++) { int modifiers = methods[i].getModifiers(); if (Modifier.isPublic(modifiers)) { methodCache.put(methods[i]); } } } catch (SecurityException se) // Everybody feels better with... { if (log.isDebugEnabled()) { log.debug("While accessing methods of " + classToReflect + ": ", se); } } }
private void populateMethodCacheWith(MethodCache methodCache, Class classToReflect) { if (debugReflection && log.isDebugEnabled()) { log.debug("Reflecting " + classToReflect); } try { Method[] methods = classToReflect.getDeclaredMethods(); for (int i = 0; i < methods.length; i++) { int modifiers = methods[i].getModifiers(); if (Modifier.isPublic(modifiers)) { methodCache.put(methods[i]); } } } catch (SecurityException se) // Everybody feels better with... { if (log.isDebugEnabled()) { log.debug("While accessing methods of " + classToReflect + ": ", se); } } }
/** * Standard constructor * @param clazz The class for which this ClassMap gets constructed. */ public ClassMap(final Class clazz, final Log log) { this.clazz = clazz; this.log = log; if (debugReflection && log.isDebugEnabled()) { log.debug("================================================================="); log.debug("== Class: " + clazz); } methodCache = createMethodCache(); if (debugReflection && log.isDebugEnabled()) { log.debug("================================================================="); } }
/** * Standard constructor * @param clazz The class for which this ClassMap gets constructed. */ public ClassMap(final Class clazz, final Log log) { this.clazz = clazz; this.log = log; if (debugReflection && log.isDebugEnabled()) { log.debug("================================================================="); log.debug("== Class: " + clazz); } methodCache = createMethodCache(); if (debugReflection && log.isDebugEnabled()) { log.debug("================================================================="); } }
/** * @param rs * @param urlpath */ public JarHolder( RuntimeServices rs, String urlpath ) { this.log = rs.getLog(); this.urlpath=urlpath; init(); if (log.isDebugEnabled()) { log.debug("JarHolder: initialized JAR: " + urlpath); } }
/** * @param rs * @param urlpath */ public JarHolder( RuntimeServices rs, String urlpath ) { this.log = rs.getLog(); this.urlpath=urlpath; init(); if (log.isDebugEnabled()) { log.debug("JarHolder: initialized JAR: " + urlpath); } }
@SuppressWarnings("unchecked") @Override public void init(ExtendedProperties configuration) { paths.addAll( configuration.getVector("path") ); // unicode files may have a BOM marker at the start, but Java // has problems recognizing the UTF-8 bom. Enabling unicode will // recognize all unicode boms. unicode = configuration.getBoolean("unicode", false); if (log.isDebugEnabled()) { log.debug("Do unicode file recognition: " + unicode); } if (log.isDebugEnabled()) { // trim spaces from all paths StringUtils.trimStrings(paths); // this section lets tell people what paths we will be using int sz = paths.size(); for( int i=0; i < sz; i++) { log.debug("MyClasspathResourceLoader : adding path '" + (String) paths.get(i) + "'"); } log.trace("MyClasspathResourceLoader : initialization complete."); } }
if (log.isDebugEnabled()) if (log.isDebugEnabled())
if (log.isDebugEnabled()) if (log.isDebugEnabled())
private void loadJar( String path ) if (log.isDebugEnabled())
private void loadJar( String path ) if (log.isDebugEnabled())
/** * */ public void init() { try { if (log.isDebugEnabled()) { log.debug("JarHolder: attempting to connect to " + urlpath); } URL url = new URL( urlpath ); conn = (JarURLConnection) url.openConnection(); conn.setAllowUserInteraction(false); conn.setDoInput(true); conn.setDoOutput(false); conn.connect(); theJar = conn.getJarFile(); } catch (IOException ioe) { String msg = "JarHolder: error establishing connection to JAR at \"" + urlpath + "\""; log.error(msg, ioe); throw new VelocityException(msg, ioe); } }
/** * */ public void init() { try { if (log.isDebugEnabled()) { log.debug("JarHolder: attempting to connect to " + urlpath); } URL url = new URL( urlpath ); conn = (JarURLConnection) url.openConnection(); conn.setAllowUserInteraction(false); conn.setDoInput(true); conn.setDoOutput(false); conn.connect(); theJar = conn.getJarFile(); } catch (IOException ioe) { String msg = "JarHolder: error establishing connection to JAR at \"" + urlpath + "\""; log.error(msg, ioe); throw new VelocityException(msg, ioe); } }
if (log.isDebugEnabled()) { log.debug("Creating string repository using class " + className + "..."); if (log.isDebugEnabled()) { log.debug("Default repository encoding is " + repo.getEncoding());
/** * Create the underlying "pool". * @param rsvc */ public void initialize(RuntimeServices rsvc) { max = rsvc.getInt(RuntimeConstants.PARSER_POOL_SIZE, RuntimeConstants.NUMBER_OF_PARSERS); pool = new SimplePool(max); for (int i = 0; i < max; i++) { pool.put(rsvc.createNewParser()); } if (rsvc.getLog().isDebugEnabled()) { rsvc.getLog().debug("Created '" + max + "' parsers."); } }
/** * Create the underlying "pool". * @param rsvc */ public void initialize(RuntimeServices rsvc) { max = rsvc.getInt(RuntimeConstants.PARSER_POOL_SIZE, RuntimeConstants.NUMBER_OF_PARSERS); pool = new SimplePool(max); for (int i = 0; i < max; i++) { pool.put(rsvc.createNewParser()); } if (rsvc.getLog().isDebugEnabled()) { rsvc.getLog().debug("Created '" + max + "' parsers."); } }
public void initialize(RuntimeServices rsvc) { config = new GenericObjectPool.Config(); config.maxActive = rsvc.getInt(Props.MAX_ACTIVE, Props.MAX_ACTIVE_DEFAULT); config.maxIdle = rsvc.getInt(Props.MAX_IDLE, Props.MAX_IDLE_DEFAULT); config.maxWait = rsvc.getInt(Props.MAX_WAIT, Props.MAX_WAIT_DEFAULT); config.timeBetweenEvictionRunsMillis = -1; // -1 to disable evictor thread. pool = new GenericObjectPool(new ParserFactory(rsvc), config); if (rsvc.getLog().isDebugEnabled()) { rsvc.getLog().debug("Created parser pool: " + this); } }
if (log.isDebugEnabled()) if (log.isDebugEnabled())
if (log.isDebugEnabled()) if (log.isDebugEnabled())
context.getCurrentTemplateName(), 0, 0); else if (rsvc.getLog().isDebugEnabled())