Class XmlVisitor

java.lang.Object
org.refcodes.schema.XmlVisitor
All Implemented Interfaces:
SchemaVisitor<String>

public class XmlVisitor extends Object implements SchemaVisitor<String>
The XmlVisitor is a SchemaVisitor producing an XML String when visiting a Schema structure.
  • Constructor Details

    • XmlVisitor

      public XmlVisitor()
  • Method Details

    • visit

      public String visit(Schema aSchema, Collection<String> aResults)
      Produces a result from the provided children's results and the currently visited Schema instance.
      Specified by:
      visit in interface SchemaVisitor<String>
      Parameters:
      aSchema - The Schema instance to be visited.
      aResults - The results produced by this SchemaVisitor instance when having been invoked for the Schema instance's children or null if the visited Schema instance does not have any children.
      Returns:
      The accordingly produced result of the SchemaVisitor instance.
    • toString

      protected String toString(Object aObj)
      Hook method for converting a type to an according String.
      Parameters:
      aObj - The value of a given type to be converted accordingly.
      Returns:
      The accordingly converted value.