Top Description Fields Constructors Methods
org.jooq.util.jaxb.tools

public Class StringAdapter

extends XmlAdapter<String, String>
Class Inheritance
Known Direct Subclasses
org.jooq.util.jaxb.tools.TrimAdapter
Imports
java.util.regex.Matcher, .Pattern, org.jooq.tools.StringUtils, jakarta.xml.bind.annotation.adapters.XmlAdapter

An XmlAdapter that implements useful features after parsing XML strings with JAXB.

Supported features are:

Author
Lukas Eder

Field Summary

Modifier and TypeField and Description
private static final Pattern

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public final String
marshal(String
The value to be convereted. Can be null.
v
)

Implements abstract jakarta.xml.bind.annotation.adapters.XmlAdapter.marshal.

Convert a bound type to a value type.
public final String
unmarshal(String
The value to be converted. Can be null.
v
)

Implements abstract jakarta.xml.bind.annotation.adapters.XmlAdapter.unmarshal.

Convert a value type to a bound type.

Field Detail

PROPERTY_PATTERNback to summary
private static final Pattern PROPERTY_PATTERN

Constructor Detail

StringAdapterback to summary
public StringAdapter()

Method Detail

marshalback to summary
public final String marshal(String v) throws Exception

Implements abstract jakarta.xml.bind.annotation.adapters.XmlAdapter.marshal.

Doc from jakarta.xml.bind.annotation.adapters.XmlAdapter.marshal.

Convert a bound type to a value type.

Parameters
v:String

The value to be convereted. Can be null.

Annotations
@Override
Exceptions
Exception:
if there's an error during the conversion. The caller is responsible for reporting the error to the user through jakarta.xml.bind.ValidationEventHandler.
unmarshalback to summary
public final String unmarshal(String v) throws Exception

Implements abstract jakarta.xml.bind.annotation.adapters.XmlAdapter.unmarshal.

Doc from jakarta.xml.bind.annotation.adapters.XmlAdapter.unmarshal.

Convert a value type to a bound type.

Parameters
v:String

The value to be converted. Can be null.

Annotations
@Override
Exceptions
Exception:
if there's an error during the conversion. The caller is responsible for reporting the error to the user through jakarta.xml.bind.ValidationEventHandler.