com.sun.tools.internal.xjc.model.CCustomizations Java Examples

The following examples show how to use com.sun.tools.internal.xjc.model.CCustomizations. 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: BIProperty.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
private CCustomizations getCustomizations( XSParticle src ) {
    // customizations for a particle  should include those defined in the term unless it's global
    // this is so that the schema like:
    //
    // <xs:sequence>
    //   <xs:element name="foo" type="xs:int">
    //     <xs:annotation><xs:appinfo>
    //       <hyperjaxb:... />
    //
    // would be picked up
    if(src.getTerm().isElementDecl()) {
        XSElementDecl xed = src.getTerm().asElementDecl();
        if(xed.isGlobal())
            return getCustomizations((XSComponent)src);
    }

    return getCustomizations(src,src.getTerm());
}
 
Example #2
Source File: RawTypeSetBuilder.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * The whole type set can be later bound to a reference property,
 * in which case we need to generate additional code to wrap this
 * type reference into an element class.
 *
 * This method generates such an element class and returns it.
 */
protected void toElementRef(CReferencePropertyInfo prop) {
    CClassInfo scope = Ring.get(ClassSelector.class).getCurrentBean();
    Model model = Ring.get(Model.class);

    CCustomizations custs = Ring.get(BGMBuilder.class).getBindInfo(decl).toCustomizationList();

    if(target instanceof CClassInfo && Ring.get(BIGlobalBinding.class).isSimpleMode()) {
        CClassInfo bean = new CClassInfo(model,scope,
                        model.getNameConverter().toClassName(decl.getName()),
                        decl.getLocator(), null, BGMBuilder.getName(decl), decl,
                        custs);
        bean.setBaseClass((CClassInfo)target);
        prop.getElements().add(bean);
    } else {
        CElementInfo e = new CElementInfo(model,BGMBuilder.getName(decl),scope,target,
                decl.getDefaultValue(), decl, custs, decl.getLocator());
        prop.getElements().add(e);
    }
}
 
Example #3
Source File: BIProperty.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
private CCustomizations getCustomizations( XSParticle src ) {
    // customizations for a particle  should include those defined in the term unless it's global
    // this is so that the schema like:
    //
    // <xs:sequence>
    //   <xs:element name="foo" type="xs:int">
    //     <xs:annotation><xs:appinfo>
    //       <hyperjaxb:... />
    //
    // would be picked up
    if(src.getTerm().isElementDecl()) {
        XSElementDecl xed = src.getTerm().asElementDecl();
        if(xed.isGlobal())
            return getCustomizations((XSComponent)src);
    }

    return getCustomizations(src,src.getTerm());
}
 
Example #4
Source File: RawTypeSetBuilder.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/**
 * The whole type set can be later bound to a reference property,
 * in which case we need to generate additional code to wrap this
 * type reference into an element class.
 *
 * This method generates such an element class and returns it.
 */
protected void toElementRef(CReferencePropertyInfo prop) {
    CClassInfo scope = Ring.get(ClassSelector.class).getCurrentBean();
    Model model = Ring.get(Model.class);

    CCustomizations custs = Ring.get(BGMBuilder.class).getBindInfo(decl).toCustomizationList();

    if(target instanceof CClassInfo && Ring.get(BIGlobalBinding.class).isSimpleMode()) {
        CClassInfo bean = new CClassInfo(model,scope,
                        model.getNameConverter().toClassName(decl.getName()),
                        decl.getLocator(), null, BGMBuilder.getName(decl), decl,
                        custs);
        bean.setBaseClass((CClassInfo)target);
        prop.getElements().add(bean);
    } else {
        CElementInfo e = new CElementInfo(model,BGMBuilder.getName(decl),scope,target,
                decl.getDefaultValue(), decl, custs, decl.getLocator());
        prop.getElements().add(e);
    }
}
 
Example #5
Source File: BIProperty.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
private CCustomizations getCustomizations( XSParticle src ) {
    // customizations for a particle  should include those defined in the term unless it's global
    // this is so that the schema like:
    //
    // <xs:sequence>
    //   <xs:element name="foo" type="xs:int">
    //     <xs:annotation><xs:appinfo>
    //       <hyperjaxb:... />
    //
    // would be picked up
    if(src.getTerm().isElementDecl()) {
        XSElementDecl xed = src.getTerm().asElementDecl();
        if(xed.isGlobal())
            return getCustomizations((XSComponent)src);
    }

    return getCustomizations(src,src.getTerm());
}
 
Example #6
Source File: RawTypeSetBuilder.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * The whole type set can be later bound to a reference property,
 * in which case we need to generate additional code to wrap this
 * type reference into an element class.
 *
 * This method generates such an element class and returns it.
 */
protected void toElementRef(CReferencePropertyInfo prop) {
    CClassInfo scope = Ring.get(ClassSelector.class).getCurrentBean();
    Model model = Ring.get(Model.class);

    CCustomizations custs = Ring.get(BGMBuilder.class).getBindInfo(decl).toCustomizationList();

    if(target instanceof CClassInfo && Ring.get(BIGlobalBinding.class).isSimpleMode()) {
        CClassInfo bean = new CClassInfo(model,scope,
                        model.getNameConverter().toClassName(decl.getName()),
                        decl.getLocator(), null, BGMBuilder.getName(decl), decl,
                        custs);
        bean.setBaseClass((CClassInfo)target);
        prop.getElements().add(bean);
    } else {
        CElementInfo e = new CElementInfo(model,BGMBuilder.getName(decl),scope,target,
                decl.getDefaultValue(), decl, custs, decl.getLocator());
        prop.getElements().add(e);
    }
}
 
Example #7
Source File: BIProperty.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
private CCustomizations getCustomizations( XSParticle src ) {
    // customizations for a particle  should include those defined in the term unless it's global
    // this is so that the schema like:
    //
    // <xs:sequence>
    //   <xs:element name="foo" type="xs:int">
    //     <xs:annotation><xs:appinfo>
    //       <hyperjaxb:... />
    //
    // would be picked up
    if(src.getTerm().isElementDecl()) {
        XSElementDecl xed = src.getTerm().asElementDecl();
        if(xed.isGlobal())
            return getCustomizations((XSComponent)src);
    }

    return getCustomizations(src,src.getTerm());
}
 
Example #8
Source File: RawTypeSetBuilder.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * The whole type set can be later bound to a reference property,
 * in which case we need to generate additional code to wrap this
 * type reference into an element class.
 *
 * This method generates such an element class and returns it.
 */
protected void toElementRef(CReferencePropertyInfo prop) {
    CClassInfo scope = Ring.get(ClassSelector.class).getCurrentBean();
    Model model = Ring.get(Model.class);

    CCustomizations custs = Ring.get(BGMBuilder.class).getBindInfo(decl).toCustomizationList();

    if(target instanceof CClassInfo && Ring.get(BIGlobalBinding.class).isSimpleMode()) {
        CClassInfo bean = new CClassInfo(model,scope,
                        model.getNameConverter().toClassName(decl.getName()),
                        decl.getLocator(), null, BGMBuilder.getName(decl), decl,
                        custs);
        bean.setBaseClass((CClassInfo)target);
        prop.getElements().add(bean);
    } else {
        CElementInfo e = new CElementInfo(model,BGMBuilder.getName(decl),scope,target,
                decl.getDefaultValue(), decl, custs, decl.getLocator());
        prop.getElements().add(e);
    }
}
 
Example #9
Source File: BIProperty.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
private CCustomizations getCustomizations( XSParticle src ) {
    // customizations for a particle  should include those defined in the term unless it's global
    // this is so that the schema like:
    //
    // <xs:sequence>
    //   <xs:element name="foo" type="xs:int">
    //     <xs:annotation><xs:appinfo>
    //       <hyperjaxb:... />
    //
    // would be picked up
    if(src.getTerm().isElementDecl()) {
        XSElementDecl xed = src.getTerm().asElementDecl();
        if(xed.isGlobal())
            return getCustomizations((XSComponent)src);
    }

    return getCustomizations(src,src.getTerm());
}
 
Example #10
Source File: RawTypeSetBuilder.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * The whole type set can be later bound to a reference property,
 * in which case we need to generate additional code to wrap this
 * type reference into an element class.
 *
 * This method generates such an element class and returns it.
 */
protected void toElementRef(CReferencePropertyInfo prop) {
    CClassInfo scope = Ring.get(ClassSelector.class).getCurrentBean();
    Model model = Ring.get(Model.class);

    CCustomizations custs = Ring.get(BGMBuilder.class).getBindInfo(decl).toCustomizationList();

    if(target instanceof CClassInfo && Ring.get(BIGlobalBinding.class).isSimpleMode()) {
        CClassInfo bean = new CClassInfo(model,scope,
                        model.getNameConverter().toClassName(decl.getName()),
                        decl.getLocator(), null, BGMBuilder.getName(decl), decl,
                        custs);
        bean.setBaseClass((CClassInfo)target);
        prop.getElements().add(bean);
    } else {
        CElementInfo e = new CElementInfo(model,BGMBuilder.getName(decl),scope,target,
                decl.getDefaultValue(), decl, custs, decl.getLocator());
        prop.getElements().add(e);
    }
}
 
Example #11
Source File: BIProperty.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
private CCustomizations getCustomizations( XSParticle src ) {
    // customizations for a particle  should include those defined in the term unless it's global
    // this is so that the schema like:
    //
    // <xs:sequence>
    //   <xs:element name="foo" type="xs:int">
    //     <xs:annotation><xs:appinfo>
    //       <hyperjaxb:... />
    //
    // would be picked up
    if(src.getTerm().isElementDecl()) {
        XSElementDecl xed = src.getTerm().asElementDecl();
        if(xed.isGlobal())
            return getCustomizations((XSComponent)src);
    }

    return getCustomizations(src,src.getTerm());
}
 
Example #12
Source File: RawTypeSetBuilder.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * The whole type set can be later bound to a reference property,
 * in which case we need to generate additional code to wrap this
 * type reference into an element class.
 *
 * This method generates such an element class and returns it.
 */
protected void toElementRef(CReferencePropertyInfo prop) {
    CClassInfo scope = Ring.get(ClassSelector.class).getCurrentBean();
    Model model = Ring.get(Model.class);

    CCustomizations custs = Ring.get(BGMBuilder.class).getBindInfo(decl).toCustomizationList();

    if(target instanceof CClassInfo && Ring.get(BIGlobalBinding.class).isSimpleMode()) {
        CClassInfo bean = new CClassInfo(model,scope,
                        model.getNameConverter().toClassName(decl.getName()),
                        decl.getLocator(), null, BGMBuilder.getName(decl), decl,
                        custs);
        bean.setBaseClass((CClassInfo)target);
        prop.getElements().add(bean);
    } else {
        CElementInfo e = new CElementInfo(model,BGMBuilder.getName(decl),scope,target,
                decl.getDefaultValue(), decl, custs, decl.getLocator());
        prop.getElements().add(e);
    }
}
 
Example #13
Source File: BIProperty.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
private CCustomizations getCustomizations( XSParticle src ) {
    // customizations for a particle  should include those defined in the term unless it's global
    // this is so that the schema like:
    //
    // <xs:sequence>
    //   <xs:element name="foo" type="xs:int">
    //     <xs:annotation><xs:appinfo>
    //       <hyperjaxb:... />
    //
    // would be picked up
    if(src.getTerm().isElementDecl()) {
        XSElementDecl xed = src.getTerm().asElementDecl();
        if(xed.isGlobal())
            return getCustomizations((XSComponent)src);
    }

    return getCustomizations(src,src.getTerm());
}
 
Example #14
Source File: RawTypeSetBuilder.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * The whole type set can be later bound to a reference property,
 * in which case we need to generate additional code to wrap this
 * type reference into an element class.
 *
 * This method generates such an element class and returns it.
 */
protected void toElementRef(CReferencePropertyInfo prop) {
    CClassInfo scope = Ring.get(ClassSelector.class).getCurrentBean();
    Model model = Ring.get(Model.class);

    CCustomizations custs = Ring.get(BGMBuilder.class).getBindInfo(decl).toCustomizationList();

    if(target instanceof CClassInfo && Ring.get(BIGlobalBinding.class).isSimpleMode()) {
        CClassInfo bean = new CClassInfo(model,scope,
                        model.getNameConverter().toClassName(decl.getName()),
                        decl.getLocator(), null, BGMBuilder.getName(decl), decl,
                        custs);
        bean.setBaseClass((CClassInfo)target);
        prop.getElements().add(bean);
    } else {
        CElementInfo e = new CElementInfo(model,BGMBuilder.getName(decl),scope,target,
                decl.getDefaultValue(), decl, custs, decl.getLocator());
        prop.getElements().add(e);
    }
}
 
Example #15
Source File: BIProperty.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
private CCustomizations getCustomizations( XSParticle src ) {
    // customizations for a particle  should include those defined in the term unless it's global
    // this is so that the schema like:
    //
    // <xs:sequence>
    //   <xs:element name="foo" type="xs:int">
    //     <xs:annotation><xs:appinfo>
    //       <hyperjaxb:... />
    //
    // would be picked up
    if(src.getTerm().isElementDecl()) {
        XSElementDecl xed = src.getTerm().asElementDecl();
        if(xed.isGlobal())
            return getCustomizations((XSComponent)src);
    }

    return getCustomizations(src,src.getTerm());
}
 
Example #16
Source File: RawTypeSetBuilder.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/**
 * The whole type set can be later bound to a reference property,
 * in which case we need to generate additional code to wrap this
 * type reference into an element class.
 *
 * This method generates such an element class and returns it.
 */
protected void toElementRef(CReferencePropertyInfo prop) {
    CClassInfo scope = Ring.get(ClassSelector.class).getCurrentBean();
    Model model = Ring.get(Model.class);

    CCustomizations custs = Ring.get(BGMBuilder.class).getBindInfo(decl).toCustomizationList();

    if(target instanceof CClassInfo && Ring.get(BIGlobalBinding.class).isSimpleMode()) {
        CClassInfo bean = new CClassInfo(model,scope,
                        model.getNameConverter().toClassName(decl.getName()),
                        decl.getLocator(), null, BGMBuilder.getName(decl), decl,
                        custs);
        bean.setBaseClass((CClassInfo)target);
        prop.getElements().add(bean);
    } else {
        CElementInfo e = new CElementInfo(model,BGMBuilder.getName(decl),scope,target,
                decl.getDefaultValue(), decl, custs, decl.getLocator());
        prop.getElements().add(e);
    }
}
 
Example #17
Source File: BIProperty.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
private CCustomizations getCustomizations( XSComponent... src ) {
    CCustomizations c = null;
    for (XSComponent s : src) {
        CCustomizations r = getCustomizations(s);
        if(c==null)     c = r;
        else            c = CCustomizations.merge(c,r);
    }
    return c;
}
 
Example #18
Source File: BIProperty.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
private CCustomizations getCustomizations( XSAttributeUse src ) {
    // customizations for an attribute use should include those defined in the local attribute.
    // this is so that the schema like:
    //
    // <xs:attribute name="foo" type="xs:int">
    //   <xs:annotation><xs:appinfo>
    //     <hyperjaxb:... />
    //
    // would be picked up
    if(src.getDecl().isLocal())
        return getCustomizations(src,src.getDecl());
    else
        return getCustomizations((XSComponent)src);
}
 
Example #19
Source File: BIProperty.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
private CCustomizations getCustomizations( XSComponent... src ) {
    CCustomizations c = null;
    for (XSComponent s : src) {
        CCustomizations r = getCustomizations(s);
        if(c==null)     c = r;
        else            c = CCustomizations.merge(c,r);
    }
    return c;
}
 
Example #20
Source File: BIProperty.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
private CCustomizations getCustomizations( XSAttributeUse src ) {
    // customizations for an attribute use should include those defined in the local attribute.
    // this is so that the schema like:
    //
    // <xs:attribute name="foo" type="xs:int">
    //   <xs:annotation><xs:appinfo>
    //     <hyperjaxb:... />
    //
    // would be picked up
    if(src.getDecl().isLocal())
        return getCustomizations(src,src.getDecl());
    else
        return getCustomizations((XSComponent)src);
}
 
Example #21
Source File: BIProperty.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private CCustomizations getCustomizations( XSAttributeUse src ) {
    // customizations for an attribute use should include those defined in the local attribute.
    // this is so that the schema like:
    //
    // <xs:attribute name="foo" type="xs:int">
    //   <xs:annotation><xs:appinfo>
    //     <hyperjaxb:... />
    //
    // would be picked up
    if(src.getDecl().isLocal())
        return getCustomizations(src,src.getDecl());
    else
        return getCustomizations((XSComponent)src);
}
 
Example #22
Source File: BIProperty.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private CCustomizations getCustomizations( XSComponent... src ) {
    CCustomizations c = null;
    for (XSComponent s : src) {
        CCustomizations r = getCustomizations(s);
        if(c==null)     c = r;
        else            c = CCustomizations.merge(c,r);
    }
    return c;
}
 
Example #23
Source File: BIProperty.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
private CCustomizations getCustomizations( XSComponent... src ) {
    CCustomizations c = null;
    for (XSComponent s : src) {
        CCustomizations r = getCustomizations(s);
        if(c==null)     c = r;
        else            c = CCustomizations.merge(c,r);
    }
    return c;
}
 
Example #24
Source File: BIProperty.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private CCustomizations getCustomizations( XSAttributeUse src ) {
    // customizations for an attribute use should include those defined in the local attribute.
    // this is so that the schema like:
    //
    // <xs:attribute name="foo" type="xs:int">
    //   <xs:annotation><xs:appinfo>
    //     <hyperjaxb:... />
    //
    // would be picked up
    if(src.getDecl().isLocal())
        return getCustomizations(src,src.getDecl());
    else
        return getCustomizations((XSComponent)src);
}
 
Example #25
Source File: BIProperty.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private CCustomizations getCustomizations( XSComponent... src ) {
    CCustomizations c = null;
    for (XSComponent s : src) {
        CCustomizations r = getCustomizations(s);
        if(c==null)     c = r;
        else            c = CCustomizations.merge(c,r);
    }
    return c;
}
 
Example #26
Source File: BIProperty.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
private CCustomizations getCustomizations( XSComponent... src ) {
    CCustomizations c = null;
    for (XSComponent s : src) {
        CCustomizations r = getCustomizations(s);
        if(c==null)     c = r;
        else            c = CCustomizations.merge(c,r);
    }
    return c;
}
 
Example #27
Source File: BIProperty.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private CCustomizations getCustomizations( XSAttributeUse src ) {
    // customizations for an attribute use should include those defined in the local attribute.
    // this is so that the schema like:
    //
    // <xs:attribute name="foo" type="xs:int">
    //   <xs:annotation><xs:appinfo>
    //     <hyperjaxb:... />
    //
    // would be picked up
    if(src.getDecl().isLocal())
        return getCustomizations(src,src.getDecl());
    else
        return getCustomizations((XSComponent)src);
}
 
Example #28
Source File: BIProperty.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private CCustomizations getCustomizations( XSComponent... src ) {
    CCustomizations c = null;
    for (XSComponent s : src) {
        CCustomizations r = getCustomizations(s);
        if(c==null)     c = r;
        else            c = CCustomizations.merge(c,r);
    }
    return c;
}
 
Example #29
Source File: BIProperty.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
private CCustomizations getCustomizations( XSAttributeUse src ) {
    // customizations for an attribute use should include those defined in the local attribute.
    // this is so that the schema like:
    //
    // <xs:attribute name="foo" type="xs:int">
    //   <xs:annotation><xs:appinfo>
    //     <hyperjaxb:... />
    //
    // would be picked up
    if(src.getDecl().isLocal())
        return getCustomizations(src,src.getDecl());
    else
        return getCustomizations((XSComponent)src);
}
 
Example #30
Source File: BIProperty.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
private CCustomizations getCustomizations( XSAttributeUse src ) {
    // customizations for an attribute use should include those defined in the local attribute.
    // this is so that the schema like:
    //
    // <xs:attribute name="foo" type="xs:int">
    //   <xs:annotation><xs:appinfo>
    //     <hyperjaxb:... />
    //
    // would be picked up
    if(src.getDecl().isLocal())
        return getCustomizations(src,src.getDecl());
    else
        return getCustomizations((XSComponent)src);
}