org.jgroups.util.Util.getAnnotation()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(2.7k)|赞(0)|评价(0)|浏览(203)

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

Util.getAnnotation介绍

暂无

代码示例

代码示例来源:origin: wildfly/wildfly

  1. private static void classToXML(Document xmldoc, Element parent, Class<?> clazz,
  2. String preAppendToSimpleClassName) throws Exception {
  3. XmlInclude incl=Util.getAnnotation(clazz, XmlInclude.class);
  4. if(incl != null) {
  5. String[] schemas=incl.schema();
  6. for (String schema : schemas) {
  7. Element incl_el = xmldoc.createElement(incl.type() == XmlInclude.Type.IMPORT ? "xs:import" : "xs:include");
  8. if (!incl.namespace().isEmpty())
  9. incl_el.setAttribute("namespace", incl.namespace());
  10. incl_el.setAttribute("schemaLocation", schema);
  11. Node first_child = xmldoc.getDocumentElement().getFirstChild();
  12. if (first_child == null)
  13. xmldoc.getDocumentElement().appendChild(incl_el);
  14. else
  15. xmldoc.getDocumentElement().insertBefore(incl_el, first_child);
  16. }
  17. if(!incl.alias().isEmpty())
  18. xmldoc.getDocumentElement().setAttribute("xmlns:" + incl.alias(), incl.namespace());
  19. }
  20. parent.appendChild(createXMLTree(xmldoc, clazz, preAppendToSimpleClassName));
  21. }

代码示例来源:origin: wildfly/wildfly

  1. XmlElement el=Util.getAnnotation(clazz, XmlElement.class);
  2. if(el != null) {
  3. Element choice=xmldoc.createElement("xs:choice");
  4. XmlAttribute xml_attr=Util.getAnnotation(clazz, XmlAttribute.class);
  5. if(xml_attr != null) {
  6. String[] attrs=xml_attr.attrs();

代码示例来源:origin: org.jboss.eap/wildfly-client-all

  1. private static void classToXML(Document xmldoc, Element parent, Class<?> clazz,
  2. String preAppendToSimpleClassName) throws Exception {
  3. XmlInclude incl=Util.getAnnotation(clazz, XmlInclude.class);
  4. if(incl != null) {
  5. String[] schemas=incl.schema();
  6. for (String schema : schemas) {
  7. Element incl_el = xmldoc.createElement(incl.type() == XmlInclude.Type.IMPORT ? "xs:import" : "xs:include");
  8. if (!incl.namespace().isEmpty())
  9. incl_el.setAttribute("namespace", incl.namespace());
  10. incl_el.setAttribute("schemaLocation", schema);
  11. Node first_child = xmldoc.getDocumentElement().getFirstChild();
  12. if (first_child == null)
  13. xmldoc.getDocumentElement().appendChild(incl_el);
  14. else
  15. xmldoc.getDocumentElement().insertBefore(incl_el, first_child);
  16. }
  17. if(!incl.alias().isEmpty())
  18. xmldoc.getDocumentElement().setAttribute("xmlns:" + incl.alias(), incl.namespace());
  19. }
  20. parent.appendChild(createXMLTree(xmldoc, clazz, preAppendToSimpleClassName));
  21. }

代码示例来源:origin: org.jboss.eap/wildfly-client-all

  1. XmlElement el=Util.getAnnotation(clazz, XmlElement.class);
  2. if(el != null) {
  3. Element choice=xmldoc.createElement("xs:choice");
  4. XmlAttribute xml_attr=Util.getAnnotation(clazz, XmlAttribute.class);
  5. if(xml_attr != null) {
  6. String[] attrs=xml_attr.attrs();

相关文章

Util类方法