Class StandardRepresenter


  • public class StandardRepresenter
    extends BaseRepresenter
    Represent standard Java classes
    • Field Detail

      • MULTILINE_PATTERN

        public static final Pattern MULTILINE_PATTERN
        all chars that represent a new line
      • classTags

        protected Map<Class<? extends Object>,​org.snakeyaml.engine.v2.nodes.Tag> classTags
        Connect classes to their tags
      • settings

        protected DumpSettings settings
        keep the options
    • Constructor Detail

      • StandardRepresenter

        public StandardRepresenter​(DumpSettings settings)
        Create
        Parameters:
        settings - - configuration options
    • Method Detail

      • getTag

        protected org.snakeyaml.engine.v2.nodes.Tag getTag​(Class<?> clazz,
                                                           org.snakeyaml.engine.v2.nodes.Tag defaultTag)
        Define the way to get the Tag for any class
        Parameters:
        clazz - - the class to serialise
        defaultTag - - the tag to use if there is no explicit configuration
        Returns:
        the Tag for output
      • addClassTag

        @Deprecated
        public org.snakeyaml.engine.v2.nodes.Tag addClassTag​(Class<? extends Object> clazz,
                                                             org.snakeyaml.engine.v2.nodes.Tag tag)
        Deprecated.
        should be replaced with the Beans project
        Define a tag for the Class to serialize. Should be replaced later with the beans project.
        Parameters:
        clazz - Class which tag is changed
        tag - new tag to be used for every instance of the specified Class
        Returns:
        the previous tag associated with the Class