Package com.sun.xml.bind.v2.model.core

Examples of com.sun.xml.bind.v2.model.core.TypeInfo


     */
    private void addTypeName(NonElement<T, C> r) {
        QName t = r.getTypeName();
        if(t==null)     return;

        TypeInfo old = typeNames.put(t,r);
        if(old!=null) {
            // collision
            reportError(new IllegalAnnotationException(
                    Messages.CONFLICTING_XML_TYPE_MAPPING.format(r.getTypeName()),
                    old, r ));
View Full Code Here


                        LocalElement e = parent.element();

                        QName tn = t.getTagName();

                        PropertyInfo propInfo = t.getSource();
                        TypeInfo parentInfo = (propInfo == null) ? null : propInfo.parent();
                        if (canBeDirectElementRef(t,tn) || ((!tn.getNamespaceURI().equals(uri) && tn.getNamespaceURI().length()>0) &&
                                                            (!((parentInfo instanceof ClassInfo) && (((ClassInfo)parentInfo).getTypeName() == null))))) {     // see Issue 517
                            e.ref(tn);
                        } else {
                            e.name(tn.getLocalPart());
View Full Code Here

/*     */   {
/*  87 */     Accessor acc = prop.getAccessor();
/*     */
/*  90 */     Class opt = null;
/*     */
/*  92 */     TypeInfo parent = prop.parent();
/*  93 */     if (!(parent instanceof RuntimeClassInfo)) {
/*  94 */       return null;
/*     */     }
/*  96 */     Class dc = (Class)((RuntimeClassInfo)parent).getClazz();
/*  97 */     String newClassName = ClassTailor.toVMClassName(dc) + "_JaxbXducedAccessor_" + prop.getName();
View Full Code Here

/*     */               }
/*     */             }
/*     */           }
/* 238 */           for (Iterator i$ = p.ref().iterator(); i$.hasNext(); t = (TypeInfo)i$.next());
/*     */         }
/*     */         TypeInfo t;
/* 241 */         ci.getBaseClass();
/*     */
/* 243 */         r = ci;
/* 244 */         addTypeName(r);
/*     */       }
View Full Code Here

/*     */   private void addTypeName(NonElement<T, C> r)
/*     */   {
/* 265 */     QName t = r.getTypeName();
/* 266 */     if (t == null) return;
/*     */
/* 268 */     TypeInfo old = (TypeInfo)this.typeNames.put(t, r);
/* 269 */     if (old != null)
/*     */     {
/* 271 */       reportError(new IllegalAnnotationException(Messages.CONFLICTING_XML_TYPE_MAPPING.format(new Object[] { r.getTypeName() }), old, r));
/*     */     }
/*     */   }
View Full Code Here

                        LocalElement e = parent.element();

                        QName tn = t.getTagName();

                        PropertyInfo propInfo = t.getSource();
                        TypeInfo parentInfo = (propInfo == null) ? null : propInfo.parent();

                        if (canBeDirectElementRef(t, tn, parentInfo)) {
                            if ((!t.getTarget().isSimpleType()) && (t.getTarget() instanceof ClassInfo) && collisionChecker.findDuplicate((ClassInfo<T, C>) t.getTarget())) {
                                e.ref(new QName(uri, tn.getLocalPart()));
                            } else {
View Full Code Here

     */
    private void addTypeName(NonElement<T, C> r) {
        QName t = r.getTypeName();
        if(t==null)     return;

        TypeInfo old = typeNames.put(t,r);
        if(old!=null) {
            // collision
            reportError(new IllegalAnnotationException(
                    Messages.CONFLICTING_XML_TYPE_MAPPING.format(r.getTypeName()),
                    old, r ));
View Full Code Here

                        LocalElement e = parent.element();

                        QName tn = t.getTagName();

                        PropertyInfo propInfo = t.getSource();
                        TypeInfo parentInfo = (propInfo == null) ? null : propInfo.parent();

                        if (canBeDirectElementRef(t, tn, parentInfo)) {
                            if ((!t.getTarget().isSimpleType()) && (t.getTarget() instanceof ClassInfo) && collisionChecker.findDuplicate((ClassInfo<T, C>) t.getTarget())) {
                                e.ref(new QName(uri, tn.getLocalPart()));
                            } else {

                                QName elemName = null;
                                if (t.getTarget() instanceof Element) {
                                    Element te = (Element) t.getTarget();
                                    elemName = te.getElementName();
                                }

                                Collection<TypeInfo> refs = propInfo.ref();
                                TypeInfo ti;
                                if ((refs != null) && (!refs.isEmpty()) && (elemName != null)
                                        && ((ti = refs.iterator().next()) == null || ti instanceof ClassInfoImpl)) {
                                    ClassInfoImpl cImpl = (ClassInfoImpl)ti;
                                    if ((cImpl != null) && (cImpl.getElementName() != null)) {
                                        e.ref(new QName(cImpl.getElementName().getNamespaceURI(), tn.getLocalPart()));
View Full Code Here

                        LocalElement e = parent.element();

                        QName tn = t.getTagName();

                        PropertyInfo propInfo = t.getSource();
                        TypeInfo parentInfo = (propInfo == null) ? null : propInfo.parent();

                        if (canBeDirectElementRef(t, tn, parentInfo)) {
                            if ((!t.getTarget().isSimpleType()) && (t.getTarget() instanceof ClassInfo) && collisionChecker.findDuplicate((ClassInfo<T, C>) t.getTarget())) {
                                e.ref(new QName(uri, tn.getLocalPart()));
                            } else {
View Full Code Here

     */
    private void addTypeName(NonElement<T, C> r) {
        QName t = r.getTypeName();
        if(t==null)     return;

        TypeInfo old = typeNames.put(t,r);
        if(old!=null) {
            // collision
            reportError(new IllegalAnnotationException(
                    Messages.CONFLICTING_XML_TYPE_MAPPING.format(r.getTypeName()),
                    old, r ));
View Full Code Here

TOP

Related Classes of com.sun.xml.bind.v2.model.core.TypeInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.