public class

DefaultXMLBeanInfoRegistry

extends Object
implements PolymorphicReferenceResolver XMLBeanInfoRegistry
java.lang.Object
   ↳ org.apache.commons.betwixt.registry.DefaultXMLBeanInfoRegistry

Class Overview

The default caching implementation. A hashmap is used.

Summary

Public Constructors
DefaultXMLBeanInfoRegistry()
Public Methods
void flush()
Flush existing cached XMLBeanInfo's.
XMLBeanInfo get(Class forThisClass)
Get XMLBeanInfo from cache.
void put(Class forThisClass, XMLBeanInfo beanInfo)
Put into cache
Class resolveType(ElementMapping mapping, ReadContext context)
Checks all registered XMLBeanInfo's for the first suitable match.
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.apache.commons.betwixt.registry.PolymorphicReferenceResolver
From interface org.apache.commons.betwixt.registry.XMLBeanInfoRegistry

Public Constructors

public DefaultXMLBeanInfoRegistry ()

Public Methods

public void flush ()

Flush existing cached XMLBeanInfo's.

public XMLBeanInfo get (Class forThisClass)

Get XMLBeanInfo from cache.

Parameters
forThisClass the class for which to find a XMLBeanInfo
Returns
  • cached XMLBeanInfo associated with given class or null if no XMLBeanInfo has been associated

public void put (Class forThisClass, XMLBeanInfo beanInfo)

Put into cache

Parameters
forThisClass the class to cache the XMLBeanInfo for
beanInfo the XMLBeanInfo to cache

public Class resolveType (ElementMapping mapping, ReadContext context)

Checks all registered XMLBeanInfo's for the first suitable match. If a suitable one is found, then the class of that info is used.

Parameters
mapping ElementMapping describing the (polymorphic) element being mapped, not null
context ReadContext, not null
Returns
  • the Class describing the type to which this element should be bound, or null if the reference cannot be resolved