com.ctc.wstx.compat
Class JdkImpl

java.lang.Object
  extended by com.ctc.wstx.compat.JdkImpl
Direct Known Subclasses:
Jdk12Impl

public abstract class JdkImpl
extends java.lang.Object

This is the interface used to access JDK-dependant functionality; generally things that later JDKs have in their APIs, but that can be simulated with earlier JDKs to some degree.


Constructor Summary
protected JdkImpl()
           
 
Method Summary
abstract  java.util.List getEmptyList()
           
abstract  java.util.Map getEmptyMap()
           
abstract  java.util.Set getEmptySet()
           
abstract  java.util.HashMap getInsertOrderedMap()
           
abstract  java.util.HashMap getInsertOrderedMap(int initialSize)
           
abstract  java.util.HashMap getLRULimitMap(int maxSize)
           
abstract  boolean leakingThreadLocal()
          This method is used to check whether GC-friendly caching can be implemented using ThreadLocal.
abstract  boolean setInitCause(java.lang.Throwable newT, java.lang.Throwable rootT)
          Method that sets init cause of the specified Throwable to be another specified Throwable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JdkImpl

protected JdkImpl()
Method Detail

leakingThreadLocal

public abstract boolean leakingThreadLocal()
This method is used to check whether GC-friendly caching can be implemented using ThreadLocal. Some JDKs (notably, JDK 1.3.x) have possibility for memory leaks, and when running on them, such caching should not be used.

Returns:
True if using ThreadLocal is safe, and should not (in itself) be able to cause memory leaks; false if it is possible

getEmptyList

public abstract java.util.List getEmptyList()

getEmptyMap

public abstract java.util.Map getEmptyMap()

getEmptySet

public abstract java.util.Set getEmptySet()

getInsertOrderedMap

public abstract java.util.HashMap getInsertOrderedMap()

getInsertOrderedMap

public abstract java.util.HashMap getInsertOrderedMap(int initialSize)

getLRULimitMap

public abstract java.util.HashMap getLRULimitMap(int maxSize)

setInitCause

public abstract boolean setInitCause(java.lang.Throwable newT,
                                     java.lang.Throwable rootT)
Method that sets init cause of the specified Throwable to be another specified Throwable. Note: not all JDKs support such functionality.

Returns:
True if call succeeds, false if not.