org.apache.bval.xml
Class XMLMetaBeanManager
java.lang.Object
org.apache.bval.MetaBeanManager
org.apache.bval.xml.XMLMetaBeanManager
- All Implemented Interfaces:
- MetaBeanFinder, MetaBeanEnricher, XMLMetaBeanRegistry
public class XMLMetaBeanManager
- extends MetaBeanManager
- implements XMLMetaBeanRegistry, MetaBeanEnricher
Description: internal implementation class to construct metabeans with
factories and from xstream xml files. You can register different
XMLMetaBeanLoaders (see addLoader()) to register xstream-xml-files that
contain meta-data. You can merge + unify meta data with method
enrichCopies().
User: roman.stumm
Date: 17.06.2010
Time: 09:47:14
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XMLMetaBeanManager
public XMLMetaBeanManager()
XMLMetaBeanManager
public XMLMetaBeanManager(XMLMetaBeanBuilder builder)
addResourceLoader
public void addResourceLoader(String resource)
- Description copied from interface:
XMLMetaBeanRegistry
- convenience method to add a loader for a xml file in the classpath
- Specified by:
addResourceLoader
in interface XMLMetaBeanRegistry
- Parameters:
resource
- - path of xml file in classpath
addLoader
public void addLoader(XMLMetaBeanLoader loader)
- Description copied from interface:
XMLMetaBeanRegistry
- add a loader for xml bean infos.
the registry should use the loader in the sequence they have been added.
- Specified by:
addLoader
in interface XMLMetaBeanRegistry
enrichCopies
public Map<String,MetaBean> enrichCopies(XMLMetaBeanInfos... infos)
- Specified by:
enrichCopies
in interface MetaBeanEnricher
- Parameters:
infos
- - the patches to apply
- Returns:
- all MetaBeans for classes that have a xml descriptor and
additional the MetaBeans loaded by the given loaders. The given
loaders may also return patches for MetaBeans that have also been
returned by other loaders. The beans with patches for references
to patched beans will be copied.
findAll
public Map<String,MetaBean> findAll()
- Returns:
- all MetaBeans for classes that have a xml descriptor: key =
bean.id, value = MetaBean
computeRelationships
protected void computeRelationships(MetaBean beanInfo,
Map<String,MetaBean> cached)
computeRelatedMetaBean
protected void computeRelatedMetaBean(MetaProperty prop,
String beanRef)
- Description copied from class:
MetaBeanManager
- Compute a single related
MetaBean
.
- Overrides:
computeRelatedMetaBean
in class MetaBeanManager
Copyright © 2010-2012 Apache Software Foundation. All Rights Reserved.