Class LettoreJs

java.lang.Object
it.ovunque.serializza.xstream.LettoreJs
All Implemented Interfaces:
com.thoughtworks.xstream.io.HierarchicalStreamReader, JsStreamReader

public class LettoreJs extends Object implements JsStreamReader
  • Constructor Details

    • LettoreJs

      public LettoreJs(Reader in)
  • Method Details

    • impostaClasse

      public static void impostaClasse(Class<?> cl)
    • close

      public void close()
      Description copied from interface: com.thoughtworks.xstream.io.HierarchicalStreamReader
      Close the reader, if necessary.
      Specified by:
      close in interface com.thoughtworks.xstream.io.HierarchicalStreamReader
    • getNodeName

      public String getNodeName()
      Description copied from interface: com.thoughtworks.xstream.io.HierarchicalStreamReader
      Get the name of the current node.
      Specified by:
      getNodeName in interface com.thoughtworks.xstream.io.HierarchicalStreamReader
    • getAttribute

      public String getAttribute(String nome)
      Description copied from interface: com.thoughtworks.xstream.io.HierarchicalStreamReader
      Get the value of an attribute of the current node.
      Specified by:
      getAttribute in interface com.thoughtworks.xstream.io.HierarchicalStreamReader
    • getValue

      public String getValue()
      Description copied from interface: com.thoughtworks.xstream.io.HierarchicalStreamReader
      Get the value (text content) of the current node.
      Specified by:
      getValue in interface com.thoughtworks.xstream.io.HierarchicalStreamReader
    • appendErrors

      public void appendErrors(com.thoughtworks.xstream.converters.ErrorWriter arg0)
      Description copied from interface: com.thoughtworks.xstream.io.HierarchicalStreamReader
      If any errors are detected, allow the reader to add any additional information that can aid debugging (such as line numbers, XPath expressions, etc).
      Specified by:
      appendErrors in interface com.thoughtworks.xstream.io.HierarchicalStreamReader
    • getAttribute

      public String getAttribute(int arg0)
      Description copied from interface: com.thoughtworks.xstream.io.HierarchicalStreamReader
      Get the value of an attribute of the current node, by index.
      Specified by:
      getAttribute in interface com.thoughtworks.xstream.io.HierarchicalStreamReader
    • getAttributeCount

      public int getAttributeCount()
      Description copied from interface: com.thoughtworks.xstream.io.HierarchicalStreamReader
      Number of attributes in current node.
      Specified by:
      getAttributeCount in interface com.thoughtworks.xstream.io.HierarchicalStreamReader
    • getAttributeName

      public String getAttributeName(int arg0)
      Description copied from interface: com.thoughtworks.xstream.io.HierarchicalStreamReader
      Name of attribute in current node.
      Specified by:
      getAttributeName in interface com.thoughtworks.xstream.io.HierarchicalStreamReader
    • getAttributeNames

      public Iterator<?> getAttributeNames()
      Description copied from interface: com.thoughtworks.xstream.io.HierarchicalStreamReader
      Names of attributes (as Strings).
      Specified by:
      getAttributeNames in interface com.thoughtworks.xstream.io.HierarchicalStreamReader
    • hasMoreChildren

      public boolean hasMoreChildren()
      Description copied from interface: com.thoughtworks.xstream.io.HierarchicalStreamReader
      Does the node have any more children remaining that have not yet been read?
      Specified by:
      hasMoreChildren in interface com.thoughtworks.xstream.io.HierarchicalStreamReader
    • moveDown

      public void moveDown()
      Description copied from interface: com.thoughtworks.xstream.io.HierarchicalStreamReader
      Select the current child as current node. A call to this function must be balanced with a call to HierarchicalStreamReader.moveUp().
      Specified by:
      moveDown in interface com.thoughtworks.xstream.io.HierarchicalStreamReader
    • moveUp

      public void moveUp()
      Description copied from interface: com.thoughtworks.xstream.io.HierarchicalStreamReader
      Select the parent node as current node.
      Specified by:
      moveUp in interface com.thoughtworks.xstream.io.HierarchicalStreamReader
    • underlyingReader

      public com.thoughtworks.xstream.io.HierarchicalStreamReader underlyingReader()
      Description copied from interface: com.thoughtworks.xstream.io.HierarchicalStreamReader
      Return the underlying HierarchicalStreamReader implementation.

      If a Converter needs to access methods of a specific HierarchicalStreamReader implementation that are not defined in the HierarchicalStreamReader interface, it should call this method before casting. This is because the reader passed to the Converter is often wrapped/decorated by another implementation to provide additional functionality (such as XPath tracking).

      For example:

      MySpecificReader mySpecificReader = (MySpecificReader)reader; // INCORRECT!
       mySpecificReader.doSomethingSpecific();
      MySpecificReader mySpecificReader = (MySpecificReader)reader.underlyingReader();  // CORRECT!
       mySpecificReader.doSomethingSpecific();

      Implementations of HierarchicalStreamReader should return 'this', unless they are a decorator, in which case they should delegate to whatever they are wrapping.

      Specified by:
      underlyingReader in interface com.thoughtworks.xstream.io.HierarchicalStreamReader
    • setInputAsMap

      public void setInputAsMap(Map<String,?> map)
      Specified by:
      setInputAsMap in interface JsStreamReader