com.sun.xml.internal.bind.v2.model.runtime.RuntimeTypeRef Java Examples

The following examples show how to use com.sun.xml.internal.bind.v2.model.runtime.RuntimeTypeRef. 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: SingleElementNodeProperty.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
public SingleElementNodeProperty(JAXBContextImpl context, RuntimeElementPropertyInfo prop) {
    super(context,prop);
    acc = prop.getAccessor().optimize(context);
    this.prop = prop;

    QName nt = null;
    boolean nil = false;

    acceptedElements = new QName[prop.getTypes().size()];
    for( int i=0; i<acceptedElements.length; i++ )
        acceptedElements[i] = prop.getTypes().get(i).getTagName();

    for (RuntimeTypeRef e : prop.getTypes()) {
        JaxBeanInfo beanInfo = context.getOrCreate(e.getTarget());
        if(nt==null)    nt = e.getTagName();
        typeNames.put( beanInfo.jaxbType, new TagAndType(
            context.nameBuilder.createElementName(e.getTagName()),beanInfo) );
        nil |= e.isNillable();
    }

    nullTagName = context.nameBuilder.createElementName(nt);

    nillable = nil;
}
 
Example #2
Source File: ArrayElementProperty.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
protected ArrayElementProperty(JAXBContextImpl grammar, RuntimeElementPropertyInfo prop) {
    super(grammar, prop, prop.getXmlName(), prop.isCollectionNillable());
    this.prop = prop;

    List<? extends RuntimeTypeRef> types = prop.getTypes();

    Name n = null;

    for (RuntimeTypeRef typeRef : types) {
        Class type = (Class)typeRef.getTarget().getType();
        if(type.isPrimitive())
            type = RuntimeUtil.primitiveToBox.get(type);

        JaxBeanInfo beanInfo = grammar.getOrCreate(typeRef.getTarget());
        TagAndType tt = new TagAndType(
                            grammar.nameBuilder.createElementName(typeRef.getTagName()),
                            beanInfo);
        typeMap.put(type,tt);
        refs.put(typeRef,beanInfo);
        if(typeRef.isNillable() && n==null)
            n = tt.tagName;
    }

    nillableTagName = n;
}
 
Example #3
Source File: SingleElementNodeProperty.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
public SingleElementNodeProperty(JAXBContextImpl context, RuntimeElementPropertyInfo prop) {
    super(context,prop);
    acc = prop.getAccessor().optimize(context);
    this.prop = prop;

    QName nt = null;
    boolean nil = false;

    acceptedElements = new QName[prop.getTypes().size()];
    for( int i=0; i<acceptedElements.length; i++ )
        acceptedElements[i] = prop.getTypes().get(i).getTagName();

    for (RuntimeTypeRef e : prop.getTypes()) {
        JaxBeanInfo beanInfo = context.getOrCreate(e.getTarget());
        if(nt==null)    nt = e.getTagName();
        typeNames.put( beanInfo.jaxbType, new TagAndType(
            context.nameBuilder.createElementName(e.getTagName()),beanInfo) );
        nil |= e.isNillable();
    }

    nullTagName = context.nameBuilder.createElementName(nt);

    nillable = nil;
}
 
Example #4
Source File: SingleElementNodeProperty.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
public SingleElementNodeProperty(JAXBContextImpl context, RuntimeElementPropertyInfo prop) {
    super(context,prop);
    acc = prop.getAccessor().optimize(context);
    this.prop = prop;

    QName nt = null;
    boolean nil = false;

    acceptedElements = new QName[prop.getTypes().size()];
    for( int i=0; i<acceptedElements.length; i++ )
        acceptedElements[i] = prop.getTypes().get(i).getTagName();

    for (RuntimeTypeRef e : prop.getTypes()) {
        JaxBeanInfo beanInfo = context.getOrCreate(e.getTarget());
        if(nt==null)    nt = e.getTagName();
        typeNames.put( beanInfo.jaxbType, new TagAndType(
            context.nameBuilder.createElementName(e.getTagName()),beanInfo) );
        nil |= e.isNillable();
    }

    nullTagName = context.nameBuilder.createElementName(nt);

    nillable = nil;
}
 
Example #5
Source File: ArrayElementProperty.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
protected ArrayElementProperty(JAXBContextImpl grammar, RuntimeElementPropertyInfo prop) {
    super(grammar, prop, prop.getXmlName(), prop.isCollectionNillable());
    this.prop = prop;

    List<? extends RuntimeTypeRef> types = prop.getTypes();

    Name n = null;

    for (RuntimeTypeRef typeRef : types) {
        Class type = (Class)typeRef.getTarget().getType();
        if(type.isPrimitive())
            type = RuntimeUtil.primitiveToBox.get(type);

        JaxBeanInfo beanInfo = grammar.getOrCreate(typeRef.getTarget());
        TagAndType tt = new TagAndType(
                            grammar.nameBuilder.createElementName(typeRef.getTagName()),
                            beanInfo);
        typeMap.put(type,tt);
        refs.put(typeRef,beanInfo);
        if(typeRef.isNillable() && n==null)
            n = tt.tagName;
    }

    nillableTagName = n;
}
 
Example #6
Source File: ArrayElementProperty.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
protected ArrayElementProperty(JAXBContextImpl grammar, RuntimeElementPropertyInfo prop) {
    super(grammar, prop, prop.getXmlName(), prop.isCollectionNillable());
    this.prop = prop;

    List<? extends RuntimeTypeRef> types = prop.getTypes();

    Name n = null;

    for (RuntimeTypeRef typeRef : types) {
        Class type = (Class)typeRef.getTarget().getType();
        if(type.isPrimitive())
            type = RuntimeUtil.primitiveToBox.get(type);

        JaxBeanInfo beanInfo = grammar.getOrCreate(typeRef.getTarget());
        TagAndType tt = new TagAndType(
                            grammar.nameBuilder.createElementName(typeRef.getTagName()),
                            beanInfo);
        typeMap.put(type,tt);
        refs.put(typeRef,beanInfo);
        if(typeRef.isNillable() && n==null)
            n = tt.tagName;
    }

    nillableTagName = n;
}
 
Example #7
Source File: SingleElementNodeProperty.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
public SingleElementNodeProperty(JAXBContextImpl context, RuntimeElementPropertyInfo prop) {
    super(context,prop);
    acc = prop.getAccessor().optimize(context);
    this.prop = prop;

    QName nt = null;
    boolean nil = false;

    acceptedElements = new QName[prop.getTypes().size()];
    for( int i=0; i<acceptedElements.length; i++ )
        acceptedElements[i] = prop.getTypes().get(i).getTagName();

    for (RuntimeTypeRef e : prop.getTypes()) {
        JaxBeanInfo beanInfo = context.getOrCreate(e.getTarget());
        if(nt==null)    nt = e.getTagName();
        typeNames.put( beanInfo.jaxbType, new TagAndType(
            context.nameBuilder.createElementName(e.getTagName()),beanInfo) );
        nil |= e.isNillable();
    }

    nullTagName = context.nameBuilder.createElementName(nt);

    nillable = nil;
}
 
Example #8
Source File: SingleElementNodeProperty.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
public SingleElementNodeProperty(JAXBContextImpl context, RuntimeElementPropertyInfo prop) {
    super(context,prop);
    acc = prop.getAccessor().optimize(context);
    this.prop = prop;

    QName nt = null;
    boolean nil = false;

    acceptedElements = new QName[prop.getTypes().size()];
    for( int i=0; i<acceptedElements.length; i++ )
        acceptedElements[i] = prop.getTypes().get(i).getTagName();

    for (RuntimeTypeRef e : prop.getTypes()) {
        JaxBeanInfo beanInfo = context.getOrCreate(e.getTarget());
        if(nt==null)    nt = e.getTagName();
        typeNames.put( beanInfo.jaxbType, new TagAndType(
            context.nameBuilder.createElementName(e.getTagName()),beanInfo) );
        nil |= e.isNillable();
    }

    nullTagName = context.nameBuilder.createElementName(nt);

    nillable = nil;
}
 
Example #9
Source File: ArrayElementProperty.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
protected ArrayElementProperty(JAXBContextImpl grammar, RuntimeElementPropertyInfo prop) {
    super(grammar, prop, prop.getXmlName(), prop.isCollectionNillable());
    this.prop = prop;

    List<? extends RuntimeTypeRef> types = prop.getTypes();

    Name n = null;

    for (RuntimeTypeRef typeRef : types) {
        Class type = (Class)typeRef.getTarget().getType();
        if(type.isPrimitive())
            type = RuntimeUtil.primitiveToBox.get(type);

        JaxBeanInfo beanInfo = grammar.getOrCreate(typeRef.getTarget());
        TagAndType tt = new TagAndType(
                            grammar.nameBuilder.createElementName(typeRef.getTagName()),
                            beanInfo);
        typeMap.put(type,tt);
        refs.put(typeRef,beanInfo);
        if(typeRef.isNillable() && n==null)
            n = tt.tagName;
    }

    nillableTagName = n;
}
 
Example #10
Source File: SingleElementNodeProperty.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
public SingleElementNodeProperty(JAXBContextImpl context, RuntimeElementPropertyInfo prop) {
    super(context,prop);
    acc = prop.getAccessor().optimize(context);
    this.prop = prop;

    QName nt = null;
    boolean nil = false;

    acceptedElements = new QName[prop.getTypes().size()];
    for( int i=0; i<acceptedElements.length; i++ )
        acceptedElements[i] = prop.getTypes().get(i).getTagName();

    for (RuntimeTypeRef e : prop.getTypes()) {
        JaxBeanInfo beanInfo = context.getOrCreate(e.getTarget());
        if(nt==null)    nt = e.getTagName();
        typeNames.put( beanInfo.jaxbType, new TagAndType(
            context.nameBuilder.createElementName(e.getTagName()),beanInfo) );
        nil |= e.isNillable();
    }

    nullTagName = context.nameBuilder.createElementName(nt);

    nillable = nil;
}
 
Example #11
Source File: ArrayElementProperty.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
protected ArrayElementProperty(JAXBContextImpl grammar, RuntimeElementPropertyInfo prop) {
    super(grammar, prop, prop.getXmlName(), prop.isCollectionNillable());
    this.prop = prop;

    List<? extends RuntimeTypeRef> types = prop.getTypes();

    Name n = null;

    for (RuntimeTypeRef typeRef : types) {
        Class type = (Class)typeRef.getTarget().getType();
        if(type.isPrimitive())
            type = RuntimeUtil.primitiveToBox.get(type);

        JaxBeanInfo beanInfo = grammar.getOrCreate(typeRef.getTarget());
        TagAndType tt = new TagAndType(
                            grammar.nameBuilder.createElementName(typeRef.getTagName()),
                            beanInfo);
        typeMap.put(type,tt);
        refs.put(typeRef,beanInfo);
        if(typeRef.isNillable() && n==null)
            n = tt.tagName;
    }

    nillableTagName = n;
}
 
Example #12
Source File: ArrayElementProperty.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
protected ArrayElementProperty(JAXBContextImpl grammar, RuntimeElementPropertyInfo prop) {
    super(grammar, prop, prop.getXmlName(), prop.isCollectionNillable());
    this.prop = prop;

    List<? extends RuntimeTypeRef> types = prop.getTypes();

    Name n = null;

    for (RuntimeTypeRef typeRef : types) {
        Class type = (Class)typeRef.getTarget().getType();
        if(type.isPrimitive())
            type = RuntimeUtil.primitiveToBox.get(type);

        JaxBeanInfo beanInfo = grammar.getOrCreate(typeRef.getTarget());
        TagAndType tt = new TagAndType(
                            grammar.nameBuilder.createElementName(typeRef.getTagName()),
                            beanInfo);
        typeMap.put(type,tt);
        refs.put(typeRef,beanInfo);
        if(typeRef.isNillable() && n==null)
            n = tt.tagName;
    }

    nillableTagName = n;
}
 
Example #13
Source File: SingleElementNodeProperty.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
public SingleElementNodeProperty(JAXBContextImpl context, RuntimeElementPropertyInfo prop) {
    super(context,prop);
    acc = prop.getAccessor().optimize(context);
    this.prop = prop;

    QName nt = null;
    boolean nil = false;

    acceptedElements = new QName[prop.getTypes().size()];
    for( int i=0; i<acceptedElements.length; i++ )
        acceptedElements[i] = prop.getTypes().get(i).getTagName();

    for (RuntimeTypeRef e : prop.getTypes()) {
        JaxBeanInfo beanInfo = context.getOrCreate(e.getTarget());
        if(nt==null)    nt = e.getTagName();
        typeNames.put( beanInfo.jaxbType, new TagAndType(
            context.nameBuilder.createElementName(e.getTagName()),beanInfo) );
        nil |= e.isNillable();
    }

    nullTagName = context.nameBuilder.createElementName(nt);

    nillable = nil;
}
 
Example #14
Source File: SingleElementNodeProperty.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
public SingleElementNodeProperty(JAXBContextImpl context, RuntimeElementPropertyInfo prop) {
    super(context,prop);
    acc = prop.getAccessor().optimize(context);
    this.prop = prop;

    QName nt = null;
    boolean nil = false;

    acceptedElements = new QName[prop.getTypes().size()];
    for( int i=0; i<acceptedElements.length; i++ )
        acceptedElements[i] = prop.getTypes().get(i).getTagName();

    for (RuntimeTypeRef e : prop.getTypes()) {
        JaxBeanInfo beanInfo = context.getOrCreate(e.getTarget());
        if(nt==null)    nt = e.getTagName();
        typeNames.put( beanInfo.jaxbType, new TagAndType(
            context.nameBuilder.createElementName(e.getTagName()),beanInfo) );
        nil |= e.isNillable();
    }

    nullTagName = context.nameBuilder.createElementName(nt);

    nillable = nil;
}
 
Example #15
Source File: ArrayElementProperty.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
protected ArrayElementProperty(JAXBContextImpl grammar, RuntimeElementPropertyInfo prop) {
    super(grammar, prop, prop.getXmlName(), prop.isCollectionNillable());
    this.prop = prop;

    List<? extends RuntimeTypeRef> types = prop.getTypes();

    Name n = null;

    for (RuntimeTypeRef typeRef : types) {
        Class type = (Class)typeRef.getTarget().getType();
        if(type.isPrimitive())
            type = RuntimeUtil.primitiveToBox.get(type);

        JaxBeanInfo beanInfo = grammar.getOrCreate(typeRef.getTarget());
        TagAndType tt = new TagAndType(
                            grammar.nameBuilder.createElementName(typeRef.getTagName()),
                            beanInfo);
        typeMap.put(type,tt);
        refs.put(typeRef,beanInfo);
        if(typeRef.isNillable() && n==null)
            n = tt.tagName;
    }

    nillableTagName = n;
}
 
Example #16
Source File: ArrayElementProperty.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
protected ArrayElementProperty(JAXBContextImpl grammar, RuntimeElementPropertyInfo prop) {
    super(grammar, prop, prop.getXmlName(), prop.isCollectionNillable());
    this.prop = prop;

    List<? extends RuntimeTypeRef> types = prop.getTypes();

    Name n = null;

    for (RuntimeTypeRef typeRef : types) {
        Class type = (Class)typeRef.getTarget().getType();
        if(type.isPrimitive())
            type = RuntimeUtil.primitiveToBox.get(type);

        JaxBeanInfo beanInfo = grammar.getOrCreate(typeRef.getTarget());
        TagAndType tt = new TagAndType(
                            grammar.nameBuilder.createElementName(typeRef.getTagName()),
                            beanInfo);
        typeMap.put(type,tt);
        refs.put(typeRef,beanInfo);
        if(typeRef.isNillable() && n==null)
            n = tt.tagName;
    }

    nillableTagName = n;
}
 
Example #17
Source File: RuntimeElementInfoImpl.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public List<? extends RuntimeTypeRef> getTypes() {
    return Collections.singletonList(this);
}
 
Example #18
Source File: RuntimeElementInfoImpl.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
public List<? extends RuntimeTypeRef> getTypes() {
    return Collections.singletonList(this);
}
 
Example #19
Source File: RuntimeElementInfoImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public List<? extends RuntimeTypeRef> getTypes() {
    return Collections.singletonList(this);
}
 
Example #20
Source File: RuntimeElementInfoImpl.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public List<? extends RuntimeTypeRef> getTypes() {
    return Collections.singletonList(this);
}
 
Example #21
Source File: RuntimeElementInfoImpl.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
public List<? extends RuntimeTypeRef> getTypes() {
    return Collections.singletonList(this);
}
 
Example #22
Source File: RuntimeElementInfoImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public List<? extends RuntimeTypeRef> getTypes() {
    return Collections.singletonList(this);
}
 
Example #23
Source File: RuntimeElementInfoImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public List<? extends RuntimeTypeRef> getTypes() {
    return Collections.singletonList(this);
}
 
Example #24
Source File: RuntimeElementInfoImpl.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public List<? extends RuntimeTypeRef> getTypes() {
    return Collections.singletonList(this);
}
 
Example #25
Source File: ArrayElementProperty.java    From openjdk-jdk9 with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Creates a loader handler that unmarshals the body of the item.
 *
 * <p>
 * This will be sandwiched into <item> ... </item>.
 *
 * <p>
 * When unmarshalling the body of item, the Pack of {@link Lister} is available
 * as the handler state.
 *
 * @param chain
 * @param typeRef
 */
private Loader createItemUnmarshaller(UnmarshallerChain chain, RuntimeTypeRef typeRef) {
    if(PropertyFactory.isLeaf(typeRef.getSource())) {
        final Transducer xducer = typeRef.getTransducer();
        return new TextLoader(xducer);
    } else {
        return refs.get(typeRef).getLoader(chain.context,true);
    }
}
 
Example #26
Source File: ArrayElementProperty.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Creates a loader handler that unmarshals the body of the item.
 *
 * <p>
 * This will be sandwiched into <item> ... </item>.
 *
 * <p>
 * When unmarshalling the body of item, the Pack of {@link Lister} is available
 * as the handler state.
 *
 * @param chain
 * @param typeRef
 */
private Loader createItemUnmarshaller(UnmarshallerChain chain, RuntimeTypeRef typeRef) {
    if(PropertyFactory.isLeaf(typeRef.getSource())) {
        final Transducer xducer = typeRef.getTransducer();
        return new TextLoader(xducer);
    } else {
        return refs.get(typeRef).getLoader(chain.context,true);
    }
}
 
Example #27
Source File: ArrayElementProperty.java    From hottub with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Creates a loader handler that unmarshals the body of the item.
 *
 * <p>
 * This will be sandwiched into <item> ... </item>.
 *
 * <p>
 * When unmarshalling the body of item, the Pack of {@link Lister} is available
 * as the handler state.
 *
 * @param chain
 * @param typeRef
 */
private Loader createItemUnmarshaller(UnmarshallerChain chain, RuntimeTypeRef typeRef) {
    if(PropertyFactory.isLeaf(typeRef.getSource())) {
        final Transducer xducer = typeRef.getTransducer();
        return new TextLoader(xducer);
    } else {
        return refs.get(typeRef).getLoader(chain.context,true);
    }
}
 
Example #28
Source File: ArrayElementProperty.java    From openjdk-jdk8u with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Creates a loader handler that unmarshals the body of the item.
 *
 * <p>
 * This will be sandwiched into <item> ... </item>.
 *
 * <p>
 * When unmarshalling the body of item, the Pack of {@link Lister} is available
 * as the handler state.
 *
 * @param chain
 * @param typeRef
 */
private Loader createItemUnmarshaller(UnmarshallerChain chain, RuntimeTypeRef typeRef) {
    if(PropertyFactory.isLeaf(typeRef.getSource())) {
        final Transducer xducer = typeRef.getTransducer();
        return new TextLoader(xducer);
    } else {
        return refs.get(typeRef).getLoader(chain.context,true);
    }
}
 
Example #29
Source File: ArrayElementProperty.java    From openjdk-8-source with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Creates a loader handler that unmarshals the body of the item.
 *
 * <p>
 * This will be sandwiched into <item> ... </item>.
 *
 * <p>
 * When unmarshalling the body of item, the Pack of {@link Lister} is available
 * as the handler state.
 *
 * @param chain
 * @param typeRef
 */
private Loader createItemUnmarshaller(UnmarshallerChain chain, RuntimeTypeRef typeRef) {
    if(PropertyFactory.isLeaf(typeRef.getSource())) {
        final Transducer xducer = typeRef.getTransducer();
        return new TextLoader(xducer);
    } else {
        return refs.get(typeRef).getLoader(chain.context,true);
    }
}
 
Example #30
Source File: ArrayElementProperty.java    From jdk8u60 with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Creates a loader handler that unmarshals the body of the item.
 *
 * <p>
 * This will be sandwiched into <item> ... </item>.
 *
 * <p>
 * When unmarshalling the body of item, the Pack of {@link Lister} is available
 * as the handler state.
 *
 * @param chain
 * @param typeRef
 */
private Loader createItemUnmarshaller(UnmarshallerChain chain, RuntimeTypeRef typeRef) {
    if(PropertyFactory.isLeaf(typeRef.getSource())) {
        final Transducer xducer = typeRef.getTransducer();
        return new TextLoader(xducer);
    } else {
        return refs.get(typeRef).getLoader(chain.context,true);
    }
}