org.apache.commons.betwixt.registry
Class DefaultXMLBeanInfoRegistry

java.lang.Object
  extended by org.apache.commons.betwixt.registry.DefaultXMLBeanInfoRegistry
All Implemented Interfaces:
XMLBeanInfoRegistry

public class DefaultXMLBeanInfoRegistry
extends java.lang.Object
implements XMLBeanInfoRegistry

The default caching implementation. A hashmap is used.

Version:
$Id: DefaultXMLBeanInfoRegistry.java,v 1.3 2003/01/06 22:50:44 rdonkin Exp $
Author:
Robert Burrell Donkin

Field Summary
private  java.util.Map xmlBeanInfos
          Used to associated XMLBeanInfo's to classes
 
Constructor Summary
DefaultXMLBeanInfoRegistry()
           
 
Method Summary
 void flush()
          Flush existing cached XMLBeanInfo's.
 XMLBeanInfo get(java.lang.Class forThisClass)
          Get XMLBeanInfo from cache.
 void put(java.lang.Class forThisClass, XMLBeanInfo beanInfo)
          Put into cache
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

xmlBeanInfos

private java.util.Map xmlBeanInfos
Used to associated XMLBeanInfo's to classes

Constructor Detail

DefaultXMLBeanInfoRegistry

public DefaultXMLBeanInfoRegistry()
Method Detail

get

public XMLBeanInfo get(java.lang.Class forThisClass)
Get XMLBeanInfo from cache.

Specified by:
get in interface XMLBeanInfoRegistry
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

put

public void put(java.lang.Class forThisClass,
                XMLBeanInfo beanInfo)
Put into cache

Specified by:
put in interface XMLBeanInfoRegistry
Parameters:
forThisClass - the class to cache the XMLBeanInfo for
beanInfo - the XMLBeanInfo to cache

flush

public void flush()
Flush existing cached XMLBeanInfo's.

Specified by:
flush in interface XMLBeanInfoRegistry