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

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

本文整理了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

  1. Object item = Array.get(target, j);
  2. if (item != null)
  3. processContainerAttributes(item, containerFieldDesc, atts);
  4. Object item = enumeration.nextElement();
  5. if (item != null)
  6. processContainerAttributes(item, containerFieldDesc, atts);
  7. processContainerAttributes(containerObject, containerClassDesc, atts);

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

  1. /**
  2. * Processes the attributes for container objects
  3. *
  4. * @param target the object currently being marshalled.
  5. * @param classDesc the XMLClassDescriptor for the target object
  6. * @param atts the SAX attributes list to add attributes to
  7. */
  8. private void processContainerAttributes(Object target, XMLClassDescriptor classDesc,
  9. AttributesImpl atts) throws MarshalException {
  10. if (classDesc instanceof XMLClassDescriptorImpl) {
  11. if (!((XMLClassDescriptorImpl) classDesc).hasContainerFields())
  12. return;
  13. }
  14. XMLFieldDescriptor[] elemDescriptors = classDesc.getElementDescriptors();
  15. for (int i = 0; i < elemDescriptors.length; i++) {
  16. if (elemDescriptors[i] == null)
  17. continue;
  18. if (!elemDescriptors[i].isContainer())
  19. continue;
  20. processContainerAttributes(target, elemDescriptors[i], atts);
  21. }
  22. } // -- processContainerAttributes

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

  1. /**
  2. * Processes the attributes for container objects
  3. *
  4. * @param target the object currently being marshalled.
  5. * @param classDesc the XMLClassDescriptor for the target object
  6. * @param atts the SAX attributes list to add attributes to
  7. */
  8. private void processContainerAttributes
  9. (Object target, XMLClassDescriptor classDesc, AttributesImpl atts)
  10. throws MarshalException
  11. {
  12. if (classDesc instanceof XMLClassDescriptorImpl) {
  13. if (!((XMLClassDescriptorImpl)classDesc).hasContainerFields())
  14. return;
  15. }
  16. XMLFieldDescriptor[] elemDescriptors = classDesc.getElementDescriptors();
  17. for (int i = 0; i < elemDescriptors.length; i++) {
  18. if (elemDescriptors[i] == null) continue;
  19. if (!elemDescriptors[i].isContainer()) continue;
  20. processContainerAttributes(target, elemDescriptors[i], atts);
  21. }
  22. } //-- processContainerAttributes

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

  1. Object item = Array.get(target, j);
  2. if (item != null) {
  3. processContainerAttributes(item, containerFieldDesc, atts);
  4. Object item = enumeration.nextElement();
  5. if (item != null) {
  6. processContainerAttributes(item, containerFieldDesc, atts);
  7. processContainerAttributes(containerObject, containerClassDesc, atts);

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

  1. processContainerAttributes(object, classDesc, atts);

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

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

相关文章