Javolution 6.0.0 java
|
Public Member Functions | |
XMLStreamReader | getStreamReader () |
boolean | hasNext () throws XMLStreamException |
CharArray | getText () throws XMLStreamException |
Attributes | getAttributes () throws XMLStreamException |
CharArray | getAttribute (String name) throws XMLStreamException |
String | getAttribute (String name, String defaultValue) throws XMLStreamException |
boolean | getAttribute (String name, boolean defaultValue) throws XMLStreamException |
char | getAttribute (String name, char defaultValue) throws XMLStreamException |
byte | getAttribute (String name, byte defaultValue) throws XMLStreamException |
short | getAttribute (String name, short defaultValue) throws XMLStreamException |
int | getAttribute (String name, int defaultValue) throws XMLStreamException |
long | getAttribute (String name, long defaultValue) throws XMLStreamException |
float | getAttribute (String name, float defaultValue) throws XMLStreamException |
double | getAttribute (String name, double defaultValue) throws XMLStreamException |
Package Functions | |
InputElement () | |
public< T > T | getNext () throws XMLStreamException |
public< T > T | get (String name) throws XMLStreamException |
public< T > T | get (String localName, String uri) throws XMLStreamException |
public< T > T | get (String name, Class< T > cls) throws XMLStreamException |
public< T > T | get (String localName, String uri, Class< T > cls) throws XMLStreamException |
private< T > T | readInstanceOf (Class cls) throws XMLStreamException |
public< T > T | getAttribute (String name, T defaultValue) throws XMLStreamException |
void | setBinding (XMLBinding xmlBinding) |
void | setReferenceResolver (XMLReferenceResolver xmlReferenceResolver) |
void | reset () |
Package Attributes | |
final XMLStreamReaderImpl | _reader = new XMLStreamReaderImpl() |
Private Member Functions | |
Object | readReference () throws XMLStreamException |
Private Attributes | |
XMLBinding | _binding |
XMLReferenceResolver | _referenceResolver |
boolean | _isReaderAtNext |
This class represents an input XML element (unmarshalling).
Definition at line 186 of file XMLFormat.java.
|
package |
|
package |
Returns the object whose type is identified by a XML class attribute only if the XML element has the specified local name and URI.
localName | the local name. |
uri | the namespace URI or null . |
null
. Definition at line 299 of file XMLFormat.java.
References javolution.text.CharArray.equals(), javolution.xml.internal.stream.XMLStreamReaderImpl.getLocalName(), javolution.xml.internal.stream.XMLStreamReaderImpl.getNamespaceURI(), and javolution.xml.XMLBinding.readClass().
|
package |
Returns the object of specified type only if the XML element has the specified local name and namespace URI.
localName | the local name. |
uri | the namespace URI or null . |
cls | the class identifying the format of the object to return. |
null
. Definition at line 347 of file XMLFormat.java.
References javolution.text.CharArray.equals(), javolution.xml.internal.stream.XMLStreamReaderImpl.getLocalName(), and javolution.xml.internal.stream.XMLStreamReaderImpl.getNamespaceURI().
|
package |
Returns the object whose type is identified by a XML class attribute only if the XML element has the specified local name.
name | the local name of the next element. |
null
. Definition at line 277 of file XMLFormat.java.
References javolution.text.CharArray.equals(), javolution.xml.internal.stream.XMLStreamReaderImpl.getLocalName(), and javolution.xml.XMLBinding.readClass().
|
package |
Returns the object of specified type only if the XML element has the specified local name.
name | the local name of the element to match. |
cls | the class identifying the format of the object to return. |
null
. Definition at line 326 of file XMLFormat.java.
References javolution.text.CharArray.equals(), and javolution.xml.internal.stream.XMLStreamReaderImpl.getLocalName().
CharArray javolution.xml.XMLFormat< T >.InputElement.getAttribute | ( | String | name | ) | throws XMLStreamException |
Searches for the attribute having the specified name.
name | the name of the attribute. |
null
if the attribute is not found. Definition at line 434 of file XMLFormat.java.
References javolution.xml.internal.stream.XMLStreamReaderImpl.getAttributeValue().
boolean javolution.xml.XMLFormat< T >.InputElement.getAttribute | ( | String | name, |
boolean | defaultValue | ||
) | throws XMLStreamException |
Returns the specified boolean
attribute.
name | the name of the attribute searched for. |
defaultValue | the value returned if the attribute is not found. |
boolean
value for the specified attribute or the default value if the attribute is not found. Definition at line 463 of file XMLFormat.java.
References javolution.text.CharArray.toBoolean().
byte javolution.xml.XMLFormat< T >.InputElement.getAttribute | ( | String | name, |
byte | defaultValue | ||
) | throws XMLStreamException |
Returns the specified byte
attribute. This method handles string formats that are used to represent octal and hexadecimal numbers.
name | the name of the attribute searched for. |
defaultValue | the value returned if the attribute is not found. |
byte
value for the specified attribute or the default value if the attribute is not found. Definition at line 497 of file XMLFormat.java.
References javolution.text.CharArray.toInt().
char javolution.xml.XMLFormat< T >.InputElement.getAttribute | ( | String | name, |
char | defaultValue | ||
) | throws XMLStreamException |
Returns the specified char
attribute.
name | the name of the attribute searched for. |
defaultValue | the value returned if the attribute is not found. |
char
value for the specified attribute or the default value if the attribute is not found. Definition at line 477 of file XMLFormat.java.
References javolution.text.CharArray.charAt(), and javolution.text.CharArray.length().
double javolution.xml.XMLFormat< T >.InputElement.getAttribute | ( | String | name, |
double | defaultValue | ||
) | throws XMLStreamException |
Returns the specified double
attribute.
name | the name of the attribute searched for. |
defaultValue | the value returned if the attribute is not found. |
double
value for the specified attribute or the default value if the attribute is not found. Definition at line 570 of file XMLFormat.java.
References javolution.text.CharArray.toDouble().
float javolution.xml.XMLFormat< T >.InputElement.getAttribute | ( | String | name, |
float | defaultValue | ||
) | throws XMLStreamException |
Returns the specified float
attribute.
name | the name of the attribute searched for. |
defaultValue | the value returned if the attribute is not found. |
float
value for the specified attribute or the default value if the attribute is not found. Definition at line 556 of file XMLFormat.java.
References javolution.text.CharArray.toFloat().
int javolution.xml.XMLFormat< T >.InputElement.getAttribute | ( | String | name, |
int | defaultValue | ||
) | throws XMLStreamException |
Returns the specified int
attribute. This method handles string formats that are used to represent octal and hexadecimal numbers.
name | the name of the attribute searched for. |
defaultValue | the value returned if the attribute is not found. |
int
value for the specified attribute or the default value if the attribute is not found. Definition at line 527 of file XMLFormat.java.
References javolution.text.CharArray.toInt().
long javolution.xml.XMLFormat< T >.InputElement.getAttribute | ( | String | name, |
long | defaultValue | ||
) | throws XMLStreamException |
Returns the specified long
attribute. This method handles string formats that are used to represent octal and hexadecimal numbers.
name | the name of the attribute searched for. |
defaultValue | the value returned if the attribute is not found. |
long
value for the specified attribute or the default value if the attribute is not found. Definition at line 542 of file XMLFormat.java.
References javolution.text.CharArray.toLong().
short javolution.xml.XMLFormat< T >.InputElement.getAttribute | ( | String | name, |
short | defaultValue | ||
) | throws XMLStreamException |
Returns the specified short
attribute. This method handles string formats that are used to represent octal and hexadecimal numbers.
name | the name of the attribute searched for. |
defaultValue | the value returned if the attribute is not found. |
short
value for the specified attribute or the default value if the attribute is not found. Definition at line 512 of file XMLFormat.java.
References javolution.text.CharArray.toInt().
String javolution.xml.XMLFormat< T >.InputElement.getAttribute | ( | String | name, |
String | defaultValue | ||
) | throws XMLStreamException |
Returns the specified String
attribute.
name | the name of the attribute. |
defaultValue | a default value. |
defaultValue
if the attribute is not found. Definition at line 449 of file XMLFormat.java.
References javolution.text.CharArray.toString().
|
package |
Returns the attribute of same type as the specified default value.
name | the name of the attribute. |
defaultValue | the value returned if the attribute is not found. |
Definition at line 585 of file XMLFormat.java.
References javolution.text.TextContext.getFormat(), and javolution.text.TextFormat< T >.parse().
Attributes javolution.xml.XMLFormat< T >.InputElement.getAttributes | ( | ) | throws XMLStreamException |
Returns the attributes for this XML input element.
Definition at line 420 of file XMLFormat.java.
References javolution.xml.internal.stream.XMLStreamReaderImpl.getAttributes().
|
package |
Returns the next object whose type is identified by the local name and URI of the current XML element.
null
. XMLStreamException | if hasNext() == false . |
Definition at line 248 of file XMLFormat.java.
References javolution.xml.stream.XMLStreamConstants.END_ELEMENT, javolution.text.CharArray.equals(), javolution.xml.internal.stream.XMLStreamReaderImpl.getLocalName(), javolution.xml.internal.stream.XMLStreamReaderImpl.getLocation(), javolution.xml.internal.stream.XMLStreamReaderImpl.next(), javolution.xml.XMLFormat< T >.NULL, and javolution.xml.XMLBinding.readClass().
XMLStreamReader javolution.xml.XMLFormat< T >.InputElement.getStreamReader | ( | ) |
Returns the StAX-like stream reader (provides complete control over the unmarshalling process).
Definition at line 221 of file XMLFormat.java.
CharArray javolution.xml.XMLFormat< T >.InputElement.getText | ( | ) | throws XMLStreamException |
Returns the content of a text-only element (equivalent to getStreamReader().getElementText()).
Definition at line 409 of file XMLFormat.java.
References javolution.xml.internal.stream.XMLStreamReaderImpl.getElementText().
boolean javolution.xml.XMLFormat< T >.InputElement.hasNext | ( | ) | throws XMLStreamException |
Indicates if more nested XML element can be read. This method positions the reader at the start of the next XML element to be read (if any).
true
if there is more XML element to be read; false
otherwise. Definition at line 233 of file XMLFormat.java.
References javolution.xml.internal.stream.XMLStreamReaderImpl.getEventType(), javolution.xml.internal.stream.XMLStreamReaderImpl.nextTag(), and javolution.xml.stream.XMLStreamConstants.START_ELEMENT.
|
package |
Definition at line 379 of file XMLFormat.java.
References javolution.xml.XMLReferenceResolver.createReference(), javolution.xml.XMLBinding.getFormat(), javolution.xml.internal.stream.XMLStreamReaderImpl.getLocation(), javolution.xml.XMLFormat< T >.newInstance(), and javolution.xml.XMLFormat< T >.read().
|
private |
Definition at line 365 of file XMLFormat.java.
References javolution.xml.stream.XMLStreamConstants.END_ELEMENT, javolution.xml.internal.stream.XMLStreamReaderImpl.next(), and javolution.xml.XMLReferenceResolver.readReference().
|
package |
Definition at line 610 of file XMLFormat.java.
References javolution.xml.XMLBinding.DEFAULT, and javolution.xml.internal.stream.XMLStreamReaderImpl.reset().
|
package |
Definition at line 600 of file XMLFormat.java.
|
package |
Definition at line 605 of file XMLFormat.java.
|
private |
Holds the XML binding.
Definition at line 196 of file XMLFormat.java.
|
private |
Indicates if the reader is currently positioned on the next element.
Definition at line 206 of file XMLFormat.java.
|
package |
Holds the stream reader.
Definition at line 191 of file XMLFormat.java.
|
private |
Holds the reference resolver.
Definition at line 201 of file XMLFormat.java.