Package org.jboss.marshalling
Class ChainingClassExternalizerFactory
java.lang.Object
org.jboss.marshalling.ChainingClassExternalizerFactory
- All Implemented Interfaces:
ClassExternalizerFactory
A class externalizer factory that tries each delegate externalizer factory in sequence, returning the first match.
-
Constructor Summary
ConstructorsConstructorDescriptionConstruct a new instance.Construct a new instance.Construct a new instance.ChainingClassExternalizerFactory(ClassExternalizerFactory[] factories) Construct a new instance. -
Method Summary
Modifier and TypeMethodDescriptiongetExternalizer(Class<?> type) Look up a custom externalizer for a given object class.
-
Constructor Details
-
ChainingClassExternalizerFactory
Construct a new instance.- Parameters:
factories- a collection of factories to use
-
ChainingClassExternalizerFactory
Construct a new instance.- Parameters:
factories- a collection of factories to use
-
ChainingClassExternalizerFactory
Construct a new instance.- Parameters:
factories- a sequence of factories to use
-
ChainingClassExternalizerFactory
Construct a new instance.- Parameters:
factories- an array of factories to use
-
-
Method Details
-
getExternalizer
Look up a custom externalizer for a given object class. If no such externalizer exists, returnsnull. This implementation tries each nested externalizer factory in order until a match is found.- Specified by:
getExternalizerin interfaceClassExternalizerFactory- Parameters:
type- the type to be externalized- Returns:
- the externalizer, or
nullif there is none
-