public class TLcdXMLSchemaBasedUnmarshallerProvider extends TLcdXMLUnmarshallerProvider
TLcdXMLUnmarshallerProvider
that also allows unmarshallers to be
registered
and retrieved for local elements.Constructor and Description |
---|
TLcdXMLSchemaBasedUnmarshallerProvider(TLcdXMLSchemaBasedDecoder aDecoder)
Creates a new instance for the given decoder.
|
Modifier and Type | Method and Description |
---|---|
<T> ILcdXMLUnmarshaller<? extends T> |
getUnmarshaller(QName aXMLGlobalElementName,
Class<T> aJavaClass)
Returns an unmarshaller which is capable of unmarshalling the specified XML element into an
instance of a Java class which is assignable to a field of the specified Java class.
|
<T> ILcdXMLUnmarshaller<? extends T> |
getUnmarshaller(TLcdXMLSchemaElementIdentifier aElementId,
Class<T> aClass)
Gets an unmarshaller for the given element and class.
|
<T> void |
registerUnmarshaller(TLcdXMLSchemaElementIdentifier aElementId,
Class<T> aJavaClass,
ILcdXMLUnmarshaller<? extends T> aMarshaller)
Registers the unmarshaller for the given element and java class.
|
registerUnmarshaller
public TLcdXMLSchemaBasedUnmarshallerProvider(TLcdXMLSchemaBasedDecoder aDecoder)
aDecoder
- the decoder for which to create a new instancepublic <T> ILcdXMLUnmarshaller<? extends T> getUnmarshaller(TLcdXMLSchemaElementIdentifier aElementId, Class<T> aClass)
aElementId
- the identifier of the element that the unmarshaller should be able to unmarshalaClass
- the class of which instances should be returned by the unmarshallerpublic <T> void registerUnmarshaller(TLcdXMLSchemaElementIdentifier aElementId, Class<T> aJavaClass, ILcdXMLUnmarshaller<? extends T> aMarshaller)
aElementId
- the identifier of the element for which the unmarshaller is to be registeredaJavaClass
- the class of which instances are unmarshalledaMarshaller
- the unmarshaller for the given element identifier and classpublic <T> ILcdXMLUnmarshaller<? extends T> getUnmarshaller(QName aXMLGlobalElementName, Class<T> aJavaClass)
TLcdXMLUnmarshallerProvider
getUnmarshaller
in class TLcdXMLUnmarshallerProvider
aXMLGlobalElementName
- the XML element which can be unmarshalled by the unmarshaller to
be returned.aJavaClass
- the Java class of the field to which the unmarshalled Java object
should be assignable.null
if no such unmarshaller was found.