O - the type of Java object this translator instance is able to handlepublic abstract class NumericValueTranslator<O extends java.lang.Number> extends SimpleValueTranslator<O>
NumberFormatExceptions as
InvalidObjectSourceDataExceptions.MAX_STRING_REPRESENTATION_LENGTH| Constructor and Description |
|---|
NumericValueTranslator() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract O |
parseValue(java.lang.String representation,
ReaderStreamDataProvider<?> streamDataProvider) |
O |
representationToJava(java.lang.String representation,
ReaderStreamDataProvider<?> streamDataProvider)
Converts the specified string representation to a new instance of the according Java object.
|
hasStringRepresentation, javaToRepresentation, readXMLRepresentation, writeXMLRepresentationequals, hashCodeclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetObjectClasspublic NumericValueTranslator()
protected abstract O parseValue(java.lang.String representation, ReaderStreamDataProvider<?> streamDataProvider) throws java.lang.NumberFormatException
java.lang.NumberFormatExceptionpublic O representationToJava(java.lang.String representation, ReaderStreamDataProvider<?> streamDataProvider) throws InvalidObjectSourceDataException, java.lang.UnsupportedOperationException
ObjectTranslator
If #getClass() returns an interface for this instance, the concrete class of the returned object may
depend on the representation.
representation - the string representation of the object to be createdstreamDataProvider - the stream data provider of the calling reader (Maybe null. Some translators will use it to gain
additional status information required for translating, e.g. prefix to namespace mapping for creating QNames.)InvalidObjectSourceDataException - if the specified string representation cannot be parsed to a supported objectjava.lang.UnsupportedOperationException - if objects handled by this instance can only be represented as XML