Top Description Fields Constructors Methods
org.jboss.marshalling

public Class MappingClassExternalizerFactory

extends Object
implements ClassExternalizerFactory
Class Inheritance
All Implemented Interfaces
org.jboss.marshalling.ClassExternalizerFactory
Imports
java.util.Map, .HashMap, .Collections

An externalizer factory which uses a fixed mapping from class to externalizer.

Field Summary

Modifier and TypeField and Description
private final Map<Class<?>, Externalizer>

Constructor Summary

AccessConstructor and Description
public
MappingClassExternalizerFactory(final Map<Class<?>, Externalizer>
the mapping
map
)

Construct a new instance.

Method Summary

Modifier and TypeMethod and Description
public Externalizer
getExternalizer(final Class<?>
the type to be externalized
type
)

Implements org.jboss.marshalling.ClassExternalizerFactory.getExternalizer.

Look up a custom externalizer for a given object class.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

externalizerMapback to summary
private final Map<Class<?>, Externalizer> externalizerMap

Constructor Detail

MappingClassExternalizerFactoryback to summary
public MappingClassExternalizerFactory(final Map<Class<?>, Externalizer> map)

Construct a new instance. A copy is made of the given map.

Parameters
map:Map<Class<?>, Externalizer>

the mapping

Method Detail

getExternalizerback to summary
public Externalizer getExternalizer(final Class<?> type)

Implements org.jboss.marshalling.ClassExternalizerFactory.getExternalizer.

Doc from org.jboss.marshalling.ClassExternalizerFactory.getExternalizer.

Look up a custom externalizer for a given object class. If no such externalizer exists, returns null. This implementation uses the fixed mapping that was specified in the constructor.

Parameters
type:Class<?>

the type to be externalized

Returns:Externalizer

the externalizer, or null if there is none