org.apache.commons.betwixt.registry
Interface XMLBeanInfoRegistry

All Known Implementing Classes:
DefaultXMLBeanInfoRegistry, NoCacheRegistry

public interface XMLBeanInfoRegistry

Plug in registry for XMLBeanInfo's.

This decouples the implementation of the XMLBeanInfo cache. Users can plug in the standard implementations found in this package to switch caching on and off. Alternatively, they can plug-in an exotic cache of their own devising.

Users can also prime a cache with XMLBeanInfo classes created programmatically.

To find a XMLBeanInfo for a class, XMLIntrospector checks in the registry first before starting introspection. If the registry returns an XMLBeanInfo, then that's used. Otherwise, the XMLBeanInfo will be found by standard introspection and then put(java.lang.Class, org.apache.commons.betwixt.XMLBeanInfo) will be called so that the registry can cache - if it wished - the XMLBeanInfo.

Version:
$Id: XMLBeanInfoRegistry.java 438373 2006-08-30 05:17:21Z bayard $
Author:
Robert Burrell Donkin

Method Summary
 void flush()
          Flush or resets the current registry to it's original state.
 XMLBeanInfo get(java.lang.Class forThisClass)
          Get the XMLBeanInfo for the given class.
 void put(java.lang.Class forThisClass, XMLBeanInfo beanInfo)
          Associate a class with it's XMLBeanInfo.
 

Method Detail

get

XMLBeanInfo get(java.lang.Class forThisClass)
Get the XMLBeanInfo for the given class.

Parameters:
forThisClass - get XMLBeanInfo for this class
Returns:
null if fresh introspection should be used to find the XMLBeanInfo

put

void put(java.lang.Class forThisClass,
         XMLBeanInfo beanInfo)
Associate a class with it's XMLBeanInfo.

Parameters:
forThisClass - the class to associate with the given bean info
beanInfo - the XMLBeanInfo to use for the given class

flush

void flush()
Flush or resets the current registry to it's original state. It has to be implemented, however could be an empty implementation



Copyright 2002-2008 The Apache Software Foundation. All Rights Reserved.