Class 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
    • 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​(java.lang.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