org.exolab.castor.xml.Marshaller.processContainerAttributes()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(2.9k)|赞(0)|评价(0)|浏览(198)

本文整理了Java中org.exolab.castor.xml.Marshaller.processContainerAttributes()方法的一些代码示例,展示了Marshaller.processContainerAttributes()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Marshaller.processContainerAttributes()方法的具体详情如下:
包路径:org.exolab.castor.xml.Marshaller
类名称:Marshaller
方法名:processContainerAttributes

Marshaller.processContainerAttributes介绍

[英]Processes the attributes for container objects
[中]处理容器对象的属性

代码示例

代码示例来源:origin: org.codehaus.castor/com.springsource.org.castor

Object item = Array.get(target, j);
     if (item != null)
       processContainerAttributes(item, containerFieldDesc, atts);
    Object item = enumeration.nextElement();
    if (item != null)
      processContainerAttributes(item, containerFieldDesc, atts);
processContainerAttributes(containerObject, containerClassDesc, atts);

代码示例来源:origin: org.codehaus.castor/castor-xml

/**
 * Processes the attributes for container objects
 *
 * @param target the object currently being marshalled.
 * @param classDesc the XMLClassDescriptor for the target object
 * @param atts the SAX attributes list to add attributes to
 */
private void processContainerAttributes(Object target, XMLClassDescriptor classDesc,
  AttributesImpl atts) throws MarshalException {
 if (classDesc instanceof XMLClassDescriptorImpl) {
  if (!((XMLClassDescriptorImpl) classDesc).hasContainerFields())
   return;
 }
 XMLFieldDescriptor[] elemDescriptors = classDesc.getElementDescriptors();
 for (int i = 0; i < elemDescriptors.length; i++) {
  if (elemDescriptors[i] == null)
   continue;
  if (!elemDescriptors[i].isContainer())
   continue;
  processContainerAttributes(target, elemDescriptors[i], atts);
 }
} // -- processContainerAttributes

代码示例来源:origin: org.codehaus.castor/com.springsource.org.castor

/**
 * Processes the attributes for container objects
 *
 * @param target the object currently being marshalled.
 * @param classDesc the XMLClassDescriptor for the target object
 * @param atts the SAX attributes list to add attributes to
 */
private void processContainerAttributes
  (Object target, XMLClassDescriptor classDesc, AttributesImpl atts)
  throws MarshalException
{
  if (classDesc instanceof XMLClassDescriptorImpl) {
    if (!((XMLClassDescriptorImpl)classDesc).hasContainerFields())
      return;
  }
  XMLFieldDescriptor[] elemDescriptors = classDesc.getElementDescriptors();
  for (int i = 0; i < elemDescriptors.length; i++) {
    if (elemDescriptors[i] == null) continue;
    if (!elemDescriptors[i].isContainer()) continue;
    processContainerAttributes(target, elemDescriptors[i], atts);
  }
} //-- processContainerAttributes

代码示例来源:origin: org.codehaus.castor/castor-xml

Object item = Array.get(target, j);
  if (item != null) {
   processContainerAttributes(item, containerFieldDesc, atts);
  Object item = enumeration.nextElement();
  if (item != null) {
   processContainerAttributes(item, containerFieldDesc, atts);
processContainerAttributes(containerObject, containerClassDesc, atts);

代码示例来源:origin: org.codehaus.castor/castor-xml

processContainerAttributes(object, classDesc, atts);

代码示例来源:origin: org.codehaus.castor/com.springsource.org.castor

if (!isNil) processContainerAttributes(object, classDesc, atts);

相关文章