Class NeqSimXtream.UnknownElementIgnorer

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

private static class NeqSimXtream.UnknownElementIgnorer extends com.thoughtworks.xstream.mapper.MapperWrapper
Mapper that silently ignores unknown elements during deserialization. This allows .neqsim files saved with newer versions (containing additional fields or classes) to be loaded by older versions without 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
    UnknownElementIgnorer(com.thoughtworks.xstream.mapper.MapperWrapper wrapped)
    Creates an UnknownElementIgnorer.
  • Method Summary

    Modifier and Type
    Method
    Description
    realClass(String elementName)
     
    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, realMember, serializedClass, serializedMember

    Methods inherited from class Object

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

    • UnknownElementIgnorer

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

    • realClass

      public Class realClass(String elementName)
      Specified by:
      realClass in interface com.thoughtworks.xstream.mapper.Mapper
      Overrides:
      realClass in class com.thoughtworks.xstream.mapper.MapperWrapper
    • 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