Top Description Fields Constructors Methods
com.thoughtworks.xstream.mapper

public Class ElementIgnoringMapper

extends MapperWrapper
Class Inheritance
Imports
java.util.HashSet, .Iterator, .LinkedHashSet, .Set, java.util.regex.Pattern, com.thoughtworks.xstream.core.util.FastField

Mapper that allows an field of a specific class to be omitted entirely.
Author
Joerg Schaible

Field Summary

Modifier and TypeField and Description
protected final Set<E>
protected final Set<E>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
public boolean
private Object
key(Class<T> type, String name)

public void
omitField(Class<T> definedIn, String fieldName)

public boolean
shouldSerializeMember(Class<T> definedIn, String fieldName)

Overrides com.thoughtworks.xstream.mapper.MapperWrapper.shouldSerializeMember.

Implements com.thoughtworks.xstream.mapper.Mapper.shouldSerializeMember.

Determine whether a specific member should be serialized.
Inherited from com.thoughtworks.xstream.mapper.MapperWrapper:
aliasForAttributealiasForAttributealiasForSystemAttributeattributeForAliasattributeForAliasdefaultImplementationOfgetConverterFromAttributegetConverterFromAttributegetConverterFromAttributegetConverterFromItemTypegetConverterFromItemTypegetConverterFromItemTypegetFieldNameForItemTypeAndNamegetImplicitCollectionDefForFieldNamegetItemTypeForItemFieldNamegetLocalConverterisImmutableValueTypeisReferenceablelookupMapperOfTyperealClassrealMemberserializedClassserializedMember

Field Detail

fieldsToOmitback to summary
protected final Set<E> fieldsToOmit
unknownElementsToIgnoreback to summary
protected final Set<E> unknownElementsToIgnore

Constructor Detail

ElementIgnoringMapperback to summary
public ElementIgnoringMapper(Mapper wrapped)

Method Detail

addElementsToIgnoreback to summary
public void addElementsToIgnore(final Pattern pattern)
isIgnoredElementback to summary
public boolean isIgnoredElement(String name)

Overrides com.thoughtworks.xstream.mapper.MapperWrapper.isIgnoredElement.

Implements com.thoughtworks.xstream.mapper.Mapper.isIgnoredElement.

Doc from com.thoughtworks.xstream.mapper.Mapper.isIgnoredElement.

Whether this name can be ignored.

keyback to summary
private Object key(Class<T> type, String name)
omitFieldback to summary
public void omitField(Class<T> definedIn, String fieldName)
shouldSerializeMemberback to summary
public boolean shouldSerializeMember(Class<T> definedIn, String fieldName)

Overrides com.thoughtworks.xstream.mapper.MapperWrapper.shouldSerializeMember.

Implements com.thoughtworks.xstream.mapper.Mapper.shouldSerializeMember.

Doc from com.thoughtworks.xstream.mapper.Mapper.shouldSerializeMember.

Determine whether a specific member should be serialized.