com.thoughtworks.xstream.converters.extended
Class LookAndFeelConverter

java.lang.Object
  extended by com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter
      extended by com.thoughtworks.xstream.converters.reflection.ReflectionConverter
          extended by com.thoughtworks.xstream.converters.extended.LookAndFeelConverter
All Implemented Interfaces:
Converter, ConverterMatcher, Caching

public class LookAndFeelConverter
extends ReflectionConverter

A converter for Swing LookAndFeel implementations. The JDK's implementations are serializable for historical reasons but will throw a NotSerializableException in their writeObject method. Therefore XStream will use an implementation based on the ReflectionConverter.

Since:
1.3
Author:
Jörg Schaible

Nested Class Summary
 
Nested classes/interfaces inherited from class com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter
AbstractReflectionConverter.DuplicateFieldException, AbstractReflectionConverter.UnknownFieldException
 
Field Summary
 
Fields inherited from class com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter
mapper, reflectionProvider, serializationMethodInvoker
 
Constructor Summary
LookAndFeelConverter(Mapper mapper, ReflectionProvider reflectionProvider)
          Constructs a LookAndFeelConverter.
 
Method Summary
 boolean canConvert(Class type)
          Determines whether the converter can marshall a particular type.
 
Methods inherited from class com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter
doMarshal, doUnmarshal, flushCache, instantiateNewInstance, marshal, marshallField, shouldUnmarshalTransientFields, unmarshal, unmarshallField
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LookAndFeelConverter

public LookAndFeelConverter(Mapper mapper,
                            ReflectionProvider reflectionProvider)
Constructs a LookAndFeelConverter.

Parameters:
mapper - the mapper
reflectionProvider - the reflection provider
Since:
1.3
Method Detail

canConvert

public boolean canConvert(Class type)
Description copied from interface: ConverterMatcher
Determines whether the converter can marshall a particular type.

Specified by:
canConvert in interface ConverterMatcher
Overrides:
canConvert in class ReflectionConverter
Parameters:
type - the Class representing the object type to be converted


Copyright © 2004-2014 XStream. All Rights Reserved.