com.ctc.wstx.compat
Class Jdk12Impl

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

public class Jdk12Impl
extends JdkImpl

JDK 1.2 compatible basic vanilla no-frills implementation of JdkImpl. Also sed as the base class for most other wrappers as well.


Constructor Summary
  Jdk12Impl()
          Constructor used for creating 'real' instance; creates the shared data structs needed.
protected Jdk12Impl(boolean dummy)
          Constructor derived classes call to avoid creation of helper Objects 'real' instance needs
 
Method Summary
 java.util.List getEmptyList()
           
 java.util.Map getEmptyMap()
           
 java.util.Set getEmptySet()
           
 java.util.HashMap getInsertOrderedMap()
          Alas, 1.2 doesn't have LinkedHashMap; only available from 1.4+, so let's just create a standard HashMap.
 java.util.HashMap getInsertOrderedMap(int initialSize)
          Alas, 1.2 doesn't have LinkedHashMap; only available from 1.4+, so let's just create a standard HashMap.
 java.util.HashMap getLRULimitMap(int maxSize)
          1.2 doesn't have LinkedHashMap, so as usual, let's just create a HashMap
 boolean leakingThreadLocal()
          For 1.2, ThreadLocal actually does work correctly, although slowly (slow due to extra locking).
 boolean setInitCause(java.lang.Throwable newT, java.lang.Throwable rootT)
          Too bad it's only 1.4+ that can set the root cause...
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Jdk12Impl

public Jdk12Impl()
Constructor used for creating 'real' instance; creates the shared data structs needed.


Jdk12Impl

protected Jdk12Impl(boolean dummy)
Constructor derived classes call to avoid creation of helper Objects 'real' instance needs

Method Detail

leakingThreadLocal

public boolean leakingThreadLocal()
For 1.2, ThreadLocal actually does work correctly, although slowly (slow due to extra locking).

Specified by:
leakingThreadLocal in class JdkImpl
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 java.util.List getEmptyList()
Specified by:
getEmptyList in class JdkImpl

getEmptyMap

public java.util.Map getEmptyMap()
Specified by:
getEmptyMap in class JdkImpl

getEmptySet

public java.util.Set getEmptySet()
Specified by:
getEmptySet in class JdkImpl

getInsertOrderedMap

public java.util.HashMap getInsertOrderedMap()
Alas, 1.2 doesn't have LinkedHashMap; only available from 1.4+, so let's just create a standard HashMap.

Specified by:
getInsertOrderedMap in class JdkImpl

getInsertOrderedMap

public java.util.HashMap getInsertOrderedMap(int initialSize)
Alas, 1.2 doesn't have LinkedHashMap; only available from 1.4+, so let's just create a standard HashMap.

Specified by:
getInsertOrderedMap in class JdkImpl

getLRULimitMap

public java.util.HashMap getLRULimitMap(int maxSize)
1.2 doesn't have LinkedHashMap, so as usual, let's just create a HashMap

Specified by:
getLRULimitMap in class JdkImpl

setInitCause

public boolean setInitCause(java.lang.Throwable newT,
                            java.lang.Throwable rootT)
Too bad it's only 1.4+ that can set the root cause...

Specified by:
setInitCause in class JdkImpl
Returns:
True if call succeeds, false if not.