|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.betwixt.registry.DefaultXMLBeanInfoRegistry
The default caching implementation. A hashmap is used.
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. |
private java.util.Collection |
getCachedClasses()
Gets all classes that are cached in this registry. |
void |
put(java.lang.Class forThisClass,
XMLBeanInfo beanInfo)
Put into cache |
java.lang.Class |
resolveType(ElementMapping mapping,
ReadContext context)
Checks all registered XMLBeanInfo 's for the
first suitable match. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.util.Map xmlBeanInfos
XMLBeanInfo
's to classes
Constructor Detail |
public DefaultXMLBeanInfoRegistry()
Method Detail |
public XMLBeanInfo get(java.lang.Class forThisClass)
XMLBeanInfo
from cache.
get
in interface XMLBeanInfoRegistry
forThisClass
- the class for which to find a XMLBeanInfo
XMLBeanInfo
associated with given class
or null
if no XMLBeanInfo
has been associatedpublic void put(java.lang.Class forThisClass, XMLBeanInfo beanInfo)
put
in interface XMLBeanInfoRegistry
forThisClass
- the class to cache the XMLBeanInfo
forbeanInfo
- the XMLBeanInfo
to cachepublic void flush()
XMLBeanInfo
's.
flush
in interface XMLBeanInfoRegistry
public java.lang.Class resolveType(ElementMapping mapping, ReadContext context)
XMLBeanInfo
's for the
first suitable match.
If a suitable one is found, then the class of that info is used.
resolveType
in interface PolymorphicReferenceResolver
mapping
- ElementMapping
describing the (polymorphic) element being mapped,
not nullcontext
- ReadContext
, not null
Class
describing the type to which this element should be bound,
or null if the reference cannot be resolvedPolymorphicReferenceResolver.resolveType(org.apache.commons.betwixt.io.read.ElementMapping, org.apache.commons.betwixt.io.read.ReadContext)
private java.util.Collection getCachedClasses()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |