本文整理了Java中org.exolab.castor.mapping.Mapping.getMappingSources()
方法的一些代码示例,展示了Mapping.getMappingSources()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Mapping.getMappingSources()
方法的具体详情如下:
包路径:org.exolab.castor.mapping.Mapping
类名称:Mapping
方法名:getMappingSources
[英]Get list of mapping sources to resolve.
[中]获取要解析的映射源列表。
代码示例来源:origin: org.codehaus.castor/castor-xml
public void loadMappingOnly(final Mapping mapping) throws MappingException {
synchronized (this) {
Iterator iter = mapping.getMappingSources().iterator();
while (iter.hasNext()) {
MappingSource source = (MappingSource) iter.next();
loadMappingInternal(mapping, source.getResolver(), source.getSource());
}
}
}
代码示例来源:origin: org.codehaus.castor/com.springsource.org.castor
public void loadMappingOnly(final Mapping mapping)
throws MappingException {
synchronized (this) {
Iterator iter = mapping.getMappingSources().iterator();
while (iter.hasNext()) {
MappingSource source = (MappingSource) iter.next();
loadMappingInternal(mapping, source.getResolver(), source.getSource());
}
}
}
代码示例来源:origin: org.codehaus.castor/castor-xml
/**
* Returns a mapping resolver for the suitable engine. The engine's specific mapping loader is
* created and used to create engine specific descriptors, returning a suitable mapping resolver.
* The mapping resolver is cached in memory and returned in subsequent method calls.
*
* @param mapping The mapping to load and resolve.
* @param bindingType The binding type to read from mapping.
* @param param Arbitrary parameter that is to be passed to resolver.loadMapping().
* @return A mapping resolver
* @throws MappingException A mapping error occured preventing descriptors from being generated
* from the loaded mapping.
*/
public MappingLoader getMappingLoader(final Mapping mapping, final BindingType bindingType,
final Object param) throws MappingException {
synchronized (this) {
Iterator iter = mapping.getMappingSources().iterator();
while (iter.hasNext()) {
MappingSource source = (MappingSource) iter.next();
loadMappingInternal(mapping, source.getResolver(), source.getSource());
}
AbstractMappingLoader loader;
loader = (AbstractMappingLoader) _registry.getMappingLoader("CastorXmlMapping", bindingType);
loader.setClassLoader(mapping.getClassLoader());
loader.setAllowRedefinitions(_allowRedefinitions);
loader.setInternalContext(_internalContext);
loader.loadMapping(mapping.getRoot(), param);
return loader;
}
}
代码示例来源:origin: org.codehaus.castor/com.springsource.org.castor
throws MappingException {
synchronized (this) {
Iterator iter = mapping.getMappingSources().iterator();
while (iter.hasNext()) {
MappingSource source = (MappingSource) iter.next();
内容来源于网络,如有侵权,请联系作者删除!