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

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


/*     */     }
/*     */   }
/*     */
/*     */   public NonElement<T, C> getTypeInfo(T t, Locatable upstream)
/*     */   {
/* 285 */     NonElement r = this.typeInfoSet.getTypeInfo(t);
/* 286 */     if (r != null) return r;
/*     */
/* 288 */     if (this.nav.isArray(t)) {
/* 289 */       ArrayInfoImpl ai = createArrayInfo(upstream, t);
/*     */
View Full Code Here


/* 305 */     Object s = reader().getClassValue(this.anno, "scope");
/* 306 */     if (s.equals(nav().ref(XmlElementDecl.GLOBAL.class))) {
/* 307 */       this.scope = null;
/*     */     }
/*     */     else {
/* 310 */       NonElement scp = builder.getClassInfo(nav().asDecl(s), this);
/* 311 */       if (!(scp instanceof ClassInfo)) {
/* 312 */         throw new IllegalAnnotationException(Messages.SCOPE_IS_NOT_COMPLEXTYPE.format(new Object[] { nav().getTypeName(s) }), this.anno);
/*     */       }
/*     */
/* 316 */       this.scope = ((ClassInfo)scp);
View Full Code Here

/* 836 */       if ((tr.type == Void.TYPE) || (tr.type == Void.class)) {
/* 837 */         xsdgen.add(tr.tagName, false, null);
/*     */       }
/* 839 */       else if (tr.type != CompositeStructure.class)
/*     */       {
/* 842 */         NonElement typeInfo = getXmlType(tis, tr);
/* 843 */         xsdgen.add(tr.tagName, !Navigator.REFLECTION.isPrimitive(tr.type), typeInfo);
/*     */       }
/*     */     }
/* 846 */     return xsdgen;
/*     */   }
View Full Code Here

/* 846 */     return xsdgen;
/*     */   }
/*     */
/*     */   public QName getTypeName(TypeReference tr) {
/*     */     try {
/* 851 */       NonElement xt = getXmlType(getTypeInfoSet(), tr);
/* 852 */       if (xt == null) throw new IllegalArgumentException();
/* 853 */       return xt.getTypeName();
/*     */     } catch (IllegalAnnotationsException e) {
/*     */     }
/* 856 */     throw new AssertionError(e);
/*     */   }
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

    private static RuntimeTypeInfoSet create(Class... classes) throws Exception {
        IllegalAnnotationsException.Builder errorListener = new IllegalAnnotationsException.Builder();
        RuntimeInlineAnnotationReader reader = new RuntimeInlineAnnotationReader();
        JAXBContextImpl context =
            new JAXBContextImpl(classes, null, Collections.<Class, Class> emptyMap(), null, false, reader, false, false);
        RuntimeModelBuilder builder =
            new RuntimeModelBuilder(context, reader, Collections.<Class, Class> emptyMap(), null);
        builder.setErrorHandler(errorListener);
        for (Class c : classes)
            builder.getTypeInfo(new Ref<Type, Class>(c));

        RuntimeTypeInfoSet r = builder.link();
        errorListener.check();
        return r;
    }
View Full Code Here

    private static RuntimeTypeInfoSet create(Class... classes) throws Exception {
        IllegalAnnotationsException.Builder errorListener = new IllegalAnnotationsException.Builder();
        RuntimeInlineAnnotationReader reader = new RuntimeInlineAnnotationReader();
        JAXBContextImpl context =
            new JAXBContextImpl(classes, null, Collections.<Class, Class> emptyMap(), null, false, reader, false, false);
        RuntimeModelBuilder builder =
            new RuntimeModelBuilder(context, reader, Collections.<Class, Class> emptyMap(), null);
        builder.setErrorHandler(errorListener);
        for (Class c : classes)
            builder.getTypeInfo(new Ref<Type, Class>(c));

        RuntimeTypeInfoSet r = builder.link();
        errorListener.check();
        return r;
    }
View Full Code Here

    private static RuntimeTypeInfoSet create(Class... classes) throws Exception {
        IllegalAnnotationsException.Builder errorListener = new IllegalAnnotationsException.Builder();
        RuntimeInlineAnnotationReader reader = new RuntimeInlineAnnotationReader();
        JAXBContextImpl context =
            new JAXBContextImpl(classes, null, Collections.<Class, Class> emptyMap(), null, false, reader, false, false);
        RuntimeModelBuilder builder =
            new RuntimeModelBuilder(context, reader, Collections.<Class, Class> emptyMap(), null);
        builder.setErrorHandler(errorListener);
        for (Class c : classes)
            builder.getTypeInfo(new Ref<Type, Class>(c));

        RuntimeTypeInfoSet r = builder.link();
        errorListener.check();
        return r;
    }
View Full Code Here

    private static RuntimeTypeInfoSet create(Class... classes) throws Exception {
        IllegalAnnotationsException.Builder errorListener = new IllegalAnnotationsException.Builder();
        RuntimeInlineAnnotationReader reader = new RuntimeInlineAnnotationReader();
        JAXBContextImpl context =
            new JAXBContextImpl(classes, null, Collections.<Class, Class> emptyMap(), null, false, reader, false, false);
        RuntimeModelBuilder builder =
            new RuntimeModelBuilder(context, reader, Collections.<Class, Class> emptyMap(), null);
        builder.setErrorHandler(errorListener);
        for (Class c : classes)
            builder.getTypeInfo(new Ref<Type, Class>(c));

        RuntimeTypeInfoSet r = builder.link();
        errorListener.check();
        return r;
    }
View Full Code Here

            RuntimeTypeInfoSet r = typeInfoSetCache.get();
            if(r!=null)
                return r;
        }

        final RuntimeModelBuilder builder = new RuntimeModelBuilder(this,annotationReader,subclassReplacements,defaultNsUri);

        IllegalAnnotationsException.Builder errorHandler = new IllegalAnnotationsException.Builder();
        builder.setErrorHandler(errorHandler);

        for( Class c : classes ) {
            if(c==CompositeStructure.class)
                // CompositeStructure doesn't have TypeInfo, so skip it.
                // We'll add JaxBeanInfo for this later automatically
                continue;
            builder.getTypeInfo(new Ref<Type,Class>(c));
        }

        this.hasSwaRef |= builder.hasSwaRef;
        RuntimeTypeInfoSet r = builder.link();

        errorHandler.check();
        assert r!=null : "if no error was reported, the link must be a success";

        typeInfoSetCache = new WeakReference<RuntimeTypeInfoSet>(r);
View Full Code Here

TOP

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

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.