Class StandardRepresenter

java.lang.Object
org.snakeyaml.engine.v2.representer.BaseRepresenter
org.snakeyaml.engine.v2.representer.StandardRepresenter

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

    • MULTILINE_PATTERN

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

      protected Map<Class<? extends Object>,Tag> classTags
      Connect classes to their tags
    • settings

      protected DumpSettings settings
      keep the options
  • Constructor Details

    • StandardRepresenter

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

    • getTag

      protected Tag getTag(Class<?> clazz, 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 Tag addClassTag(Class<? extends Object> clazz, 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