Class NeqSimXtream.ThreadLocalSkipMapper

java.lang.Object
com.thoughtworks.xstream.mapper.MapperWrapper
neqsim.util.serialization.NeqSimXtream.ThreadLocalSkipMapper
All Implemented Interfaces:
com.thoughtworks.xstream.mapper.Mapper
Enclosing class:
NeqSimXtream

private static class NeqSimXtream.ThreadLocalSkipMapper extends com.thoughtworks.xstream.mapper.MapperWrapper
Mapper that skips ThreadLocal fields during serialization. ThreadLocal fields cannot be serialized and would cause errors.
Version:
1.0
Author:
esol
  • Nested Class Summary

    Nested classes/interfaces inherited from interface com.thoughtworks.xstream.mapper.Mapper

    com.thoughtworks.xstream.mapper.Mapper.ImplicitCollectionMapping, com.thoughtworks.xstream.mapper.Mapper.Null
  • Constructor Summary

    Constructors
    Constructor
    Description
    ThreadLocalSkipMapper(com.thoughtworks.xstream.mapper.MapperWrapper wrapped)
    Creates a ThreadLocalSkipMapper.
  • Method Summary

    Modifier and Type
    Method
    Description
    private boolean
    isThreadLocalField(Class<?> definedIn, String fieldName)
     
    boolean
    shouldSerializeMember(Class definedIn, String fieldName)
     

    Methods inherited from class com.thoughtworks.xstream.mapper.MapperWrapper

    aliasForAttribute, aliasForAttribute, aliasForSystemAttribute, attributeForAlias, attributeForAlias, defaultImplementationOf, getConverterFromAttribute, getConverterFromAttribute, getConverterFromAttribute, getConverterFromItemType, getConverterFromItemType, getConverterFromItemType, getFieldNameForItemTypeAndName, getImplicitCollectionDefForFieldName, getItemTypeForItemFieldName, getLocalConverter, isIgnoredElement, isImmutableValueType, isReferenceable, lookupMapperOfType, realClass, realMember, serializedClass, serializedMember

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ThreadLocalSkipMapper

      ThreadLocalSkipMapper(com.thoughtworks.xstream.mapper.MapperWrapper wrapped)
      Creates a ThreadLocalSkipMapper.
      Parameters:
      wrapped - the wrapped mapper
  • Method Details

    • shouldSerializeMember

      public boolean shouldSerializeMember(Class definedIn, String fieldName)
      Specified by:
      shouldSerializeMember in interface com.thoughtworks.xstream.mapper.Mapper
      Overrides:
      shouldSerializeMember in class com.thoughtworks.xstream.mapper.MapperWrapper
    • isThreadLocalField

      private boolean isThreadLocalField(Class<?> definedIn, String fieldName)