com.sun.xml.internal.txw2.annotation.XmlNamespace Java Examples
The following examples show how to use
com.sun.xml.internal.txw2.annotation.XmlNamespace.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TXW.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
static QName getTagName( Class<?> c ) { String localName=""; String nsUri="##default"; XmlElement xe = c.getAnnotation(XmlElement.class); if(xe!=null) { localName = xe.value(); nsUri = xe.ns(); } if(localName.length()==0) { localName = c.getName(); int idx = localName.lastIndexOf('.'); if(idx>=0) localName = localName.substring(idx+1); localName = Character.toLowerCase(localName.charAt(0))+localName.substring(1); } if(nsUri.equals("##default")) { Package pkg = c.getPackage(); if(pkg!=null) { XmlNamespace xn = pkg.getAnnotation(XmlNamespace.class); if(xn!=null) nsUri = xn.value(); } } if(nsUri.equals("##default")) nsUri = ""; return new QName(nsUri,localName); }
Example #2
Source File: ContainerElement.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** * Decides the namespace URI of the given package. */ private String getNamespace(Package pkg) { if(pkg==null) return ""; String nsUri; XmlNamespace ns = pkg.getAnnotation(XmlNamespace.class); if(ns!=null) nsUri = ns.value(); else nsUri = ""; return nsUri; }
Example #3
Source File: TXW.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
static QName getTagName( Class<?> c ) { String localName=""; String nsUri="##default"; XmlElement xe = c.getAnnotation(XmlElement.class); if(xe!=null) { localName = xe.value(); nsUri = xe.ns(); } if(localName.length()==0) { localName = c.getName(); int idx = localName.lastIndexOf('.'); if(idx>=0) localName = localName.substring(idx+1); localName = Character.toLowerCase(localName.charAt(0))+localName.substring(1); } if(nsUri.equals("##default")) { Package pkg = c.getPackage(); if(pkg!=null) { XmlNamespace xn = pkg.getAnnotation(XmlNamespace.class); if(xn!=null) nsUri = xn.value(); } } if(nsUri.equals("##default")) nsUri = ""; return new QName(nsUri,localName); }
Example #4
Source File: ContainerElement.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
/** * Decides the namespace URI of the given package. */ private String getNamespace(Package pkg) { if(pkg==null) return ""; String nsUri; XmlNamespace ns = pkg.getAnnotation(XmlNamespace.class); if(ns!=null) nsUri = ns.value(); else nsUri = ""; return nsUri; }
Example #5
Source File: TXW.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
static QName getTagName( Class<?> c ) { String localName=""; String nsUri="##default"; XmlElement xe = c.getAnnotation(XmlElement.class); if(xe!=null) { localName = xe.value(); nsUri = xe.ns(); } if(localName.length()==0) { localName = c.getName(); int idx = localName.lastIndexOf('.'); if(idx>=0) localName = localName.substring(idx+1); localName = Character.toLowerCase(localName.charAt(0))+localName.substring(1); } if(nsUri.equals("##default")) { Package pkg = c.getPackage(); if(pkg!=null) { XmlNamespace xn = pkg.getAnnotation(XmlNamespace.class); if(xn!=null) nsUri = xn.value(); } } if(nsUri.equals("##default")) nsUri = ""; return new QName(nsUri,localName); }
Example #6
Source File: ContainerElement.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** * Decides the namespace URI of the given package. */ private String getNamespace(Package pkg) { if(pkg==null) return ""; String nsUri; XmlNamespace ns = pkg.getAnnotation(XmlNamespace.class); if(ns!=null) nsUri = ns.value(); else nsUri = ""; return nsUri; }
Example #7
Source File: TXW.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
static QName getTagName( Class<?> c ) { String localName=""; String nsUri="##default"; XmlElement xe = c.getAnnotation(XmlElement.class); if(xe!=null) { localName = xe.value(); nsUri = xe.ns(); } if(localName.length()==0) { localName = c.getName(); int idx = localName.lastIndexOf('.'); if(idx>=0) localName = localName.substring(idx+1); localName = Character.toLowerCase(localName.charAt(0))+localName.substring(1); } if(nsUri.equals("##default")) { Package pkg = c.getPackage(); if(pkg!=null) { XmlNamespace xn = pkg.getAnnotation(XmlNamespace.class); if(xn!=null) nsUri = xn.value(); } } if(nsUri.equals("##default")) nsUri = ""; return new QName(nsUri,localName); }
Example #8
Source File: ContainerElement.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** * Decides the namespace URI of the given package. */ private String getNamespace(Package pkg) { if(pkg==null) return ""; String nsUri; XmlNamespace ns = pkg.getAnnotation(XmlNamespace.class); if(ns!=null) nsUri = ns.value(); else nsUri = ""; return nsUri; }
Example #9
Source File: TXW.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
static QName getTagName( Class<?> c ) { String localName=""; String nsUri="##default"; XmlElement xe = c.getAnnotation(XmlElement.class); if(xe!=null) { localName = xe.value(); nsUri = xe.ns(); } if(localName.length()==0) { localName = c.getName(); int idx = localName.lastIndexOf('.'); if(idx>=0) localName = localName.substring(idx+1); localName = Character.toLowerCase(localName.charAt(0))+localName.substring(1); } if(nsUri.equals("##default")) { Package pkg = c.getPackage(); if(pkg!=null) { XmlNamespace xn = pkg.getAnnotation(XmlNamespace.class); if(xn!=null) nsUri = xn.value(); } } if(nsUri.equals("##default")) nsUri = ""; return new QName(nsUri,localName); }
Example #10
Source File: ContainerElement.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * Decides the namespace URI of the given package. */ private String getNamespace(Package pkg) { if(pkg==null) return ""; String nsUri; XmlNamespace ns = pkg.getAnnotation(XmlNamespace.class); if(ns!=null) nsUri = ns.value(); else nsUri = ""; return nsUri; }
Example #11
Source File: TXW.java From hottub with GNU General Public License v2.0 | 5 votes |
static QName getTagName( Class<?> c ) { String localName=""; String nsUri="##default"; XmlElement xe = c.getAnnotation(XmlElement.class); if(xe!=null) { localName = xe.value(); nsUri = xe.ns(); } if(localName.length()==0) { localName = c.getName(); int idx = localName.lastIndexOf('.'); if(idx>=0) localName = localName.substring(idx+1); localName = Character.toLowerCase(localName.charAt(0))+localName.substring(1); } if(nsUri.equals("##default")) { Package pkg = c.getPackage(); if(pkg!=null) { XmlNamespace xn = pkg.getAnnotation(XmlNamespace.class); if(xn!=null) nsUri = xn.value(); } } if(nsUri.equals("##default")) nsUri = ""; return new QName(nsUri,localName); }
Example #12
Source File: ContainerElement.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * Decides the namespace URI of the given package. */ private String getNamespace(Package pkg) { if(pkg==null) return ""; String nsUri; XmlNamespace ns = pkg.getAnnotation(XmlNamespace.class); if(ns!=null) nsUri = ns.value(); else nsUri = ""; return nsUri; }
Example #13
Source File: TXW.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
static QName getTagName( Class<?> c ) { String localName=""; String nsUri="##default"; XmlElement xe = c.getAnnotation(XmlElement.class); if(xe!=null) { localName = xe.value(); nsUri = xe.ns(); } if(localName.length()==0) { localName = c.getName(); int idx = localName.lastIndexOf('.'); if(idx>=0) localName = localName.substring(idx+1); localName = Character.toLowerCase(localName.charAt(0))+localName.substring(1); } if(nsUri.equals("##default")) { Package pkg = c.getPackage(); if(pkg!=null) { XmlNamespace xn = pkg.getAnnotation(XmlNamespace.class); if(xn!=null) nsUri = xn.value(); } } if(nsUri.equals("##default")) nsUri = ""; return new QName(nsUri,localName); }
Example #14
Source File: ContainerElement.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * Decides the namespace URI of the given package. */ private String getNamespace(Package pkg) { if(pkg==null) return ""; String nsUri; XmlNamespace ns = pkg.getAnnotation(XmlNamespace.class); if(ns!=null) nsUri = ns.value(); else nsUri = ""; return nsUri; }
Example #15
Source File: TXW.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
static QName getTagName( Class<?> c ) { String localName=""; String nsUri="##default"; XmlElement xe = c.getAnnotation(XmlElement.class); if(xe!=null) { localName = xe.value(); nsUri = xe.ns(); } if(localName.length()==0) { localName = c.getName(); int idx = localName.lastIndexOf('.'); if(idx>=0) localName = localName.substring(idx+1); localName = Character.toLowerCase(localName.charAt(0))+localName.substring(1); } if(nsUri.equals("##default")) { Package pkg = c.getPackage(); if(pkg!=null) { XmlNamespace xn = pkg.getAnnotation(XmlNamespace.class); if(xn!=null) nsUri = xn.value(); } } if(nsUri.equals("##default")) nsUri = ""; return new QName(nsUri,localName); }
Example #16
Source File: ContainerElement.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * Decides the namespace URI of the given package. */ private String getNamespace(Package pkg) { if(pkg==null) return ""; String nsUri; XmlNamespace ns = pkg.getAnnotation(XmlNamespace.class); if(ns!=null) nsUri = ns.value(); else nsUri = ""; return nsUri; }