Package it.ovunque.serializza.xstream
Class LettoreJs
java.lang.Object
it.ovunque.serializza.xstream.LettoreJs
- All Implemented Interfaces:
com.thoughtworks.xstream.io.HierarchicalStreamReader,JsStreamReader
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidappendErrors(com.thoughtworks.xstream.converters.ErrorWriter arg0) If any errors are detected, allow the reader to add any additional information that can aid debugging (such as line numbers, XPath expressions, etc).voidclose()Close the reader, if necessary.getAttribute(int arg0) Get the value of an attribute of the current node, by index.getAttribute(String nome) Get the value of an attribute of the current node.intNumber of attributes in current node.getAttributeName(int arg0) Name of attribute in current node.Iterator<?>Names of attributes (as Strings).Get the name of the current node.getValue()Get the value (text content) of the current node.booleanDoes the node have any more children remaining that have not yet been read?static voidimpostaClasse(Class<?> cl) voidmoveDown()Select the current child as current node.voidmoveUp()Select the parent node as current node.voidsetInputAsMap(Map<String, ?> map) com.thoughtworks.xstream.io.HierarchicalStreamReaderReturn the underlying HierarchicalStreamReader implementation.
-
Constructor Details
-
LettoreJs
-
-
Method Details
-
impostaClasse
-
close
public void close()Description copied from interface:com.thoughtworks.xstream.io.HierarchicalStreamReaderClose the reader, if necessary.- Specified by:
closein interfacecom.thoughtworks.xstream.io.HierarchicalStreamReader
-
getNodeName
Description copied from interface:com.thoughtworks.xstream.io.HierarchicalStreamReaderGet the name of the current node.- Specified by:
getNodeNamein interfacecom.thoughtworks.xstream.io.HierarchicalStreamReader
-
getAttribute
Description copied from interface:com.thoughtworks.xstream.io.HierarchicalStreamReaderGet the value of an attribute of the current node.- Specified by:
getAttributein interfacecom.thoughtworks.xstream.io.HierarchicalStreamReader
-
getValue
Description copied from interface:com.thoughtworks.xstream.io.HierarchicalStreamReaderGet the value (text content) of the current node.- Specified by:
getValuein interfacecom.thoughtworks.xstream.io.HierarchicalStreamReader
-
appendErrors
public void appendErrors(com.thoughtworks.xstream.converters.ErrorWriter arg0) Description copied from interface:com.thoughtworks.xstream.io.HierarchicalStreamReaderIf 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:
appendErrorsin interfacecom.thoughtworks.xstream.io.HierarchicalStreamReader
-
getAttribute
Description copied from interface:com.thoughtworks.xstream.io.HierarchicalStreamReaderGet the value of an attribute of the current node, by index.- Specified by:
getAttributein interfacecom.thoughtworks.xstream.io.HierarchicalStreamReader
-
getAttributeCount
public int getAttributeCount()Description copied from interface:com.thoughtworks.xstream.io.HierarchicalStreamReaderNumber of attributes in current node.- Specified by:
getAttributeCountin interfacecom.thoughtworks.xstream.io.HierarchicalStreamReader
-
getAttributeName
Description copied from interface:com.thoughtworks.xstream.io.HierarchicalStreamReaderName of attribute in current node.- Specified by:
getAttributeNamein interfacecom.thoughtworks.xstream.io.HierarchicalStreamReader
-
getAttributeNames
Description copied from interface:com.thoughtworks.xstream.io.HierarchicalStreamReaderNames of attributes (as Strings).- Specified by:
getAttributeNamesin interfacecom.thoughtworks.xstream.io.HierarchicalStreamReader
-
hasMoreChildren
public boolean hasMoreChildren()Description copied from interface:com.thoughtworks.xstream.io.HierarchicalStreamReaderDoes the node have any more children remaining that have not yet been read?- Specified by:
hasMoreChildrenin interfacecom.thoughtworks.xstream.io.HierarchicalStreamReader
-
moveDown
public void moveDown()Description copied from interface:com.thoughtworks.xstream.io.HierarchicalStreamReaderSelect the current child as current node. A call to this function must be balanced with a call toHierarchicalStreamReader.moveUp().- Specified by:
moveDownin interfacecom.thoughtworks.xstream.io.HierarchicalStreamReader
-
moveUp
public void moveUp()Description copied from interface:com.thoughtworks.xstream.io.HierarchicalStreamReaderSelect the parent node as current node.- Specified by:
moveUpin interfacecom.thoughtworks.xstream.io.HierarchicalStreamReader
-
underlyingReader
public com.thoughtworks.xstream.io.HierarchicalStreamReader underlyingReader()Description copied from interface:com.thoughtworks.xstream.io.HierarchicalStreamReaderReturn 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:
underlyingReaderin interfacecom.thoughtworks.xstream.io.HierarchicalStreamReader
-
setInputAsMap
- Specified by:
setInputAsMapin interfaceJsStreamReader
-