Package com.helger.xml.microdom.convert
Class StringMicroTypeConverter
- java.lang.Object
-
- com.helger.xml.microdom.convert.StringMicroTypeConverter
-
- All Implemented Interfaces:
IMicroTypeConverter<String>
@Immutable public final class StringMicroTypeConverter extends Object implements IMicroTypeConverter<String>
DefaultIMicroTypeConverterimplementation forStringobjects.- Author:
- Philip Helger
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description IMicroElementconvertToMicroElement(String aObject, String sNamespaceURI, String sTagName)Convert the passed object to a micro element using the specified tag nameStringconvertToNative(IMicroElement aElement)Convert the passed object to a native element.static StringMicroTypeConvertergetInstance()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.helger.xml.microdom.convert.IMicroTypeConverter
convertToMicroElement
-
-
-
-
Method Detail
-
getInstance
@Nonnull public static StringMicroTypeConverter getInstance()
-
convertToMicroElement
@Nonnull public IMicroElement convertToMicroElement(@Nonnull String aObject, @Nullable String sNamespaceURI, @Nonnull @Nonempty String sTagName)
Description copied from interface:IMicroTypeConverterConvert the passed object to a micro element using the specified tag name- Specified by:
convertToMicroElementin interfaceIMicroTypeConverter<String>- 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
@Nonnull public String convertToNative(@Nonnull IMicroElement aElement)
Description copied from interface:IMicroTypeConverterConvert the passed object to a native element.- Specified by:
convertToNativein interfaceIMicroTypeConverter<String>- Parameters:
aElement- The micro element to be converted.- Returns:
nullif conversion to a native object failed.
-
-