com.atlassian.templaterenderer.velocity
Class DynamicParserPoolUtil

java.lang.Object
  extended by com.atlassian.templaterenderer.velocity.DynamicParserPoolUtil

public class DynamicParserPoolUtil
extends Object

Utility class for working with DynamicParserPool.


Constructor Summary
DynamicParserPoolUtil()
           
 
Method Summary
static boolean canLoadDynamicParserPool(ClassLoader classLoader)
          Returns true if the given class loader can load DynamicParserPool.
static boolean canUseDynamicParserPool(ClassLoader classLoader)
          Returns true if the RuntimeInstance created under the given ClassLoader should use the DynamicParserPool.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DynamicParserPoolUtil

public DynamicParserPoolUtil()
Method Detail

canUseDynamicParserPool

public static boolean canUseDynamicParserPool(ClassLoader classLoader)
Returns true if the RuntimeInstance created under the given ClassLoader should use the DynamicParserPool. The DynamicParserPool is only used if:
  1. the value of the system property is not equal to true, and
  2. the DynamicParserPool class can be loaded using classLoader.

Parameters:
classLoader - a ClassLoader
Returns:
true if the RuntimeInstance created under the given ClassLoader should use the DynamicParserPool
See Also:
canLoadDynamicParserPool(java.lang.ClassLoader)

canLoadDynamicParserPool

public static boolean canLoadDynamicParserPool(ClassLoader classLoader)
Returns true if the given class loader can load DynamicParserPool. In practice this is only the case if the host application exports commons-pool into OSGi.

Parameters:
classLoader - a ClassLoader
Returns:
true if the given class loader can load DynamicParserPool


Copyright © 2012 Atlassian. All Rights Reserved.