Package com.helger.xml.microdom.convert
Interface IMicroTypeConverter<T>
-
- Type Parameters:
T- Data type to handle.
- All Known Implementing Classes:
ColorMicroTypeConverter,MimeTypeInfoMicroTypeConverter,MultilingualTextMicroTypeConverterRegistrar.MultilingualTextConverter,MultilingualTextMicroTypeConverterRegistrar.ReadOnlyMultilingualTextConverter,StringBasedMicroTypeConverter,StringMicroTypeConverter
public interface IMicroTypeConverter<T>Interface to be implemented to marshal between IMicroElement and a native object.- Author:
- Philip Helger
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default IMicroElementconvertToMicroElement(T aObject, String sTagName)Convert the passed object to a micro element using the specified tag name and anullnamespace URI.IMicroElementconvertToMicroElement(T aObject, String sNamespaceURI, String sTagName)Convert the passed object to a micro element using the specified tag nameTconvertToNative(IMicroElement aElement)Convert the passed object to a native element.
-
-
-
Method Detail
-
convertToMicroElement
@Nullable default IMicroElement convertToMicroElement(@Nonnull T aObject, @Nonnull @Nonempty String sTagName)
Convert the passed object to a micro element using the specified tag name and anullnamespace URI.- Parameters:
aObject- The object to be converted. May not benull.sTagName- The tag name to be used. May neither benullnor empty.- Returns:
nullin case creation failed. A micro element with the specified namespace and tag name otherwise.
-
convertToMicroElement
@Nullable IMicroElement convertToMicroElement(@Nonnull T aObject, @Nullable String sNamespaceURI, @Nonnull @Nonempty String sTagName)
Convert the passed object to a micro element using the specified tag name- Parameters:
aObject- The object to be converted. May not benull.sNamespaceURI- The namespace URI for the element to be created. May benull.sTagName- The tag name to be used. May neither benullnor empty.- Returns:
nullin case creation failed. A micro element with the specified namespace and tag name otherwise.
-
convertToNative
@Nullable T convertToNative(@Nonnull IMicroElement aElement)
Convert the passed object to a native element.- Parameters:
aElement- The micro element to be converted.- Returns:
nullif conversion to a native object failed.
-
-