Class SchemaConverter

  • All Implemented Interfaces:
    com.thoughtworks.xstream.converters.Converter, com.thoughtworks.xstream.converters.ConverterMatcher

    public class SchemaConverter
    extends AbstractPlatformMessageConverter
    Serialize/deserialize schema
    • Field Detail

      • LEGAL_FIELD_NAME_PATTERN

        public static final java.lang.String LEGAL_FIELD_NAME_PATTERN
        Pattern that field names must match.
        See Also:
        Constant Field Values
    • Constructor Detail

      • SchemaConverter

        public SchemaConverter()
    • Method Detail

      • canConvert

        public boolean canConvert​(java.lang.Class clazz)
      • marshal

        public void marshal​(java.lang.Object source,
                            com.thoughtworks.xstream.io.HierarchicalStreamWriter writer,
                            com.thoughtworks.xstream.converters.MarshallingContext context)
      • unmarshal

        public java.lang.Object unmarshal​(com.thoughtworks.xstream.io.HierarchicalStreamReader reader,
                                          com.thoughtworks.xstream.converters.UnmarshallingContext context)
      • marshalSchemaField

        public static void marshalSchemaField​(java.lang.String node,
                                              SchemaField field,
                                              com.thoughtworks.xstream.io.HierarchicalStreamWriter writer)
      • unmarshalSchemaField

        public static SchemaField unmarshalSchemaField​(com.thoughtworks.xstream.io.HierarchicalStreamReader reader)
      • isValidFieldName

        @Deprecated
        public static boolean isValidFieldName​(java.lang.String fieldName)
        Deprecated.
        Tells whether the specified field name is valid.
        Parameters:
        fieldName - the field name
        Returns:
        true if the field name is valid
      • getAttribute

        public static SchemaField.Type getAttribute​(com.thoughtworks.xstream.io.HierarchicalStreamReader reader,
                                                    java.lang.String name,
                                                    SchemaField.Type defaultType)
        Gets an SchemaField.Type attribute.
      • getComparable

        public static java.lang.Comparable getComparable​(com.thoughtworks.xstream.io.HierarchicalStreamReader reader,
                                                         java.lang.String name,
                                                         SchemaField.Type type)
        Get an attribute's value as a typed comparable.