Examples of RuntimePropertyInfo


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

        return (cp == null) ? null : cp.getInfo();
    }

    @Override
    public boolean isArrayCollection() {
        RuntimePropertyInfo runtimePropertyInfo = isReader ? null : getCurrentElementRuntimePropertyInfo();

        if (runtimePropertyInfo == null && !processedNodes.isEmpty()) {
            final NodeWrapper peek = processedNodes.getLast();
            runtimePropertyInfo = peek.runtimePropertyInfo;
        }

        return runtimePropertyInfo != null && runtimePropertyInfo.isCollection() && !isWildcardElement(runtimePropertyInfo);
    }
View Full Code Here

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

    @Override
    public boolean hasSubElements() {
        if (isReader) {
            return !getExpectedElements().isEmpty();
        } else {
            final RuntimePropertyInfo rpi = getCurrentElementRuntimePropertyInfo();
            return !processedNodes.isEmpty() && (rpi == null || (rpi.elementOnlyContent()));
        }
    }
View Full Code Here

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

     * <p>
     * This allows the implementation to use an optimized code.
     */
    public static <T> TransducedAccessor<T> get(JAXBContextImpl context, RuntimeNonElementRef ref) {
        Transducer xducer = RuntimeModelBuilder.createTransducer(ref);
        RuntimePropertyInfo prop = ref.getSource();

        if(prop.isCollection()) {
            return new ListTransducedAccessorImpl(xducer,prop.getAccessor(),
                    Lister.create(Navigator.REFLECTION.erasure(prop.getRawType()),prop.id(),
                    prop.getAdapter()));
        }

        if(prop.id()==ID.IDREF)
            return new IDREFTransducedAccessorImpl(prop.getAccessor());

        if(xducer.isDefault() && !context.fastBoot) {
            TransducedAccessor xa = OptimizedTransducedAccessorFactory.get(prop);
            if(xa!=null)    return xa;
        }

        if(xducer.useNamespace())
            return new CompositeContextDependentTransducedAccessorImpl( context, xducer, prop.getAccessor() );
        else
            return new CompositeTransducedAccessorImpl( context, xducer, prop.getAccessor() );
    }
View Full Code Here

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

     *
     * TODO: this is not the proper place for this class to be in.
     */
    public static Transducer createTransducer(RuntimeNonElementRef ref) {
        Transducer t = ref.getTarget().getTransducer();
        RuntimePropertyInfo src = ref.getSource();
        ID id = src.id();

        if(id==ID.IDREF)
            return RuntimeBuiltinLeafInfoImpl.STRING;

        if(id==ID.ID)
            t = new IDTransducerImpl(t);

        MimeType emt = src.getExpectedMimeType();
        if(emt!=null)
            t = new MimeTypedTransducer(t,emt);

        if(src.inlineBinaryData())
            t = new InlineBinaryTransducer(t);

        if(src.getSchemaType()!=null)
            t = new SchemaTypeTransducer(t,src.getSchemaType());

        return t;
    }
View Full Code Here

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

     * <p>
     * This allows the implementation to use an optimized code.
     */
    public static <T> TransducedAccessor<T> get(JAXBContextImpl context, RuntimeNonElementRef ref) {
        Transducer xducer = RuntimeModelBuilder.createTransducer(ref);
        RuntimePropertyInfo prop = ref.getSource();

        if(prop.isCollection()) {
            return new ListTransducedAccessorImpl(xducer,prop.getAccessor(),
                    Lister.create(Navigator.REFLECTION.erasure(prop.getRawType()),prop.id(),
                    prop.getAdapter()));
        }

        if(prop.id()==ID.IDREF)
            return new IDREFTransducedAccessorImpl(prop.getAccessor());

        if(xducer.isDefault() && !context.fastBoot) {
            TransducedAccessor xa = OptimizedTransducedAccessorFactory.get(prop);
            if(xa!=null)    return xa;
        }

        if(xducer.useNamespace())
            return new CompositeContextDependentTransducedAccessorImpl( context, xducer, prop.getAccessor() );
        else
            return new CompositeTransducedAccessorImpl( context, xducer, prop.getAccessor() );
    }
View Full Code Here

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

     *
     * TODO: this is not the proper place for this class to be in.
     */
    public static Transducer createTransducer(RuntimeNonElementRef ref) {
        Transducer t = ref.getTarget().getTransducer();
        RuntimePropertyInfo src = ref.getSource();
        ID id = src.id();

        if(id==ID.IDREF)
            return RuntimeBuiltinLeafInfoImpl.STRING;

        if(id==ID.ID)
            t = new IDTransducerImpl(t);

        MimeType emt = src.getExpectedMimeType();
        if(emt!=null)
            t = new MimeTypedTransducer(t,emt);

        if(src.inlineBinaryData())
            t = new InlineBinaryTransducer(t);

        if(src.getSchemaType()!=null) {
            if (src.getSchemaType().equals(createXSSimpleType())) {
                return RuntimeBuiltinLeafInfoImpl.STRING;
            }
            t = new SchemaTypeTransducer(t,src.getSchemaType());
        }
       
        return t;
    }
View Full Code Here

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

     *
     * TODO: this is not the proper place for this class to be in.
     */
    public static Transducer createTransducer(RuntimeNonElementRef ref) {
        Transducer t = ref.getTarget().getTransducer();
        RuntimePropertyInfo src = ref.getSource();
        ID id = src.id();

        if(id==ID.IDREF)
            return RuntimeBuiltinLeafInfoImpl.STRING;

        if(id==ID.ID)
            t = new IDTransducerImpl(t);

        MimeType emt = src.getExpectedMimeType();
        if(emt!=null)
            t = new MimeTypedTransducer(t,emt);

        if(src.inlineBinaryData())
            t = new InlineBinaryTransducer(t);

        if(src.getSchemaType()!=null)
            t = new SchemaTypeTransducer(t,src.getSchemaType());

        return t;
    }
View Full Code Here

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

     * <p>
     * This allows the implementation to use an optimized code.
     */
    public static <T> TransducedAccessor<T> get(JAXBContextImpl context, RuntimeNonElementRef ref) {
        Transducer xducer = RuntimeModelBuilder.createTransducer(ref);
        RuntimePropertyInfo prop = ref.getSource();

        if(prop.isCollection()) {
            return new ListTransducedAccessorImpl(xducer,prop.getAccessor(),
                    Lister.create(Navigator.REFLECTION.erasure(prop.getRawType()),prop.id(),
                    prop.getAdapter()));
        }

        if(prop.id()==ID.IDREF)
            return new IDREFTransducedAccessorImpl(prop.getAccessor());

        if(xducer.isDefault() && context != null && !context.fastBoot) {
            TransducedAccessor xa = OptimizedTransducedAccessorFactory.get(prop);
            if(xa!=null)    return xa;
        }

        if(xducer.useNamespace())
            return new CompositeContextDependentTransducedAccessorImpl( context, xducer, prop.getAccessor() );
        else
            return new CompositeTransducedAccessorImpl( context, xducer, prop.getAccessor() );
    }
View Full Code Here

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

            processingStack.add(new ProcessingInfo(parentPI.lastUnderlyingPI));
            return;
        }
        final XMLSerializer xs = XMLSerializer.getInstance();
        final Property cp = (xs == null) ? null : xs.getCurrentProperty();
        final RuntimePropertyInfo ri = (cp == null) ? null : cp.getInfo();
        final Type rt = (ri == null) ? null : ri.getRawType();
        final String dn = (ri == null) ? null : ri.getName();
        // rt is null for root elements
        if (null == rt) {
            if (writingAttr) {
                // this should not happen:
                processingStack.add(new ProcessingInfo(elementName, ri, false, null));
                return;
            } else {
                processingStack.add(new ProcessingInfo(elementName, ri, false, null));
                return;
            }
        }
        if (primitiveTypes.contains(rt)) {
            processingStack.add(new ProcessingInfo(elementName, ri, false, rt));
            return;
        }
        // TODO: wildcard could still simulate an array by adding several elements of the same name
        if (ri.isCollection() && !isWildcardElement(ri)) { // another array
            if (!((parentPI != null) && (parentPI.isArray) && (parentPI.rpi == ri))) {
                // another array
                processingStack.add(new ProcessingInfo(elementName, ri, true, rt));
                return;
            }
View Full Code Here

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

            processingStack.add(new ProcessingInfo(parentPI.lastUnderlyingPI));
            return;
        }
        final XMLSerializer xs = XMLSerializer.getInstance();
        final Property cp = (xs == null) ? null : xs.getCurrentProperty();
        final RuntimePropertyInfo ri = (cp == null) ? null : cp.getInfo();
        final Type rt = (ri == null) ? null : ri.getRawType();
        final String dn = (ri == null) ? null : ri.getName();
        // rt is null for root elements
        if (null == rt) {
            if (writingAttr) {
                // this should not happen:
                processingStack.add(new ProcessingInfo(elementName, ri, false, null));
                return;
            } else {
                processingStack.add(new ProcessingInfo(elementName, ri, false, null));
                return;
            }
        }
        if (primitiveTypes.contains(rt)) {
            processingStack.add(new ProcessingInfo(elementName, ri, false, rt));
            return;
        }
        if (ri.isCollection()) { // another array
            if (!((parentPI != null) && (parentPI.isArray) && (parentPI.rpi == ri))) {
                // another array
                processingStack.add(new ProcessingInfo(elementName, ri, true, rt));
                return;
            }
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.