本文整理了Java中org.jgroups.util.Util.getAnnotation()
方法的一些代码示例,展示了Util.getAnnotation()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.getAnnotation()
方法的具体详情如下:
包路径:org.jgroups.util.Util
类名称:Util
方法名:getAnnotation
暂无
代码示例来源:origin: wildfly/wildfly
private static void classToXML(Document xmldoc, Element parent, Class<?> clazz,
String preAppendToSimpleClassName) throws Exception {
XmlInclude incl=Util.getAnnotation(clazz, XmlInclude.class);
if(incl != null) {
String[] schemas=incl.schema();
for (String schema : schemas) {
Element incl_el = xmldoc.createElement(incl.type() == XmlInclude.Type.IMPORT ? "xs:import" : "xs:include");
if (!incl.namespace().isEmpty())
incl_el.setAttribute("namespace", incl.namespace());
incl_el.setAttribute("schemaLocation", schema);
Node first_child = xmldoc.getDocumentElement().getFirstChild();
if (first_child == null)
xmldoc.getDocumentElement().appendChild(incl_el);
else
xmldoc.getDocumentElement().insertBefore(incl_el, first_child);
}
if(!incl.alias().isEmpty())
xmldoc.getDocumentElement().setAttribute("xmlns:" + incl.alias(), incl.namespace());
}
parent.appendChild(createXMLTree(xmldoc, clazz, preAppendToSimpleClassName));
}
代码示例来源:origin: wildfly/wildfly
XmlElement el=Util.getAnnotation(clazz, XmlElement.class);
if(el != null) {
Element choice=xmldoc.createElement("xs:choice");
XmlAttribute xml_attr=Util.getAnnotation(clazz, XmlAttribute.class);
if(xml_attr != null) {
String[] attrs=xml_attr.attrs();
代码示例来源:origin: org.jboss.eap/wildfly-client-all
private static void classToXML(Document xmldoc, Element parent, Class<?> clazz,
String preAppendToSimpleClassName) throws Exception {
XmlInclude incl=Util.getAnnotation(clazz, XmlInclude.class);
if(incl != null) {
String[] schemas=incl.schema();
for (String schema : schemas) {
Element incl_el = xmldoc.createElement(incl.type() == XmlInclude.Type.IMPORT ? "xs:import" : "xs:include");
if (!incl.namespace().isEmpty())
incl_el.setAttribute("namespace", incl.namespace());
incl_el.setAttribute("schemaLocation", schema);
Node first_child = xmldoc.getDocumentElement().getFirstChild();
if (first_child == null)
xmldoc.getDocumentElement().appendChild(incl_el);
else
xmldoc.getDocumentElement().insertBefore(incl_el, first_child);
}
if(!incl.alias().isEmpty())
xmldoc.getDocumentElement().setAttribute("xmlns:" + incl.alias(), incl.namespace());
}
parent.appendChild(createXMLTree(xmldoc, clazz, preAppendToSimpleClassName));
}
代码示例来源:origin: org.jboss.eap/wildfly-client-all
XmlElement el=Util.getAnnotation(clazz, XmlElement.class);
if(el != null) {
Element choice=xmldoc.createElement("xs:choice");
XmlAttribute xml_attr=Util.getAnnotation(clazz, XmlAttribute.class);
if(xml_attr != null) {
String[] attrs=xml_attr.attrs();
内容来源于网络,如有侵权,请联系作者删除!