Class XmlSerializer

java.lang.Object
org.reflections.serializers.XmlSerializer
All Implemented Interfaces:
Serializer

public class XmlSerializer extends Object implements Serializer
serialization of Reflections to xml

an example of produced xml:

 &#60?xml version="1.0" encoding="UTF-8"?>

 &#60Reflections>
  &#60SubTypesScanner>
      &#60entry>
          &#60key>com.google.inject.Module&#60/key>
          &#60values>
              &#60value>fully.qualified.name.1&#60/value>
              &#60value>fully.qualified.name.2&#60/value>
 ...
 
  • Constructor Details

    • XmlSerializer

      public XmlSerializer()
  • Method Details

    • read

      public Reflections read(InputStream inputStream)
      Description copied from interface: Serializer
      reads the input stream into a new Reflections instance, populating it's store
      Specified by:
      read in interface Serializer
    • save

      public File save(Reflections reflections, String filename)
      Description copied from interface: Serializer
      saves a Reflections instance into the given filename
      Specified by:
      save in interface Serializer
    • toString

      public String toString(Reflections reflections)
      Description copied from interface: Serializer
      returns a string serialization of the given Reflections instance
      Specified by:
      toString in interface Serializer
    • createDocument

      private org.dom4j.Document createDocument(Reflections reflections)