Package com.luciad.format.xml.bind
Class TLcdXMLJavaClassResolver
java.lang.Object
com.luciad.format.xml.bind.TLcdXMLJavaClassResolver
An XML configuration class which is used by the XML binding framework to decide for which interface
or super class of a class a marshaller will be searched, in case no marshaller is available
for the class itself.
Whenever no marshaller is found for the exact class to be marshalled, this resolver will make a list
of all Java classes/interfaces the requested class extends or implements, and choose the one with
the highest priority.
Priority algorithm
The current implementation of this class allows to register one or more list of Java classes on it. The first class in a list has the highest priority, the last class has the lowest priority. If multiple lists are registered, the lists are merged internally into a global list, in such a way that all priorities within each list are maintained. If multiple orderings are possible, it is unspecified which ordering will be chosen. If no global ordering can be found, an exception will be thrown when a violating list is registered.- Since:
- 8.2
-
Constructor Summary
ConstructorDescriptionConstructs a newTLcdXMLJavaClassResolver
with an empty class priority list. -
Method Summary
Modifier and TypeMethodDescriptiongetSubstitutableClasses
(Class<?> aJavaClass) getSubstitutableClasses
(QName aElementName, Class<?> aJavaClass) void
registerClassPriorityList
(List<Class<?>> aClassPriorityList) Registers a list of classes/interfaces to which the framework can bind, if no marshaller for the exact class to be marshalled could be found.toString()
Returns a general description of thisTLcdXMLJavaClassResolver
, containing the global priority list with all registered classes.
-
Constructor Details
-
TLcdXMLJavaClassResolver
public TLcdXMLJavaClassResolver()Constructs a newTLcdXMLJavaClassResolver
with an empty class priority list.
-
-
Method Details
-
getSubstitutableClasses
-
getSubstitutableClasses
-
registerClassPriorityList
Registers a list of classes/interfaces to which the framework can bind, if no marshaller for the exact class to be marshalled could be found.- Parameters:
aClassPriorityList
- the list of classes to be registered.- Throws:
IllegalArgumentException
- if the list to be registered violates one or more lists which were registered before.
-
toString
Returns a general description of thisTLcdXMLJavaClassResolver
, containing the global priority list with all registered classes. The exact details of the representation are unspecified and are subject to change.
-