Examples of RuntimeValuePropertyInfo


Examples of com.sun.xml.bind.v2.model.runtime.RuntimeValuePropertyInfo

    /**
     * Creates a transducer if this class is bound to a text in XML.
     */
    private Transducer calcTransducer() {
        RuntimeValuePropertyInfo valuep=null;
        if(hasAttributeWildcard())
            return null;        // has attribute wildcard. Can't be handled as a leaf
        for (RuntimeClassInfoImpl ci = this; ci != null; ci = ci.getBaseClass()) {
            for( RuntimePropertyInfo pi : ci.getProperties() )
                if(pi.kind()==PropertyKind.VALUE) {
                    valuep = (RuntimeValuePropertyInfo)pi;
                } else {
                    // this bean has something other than a value
                    return null;
                }
        }
        if(valuep==null)
            return null;
        if( !valuep.getTarget().isSimpleType() )
            return null;    // if there's an error, recover from it by returning null.
       
        return new TransducerImpl(getClazz(),TransducedAccessor.get(
                ((RuntimeModelBuilder)builder).context,valuep));
    }
View Full Code Here

Examples of com.sun.xml.bind.v2.model.runtime.RuntimeValuePropertyInfo

    /**
     * Creates a transducer if this class is bound to a text in XML.
     */
    private Transducer calcTransducer() {
        RuntimeValuePropertyInfo valuep=null;
        if(hasAttributeWildcard())
            return null;        // has attribute wildcard. Can't be handled as a leaf
        for (RuntimeClassInfoImpl ci = this; ci != null; ci = ci.getBaseClass()) {
            for( RuntimePropertyInfo pi : ci.getProperties() )
                if(pi.kind()==PropertyKind.VALUE) {
                    valuep = (RuntimeValuePropertyInfo)pi;
                } else {
                    // this bean has something other than a value
                    return null;
                }
        }
        if(valuep==null)
            return null;
        if( !valuep.getTarget().isSimpleType() )
            return null;    // if there's an error, recover from it by returning null.
       
        return new TransducerImpl(getClazz(),TransducedAccessor.get(
                ((RuntimeModelBuilder)builder).context,valuep));
    }
View Full Code Here

Examples of com.sun.xml.bind.v2.model.runtime.RuntimeValuePropertyInfo

    /**
     * Creates a transducer if this class is bound to a text in XML.
     */
    private Transducer calcTransducer() {
        RuntimeValuePropertyInfo valuep=null;
        if(hasAttributeWildcard())
            return null;        // has attribute wildcard. Can't be handled as a leaf
        for (RuntimeClassInfoImpl ci = this; ci != null; ci = ci.getBaseClass()) {
            for( RuntimePropertyInfo pi : ci.getProperties() )
                if(pi.kind()==PropertyKind.VALUE) {
                    valuep = (RuntimeValuePropertyInfo)pi;
                } else {
                    // this bean has something other than a value
                    return null;
                }
        }
        if(valuep==null)
            return null;
        if( !valuep.getTarget().isSimpleType() )
            return null;    // if there's an error, recover from it by returning null.
       
        return new TransducerImpl(getClazz(),TransducedAccessor.get(
                ((RuntimeModelBuilder)builder).context,valuep));
    }
View Full Code Here

Examples of com.sun.xml.bind.v2.model.runtime.RuntimeValuePropertyInfo

                    doSet(elBuilder.getBody().getBlock(), beanVar2, beanClass, propRef, retVar);

                }
            } else if (prop instanceof RuntimeValuePropertyInfo) {
              logger.info("Reader: Attributes on simple types are not supported yet!");
                RuntimeValuePropertyInfo propv = (RuntimeValuePropertyInfo) prop;
               
                ElementParserBuilder builder2 = (ElementParserBuilder) classBuilder.newState();
                JVar var = builder2.passParentVariable(beanVar);
               
                handlePropertyElement(builder2, var, beanClass, propv, propv.getTarget().getTypeName(),
                                      true, propv.getTarget());
            } else {
              logger.info("(JAXB Reader) Cannot yet map property " + prop.getName()
                                   + " with type " + prop.getRawType()
                                   + " on " + beanClass
                                   + " for " + prop.getClass().getName());
View Full Code Here

Examples of com.sun.xml.bind.v2.model.runtime.RuntimeValuePropertyInfo

                    logger.info("(JAXB Writer) Attribute lists are not supported yet!");
                } else {
                    writeSimpleTypeAttribute(atBuilder, rawType, c, jt);
                }
            } else if (prop instanceof RuntimeValuePropertyInfo) {
                RuntimeValuePropertyInfo propv = (RuntimeValuePropertyInfo) prop;
               
                Type rawType = propv.getRawType();
                Class c = (Class) propv.getTarget().getType();
                JType jt = getType(rawType);

                JVar var = classBuilder.getCurrentBlock().decl(jt,
                                                               prop.getName(),
                                                               classBuilder.getObject().invoke("getValue"));
               
                writeSimpleTypeElement(classBuilder,
                                       propv.getTarget(),
                                       propv.getAdapter(),
                                       var, true, rawType, c, jt);
            } else if (prop instanceof RuntimeReferencePropertyInfo) {
              RuntimeReferencePropertyInfo propRef = (RuntimeReferencePropertyInfo) prop;
//               
//              Set<? extends RuntimeElement> elements = propRef.getElements();
View Full Code Here

Examples of com.sun.xml.bind.v2.model.runtime.RuntimeValuePropertyInfo

                    doSet(elBuilder.getBody().getBlock(), beanVar2, beanClass, propRef, retVar);

                }
            } else if (prop instanceof RuntimeValuePropertyInfo) {
              logger.info("Reader: Attributes on simple types are not supported yet!");
                RuntimeValuePropertyInfo propv = (RuntimeValuePropertyInfo) prop;
               
                ElementParserBuilder builder2 = (ElementParserBuilder) classBuilder.newState();
                JVar var = builder2.passParentVariable(beanVar);
               
                handlePropertyElement(builder2, var, beanClass, propv, propv.getTarget().getTypeName(),
                                      true, propv.getTarget());
            } else {
              logger.info("(JAXB Reader) Cannot yet map property " + prop.getName()
                                   + " with type " + prop.getRawType()
                                   + " on " + beanClass
                                   + " for " + prop.getClass().getName());
View Full Code Here

Examples of com.sun.xml.bind.v2.model.runtime.RuntimeValuePropertyInfo

/* 209 */     return this.xducer;
/*     */   }
/*     */
/*     */   private Transducer calcTransducer()
/*     */   {
/* 216 */     RuntimeValuePropertyInfo valuep = null;
/* 217 */     if (hasAttributeWildcard())
/* 218 */       return null;
/* 219 */     for (RuntimeClassInfoImpl ci = this; ci != null; ci = ci.getBaseClass()) {
/* 220 */       for (RuntimePropertyInfo pi : ci.getProperties()) {
/* 221 */         if (pi.kind() == PropertyKind.VALUE) {
/* 222 */           valuep = (RuntimeValuePropertyInfo)pi;
/*     */         }
/*     */         else
/* 225 */           return null;
/*     */       }
/*     */     }
/* 228 */     if (valuep == null)
/* 229 */       return null;
/* 230 */     if (!valuep.getTarget().isSimpleType()) {
/* 231 */       return null;
/*     */     }
/* 233 */     return new TransducerImpl((Class)getClazz(), TransducedAccessor.get(((RuntimeModelBuilder)this.builder).context, valuep));
/*     */   }
View Full Code Here

Examples of com.sun.xml.bind.v2.model.runtime.RuntimeValuePropertyInfo

    /**
     * Creates a transducer if this class is bound to a text in XML.
     */
    private Transducer calcTransducer() {
        RuntimeValuePropertyInfo valuep=null;
        if(hasAttributeWildcard())
            return null;        // has attribute wildcard. Can't be handled as a leaf
        for (RuntimeClassInfoImpl ci = this; ci != null; ci = ci.getBaseClass()) {
            for( RuntimePropertyInfo pi : ci.getProperties() )
                if(pi.kind()==PropertyKind.VALUE) {
                    valuep = (RuntimeValuePropertyInfo)pi;
                } else {
                    // this bean has something other than a value
                    return null;
                }
        }
        if(valuep==null)
            return null;
        if( !valuep.getTarget().isSimpleType() )
            return null;    // if there's an error, recover from it by returning null.
       
        return new TransducerImpl(getClazz(),TransducedAccessor.get(
                ((RuntimeModelBuilder)builder).context,valuep));
    }
View Full Code Here

Examples of com.sun.xml.internal.bind.v2.model.runtime.RuntimeValuePropertyInfo

    /**
     * Creates a transducer if this class is bound to a text in XML.
     */
    private Transducer calcTransducer() {
        RuntimeValuePropertyInfo valuep=null;
        if(hasAttributeWildcard())
            return null;        // has attribute wildcard. Can't be handled as a leaf
        for (RuntimeClassInfoImpl ci = this; ci != null; ci = ci.getBaseClass()) {
            for( RuntimePropertyInfo pi : ci.getProperties() )
                if(pi.kind()==PropertyKind.VALUE) {
                    valuep = (RuntimeValuePropertyInfo)pi;
                } else {
                    // this bean has something other than a value
                    return null;
                }
        }
        if(valuep==null)
            return null;
        if( !valuep.getTarget().isSimpleType() )
            return null;    // if there's an error, recover from it by returning null.

        return new TransducerImpl(getClazz(),TransducedAccessor.get(
                ((RuntimeModelBuilder)builder).context,valuep));
    }
View Full Code Here

Examples of com.sun.xml.internal.bind.v2.model.runtime.RuntimeValuePropertyInfo

    /**
     * Creates a transducer if this class is bound to a text in XML.
     */
    private Transducer calcTransducer() {
        RuntimeValuePropertyInfo valuep=null;
        if(hasAttributeWildcard())
            return null;        // has attribute wildcard. Can't be handled as a leaf
        for (RuntimeClassInfoImpl ci = this; ci != null; ci = ci.getBaseClass()) {
            for( RuntimePropertyInfo pi : ci.getProperties() )
                if(pi.kind()==PropertyKind.VALUE) {
                    valuep = (RuntimeValuePropertyInfo)pi;
                } else {
                    // this bean has something other than a value
                    return null;
                }
        }
        if(valuep==null)
            return null;
        if( !valuep.getTarget().isSimpleType() )
            return null;    // if there's an error, recover from it by returning null.

        return new TransducerImpl(getClazz(),TransducedAccessor.get(
                ((RuntimeModelBuilder)builder).context,valuep));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.