Java Code Examples for com.sun.tools.internal.xjc.model.CReferencePropertyInfo#isDummy()

The following examples show how to use com.sun.tools.internal.xjc.model.CReferencePropertyInfo#isDummy() . 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: DummyListField.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Annotate the field according to the recipes given as {@link CPropertyInfo}.
 */
@Override
protected void annotate( JAnnotatable field ) {
    super.annotate(field);

    if (prop instanceof CReferencePropertyInfo) {
        CReferencePropertyInfo pref = (CReferencePropertyInfo)prop;
        if (pref.isDummy()) {
            annotateDummy(field);
        }
    }

}
 
Example 2
Source File: DefaultFieldRenderer.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
private FieldRenderer decideRenderer(ClassOutlineImpl outline, CPropertyInfo prop) {

        if (prop instanceof CReferencePropertyInfo) {
            CReferencePropertyInfo p = (CReferencePropertyInfo)prop;
            if (p.isDummy()) {
                return frf.getDummyList(outline.parent().getCodeModel().ref(ArrayList.class));
            }
            if (p.isContent() && (p.isMixedExtendedCust())) {
                return frf.getContentList(outline.parent().getCodeModel().ref(ArrayList.class).narrow(Serializable.class));
            }
        }

        if(!prop.isCollection()) {
            // non-collection field

            // TODO: check for bidning info for optionalPrimitiveType=boxed or
            // noHasMethod=false and noDeletedMethod=false
            if(prop.isUnboxable())
                // this one uses a primitive type as much as possible
                return frf.getRequiredUnboxed();
            else
                // otherwise use the default non-collection field
                return frf.getSingle();
        }

        if( defaultCollectionFieldRenderer==null ) {
            return frf.getList(outline.parent().getCodeModel().ref(ArrayList.class));
        }

        // this field is a collection field.
        // use untyped list as the default. This is consistent
        // to the JAXB spec.
        return defaultCollectionFieldRenderer;
    }
 
Example 3
Source File: DummyListField.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Annotate the field according to the recipes given as {@link CPropertyInfo}.
 */
@Override
protected void annotate( JAnnotatable field ) {
    super.annotate(field);

    if (prop instanceof CReferencePropertyInfo) {
        CReferencePropertyInfo pref = (CReferencePropertyInfo)prop;
        if (pref.isDummy()) {
            annotateDummy(field);
        }
    }

}
 
Example 4
Source File: DefaultFieldRenderer.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
private FieldRenderer decideRenderer(ClassOutlineImpl outline, CPropertyInfo prop) {

        if (prop instanceof CReferencePropertyInfo) {
            CReferencePropertyInfo p = (CReferencePropertyInfo)prop;
            if (p.isDummy()) {
                return frf.getDummyList(outline.parent().getCodeModel().ref(ArrayList.class));
            }
            if (p.isContent() && (p.isMixedExtendedCust())) {
                return frf.getContentList(outline.parent().getCodeModel().ref(ArrayList.class).narrow(Serializable.class));
            }
        }

        if(!prop.isCollection()) {
            // non-collection field

            // TODO: check for bidning info for optionalPrimitiveType=boxed or
            // noHasMethod=false and noDeletedMethod=false
            if(prop.isUnboxable())
                // this one uses a primitive type as much as possible
                return frf.getRequiredUnboxed();
            else
                // otherwise use the default non-collection field
                return frf.getSingle();
        }

        if( defaultCollectionFieldRenderer==null ) {
            return frf.getList(outline.parent().getCodeModel().ref(ArrayList.class));
        }

        // this field is a collection field.
        // use untyped list as the default. This is consistent
        // to the JAXB spec.
        return defaultCollectionFieldRenderer;
    }
 
Example 5
Source File: DummyListField.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Annotate the field according to the recipes given as {@link CPropertyInfo}.
 */
@Override
protected void annotate( JAnnotatable field ) {
    super.annotate(field);

    if (prop instanceof CReferencePropertyInfo) {
        CReferencePropertyInfo pref = (CReferencePropertyInfo)prop;
        if (pref.isDummy()) {
            annotateDummy(field);
        }
    }

}
 
Example 6
Source File: DefaultFieldRenderer.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private FieldRenderer decideRenderer(ClassOutlineImpl outline, CPropertyInfo prop) {

        if (prop instanceof CReferencePropertyInfo) {
            CReferencePropertyInfo p = (CReferencePropertyInfo)prop;
            if (p.isDummy()) {
                return frf.getDummyList(outline.parent().getCodeModel().ref(ArrayList.class));
            }
            if (p.isContent() && (p.isMixedExtendedCust())) {
                return frf.getContentList(outline.parent().getCodeModel().ref(ArrayList.class).narrow(Serializable.class));
            }
        }

        if(!prop.isCollection()) {
            // non-collection field

            // TODO: check for bidning info for optionalPrimitiveType=boxed or
            // noHasMethod=false and noDeletedMethod=false
            if(prop.isUnboxable())
                // this one uses a primitive type as much as possible
                return frf.getRequiredUnboxed();
            else
                // otherwise use the default non-collection field
                return frf.getSingle();
        }

        if( defaultCollectionFieldRenderer==null ) {
            return frf.getList(outline.parent().getCodeModel().ref(ArrayList.class));
        }

        // this field is a collection field.
        // use untyped list as the default. This is consistent
        // to the JAXB spec.
        return defaultCollectionFieldRenderer;
    }
 
Example 7
Source File: DummyListField.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Annotate the field according to the recipes given as {@link CPropertyInfo}.
 */
@Override
protected void annotate( JAnnotatable field ) {
    super.annotate(field);

    if (prop instanceof CReferencePropertyInfo) {
        CReferencePropertyInfo pref = (CReferencePropertyInfo)prop;
        if (pref.isDummy()) {
            annotateDummy(field);
        }
    }

}
 
Example 8
Source File: DefaultFieldRenderer.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private FieldRenderer decideRenderer(ClassOutlineImpl outline, CPropertyInfo prop) {

        if (prop instanceof CReferencePropertyInfo) {
            CReferencePropertyInfo p = (CReferencePropertyInfo)prop;
            if (p.isDummy()) {
                return frf.getDummyList(outline.parent().getCodeModel().ref(ArrayList.class));
            }
            if (p.isContent() && (p.isMixedExtendedCust())) {
                return frf.getContentList(outline.parent().getCodeModel().ref(ArrayList.class).narrow(Serializable.class));
            }
        }

        if(!prop.isCollection()) {
            // non-collection field

            // TODO: check for bidning info for optionalPrimitiveType=boxed or
            // noHasMethod=false and noDeletedMethod=false
            if(prop.isUnboxable())
                // this one uses a primitive type as much as possible
                return frf.getRequiredUnboxed();
            else
                // otherwise use the default non-collection field
                return frf.getSingle();
        }

        if( defaultCollectionFieldRenderer==null ) {
            return frf.getList(outline.parent().getCodeModel().ref(ArrayList.class));
        }

        // this field is a collection field.
        // use untyped list as the default. This is consistent
        // to the JAXB spec.
        return defaultCollectionFieldRenderer;
    }
 
Example 9
Source File: DummyListField.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Annotate the field according to the recipes given as {@link CPropertyInfo}.
 */
@Override
protected void annotate( JAnnotatable field ) {
    super.annotate(field);

    if (prop instanceof CReferencePropertyInfo) {
        CReferencePropertyInfo pref = (CReferencePropertyInfo)prop;
        if (pref.isDummy()) {
            annotateDummy(field);
        }
    }

}
 
Example 10
Source File: DefaultFieldRenderer.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private FieldRenderer decideRenderer(ClassOutlineImpl outline, CPropertyInfo prop) {

        if (prop instanceof CReferencePropertyInfo) {
            CReferencePropertyInfo p = (CReferencePropertyInfo)prop;
            if (p.isDummy()) {
                return frf.getDummyList(outline.parent().getCodeModel().ref(ArrayList.class));
            }
            if (p.isContent() && (p.isMixedExtendedCust())) {
                return frf.getContentList(outline.parent().getCodeModel().ref(ArrayList.class).narrow(Serializable.class));
            }
        }

        if(!prop.isCollection()) {
            // non-collection field

            // TODO: check for bidning info for optionalPrimitiveType=boxed or
            // noHasMethod=false and noDeletedMethod=false
            if(prop.isUnboxable())
                // this one uses a primitive type as much as possible
                return frf.getRequiredUnboxed();
            else
                // otherwise use the default non-collection field
                return frf.getSingle();
        }

        if( defaultCollectionFieldRenderer==null ) {
            return frf.getList(outline.parent().getCodeModel().ref(ArrayList.class));
        }

        // this field is a collection field.
        // use untyped list as the default. This is consistent
        // to the JAXB spec.
        return defaultCollectionFieldRenderer;
    }
 
Example 11
Source File: DummyListField.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Annotate the field according to the recipes given as {@link CPropertyInfo}.
 */
@Override
protected void annotate( JAnnotatable field ) {
    super.annotate(field);

    if (prop instanceof CReferencePropertyInfo) {
        CReferencePropertyInfo pref = (CReferencePropertyInfo)prop;
        if (pref.isDummy()) {
            annotateDummy(field);
        }
    }

}
 
Example 12
Source File: DefaultFieldRenderer.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
private FieldRenderer decideRenderer(ClassOutlineImpl outline, CPropertyInfo prop) {

        if (prop instanceof CReferencePropertyInfo) {
            CReferencePropertyInfo p = (CReferencePropertyInfo)prop;
            if (p.isDummy()) {
                return frf.getDummyList(outline.parent().getCodeModel().ref(ArrayList.class));
            }
            if (p.isContent() && (p.isMixedExtendedCust())) {
                return frf.getContentList(outline.parent().getCodeModel().ref(ArrayList.class).narrow(Serializable.class));
            }
        }

        if(!prop.isCollection()) {
            // non-collection field

            // TODO: check for bidning info for optionalPrimitiveType=boxed or
            // noHasMethod=false and noDeletedMethod=false
            if(prop.isUnboxable())
                // this one uses a primitive type as much as possible
                return frf.getRequiredUnboxed();
            else
                // otherwise use the default non-collection field
                return frf.getSingle();
        }

        if( defaultCollectionFieldRenderer==null ) {
            return frf.getList(outline.parent().getCodeModel().ref(ArrayList.class));
        }

        // this field is a collection field.
        // use untyped list as the default. This is consistent
        // to the JAXB spec.
        return defaultCollectionFieldRenderer;
    }
 
Example 13
Source File: DummyListField.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Annotate the field according to the recipes given as {@link CPropertyInfo}.
 */
@Override
protected void annotate( JAnnotatable field ) {
    super.annotate(field);

    if (prop instanceof CReferencePropertyInfo) {
        CReferencePropertyInfo pref = (CReferencePropertyInfo)prop;
        if (pref.isDummy()) {
            annotateDummy(field);
        }
    }

}
 
Example 14
Source File: DefaultFieldRenderer.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
private FieldRenderer decideRenderer(ClassOutlineImpl outline, CPropertyInfo prop) {

        if (prop instanceof CReferencePropertyInfo) {
            CReferencePropertyInfo p = (CReferencePropertyInfo)prop;
            if (p.isDummy()) {
                return frf.getDummyList(outline.parent().getCodeModel().ref(ArrayList.class));
            }
            if (p.isContent() && (p.isMixedExtendedCust())) {
                return frf.getContentList(outline.parent().getCodeModel().ref(ArrayList.class).narrow(Serializable.class));
            }
        }

        if(!prop.isCollection()) {
            // non-collection field

            // TODO: check for bidning info for optionalPrimitiveType=boxed or
            // noHasMethod=false and noDeletedMethod=false
            if(prop.isUnboxable())
                // this one uses a primitive type as much as possible
                return frf.getRequiredUnboxed();
            else
                // otherwise use the default non-collection field
                return frf.getSingle();
        }

        if( defaultCollectionFieldRenderer==null ) {
            return frf.getList(outline.parent().getCodeModel().ref(ArrayList.class));
        }

        // this field is a collection field.
        // use untyped list as the default. This is consistent
        // to the JAXB spec.
        return defaultCollectionFieldRenderer;
    }
 
Example 15
Source File: DummyListField.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Annotate the field according to the recipes given as {@link CPropertyInfo}.
 */
@Override
protected void annotate( JAnnotatable field ) {
    super.annotate(field);

    if (prop instanceof CReferencePropertyInfo) {
        CReferencePropertyInfo pref = (CReferencePropertyInfo)prop;
        if (pref.isDummy()) {
            annotateDummy(field);
        }
    }

}
 
Example 16
Source File: DefaultFieldRenderer.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
private FieldRenderer decideRenderer(ClassOutlineImpl outline, CPropertyInfo prop) {

        if (prop instanceof CReferencePropertyInfo) {
            CReferencePropertyInfo p = (CReferencePropertyInfo)prop;
            if (p.isDummy()) {
                return frf.getDummyList(outline.parent().getCodeModel().ref(ArrayList.class));
            }
            if (p.isContent() && (p.isMixedExtendedCust())) {
                return frf.getContentList(outline.parent().getCodeModel().ref(ArrayList.class).narrow(Serializable.class));
            }
        }

        if(!prop.isCollection()) {
            // non-collection field

            // TODO: check for bidning info for optionalPrimitiveType=boxed or
            // noHasMethod=false and noDeletedMethod=false
            if(prop.isUnboxable())
                // this one uses a primitive type as much as possible
                return frf.getRequiredUnboxed();
            else
                // otherwise use the default non-collection field
                return frf.getSingle();
        }

        if( defaultCollectionFieldRenderer==null ) {
            return frf.getList(outline.parent().getCodeModel().ref(ArrayList.class));
        }

        // this field is a collection field.
        // use untyped list as the default. This is consistent
        // to the JAXB spec.
        return defaultCollectionFieldRenderer;
    }