Java Code Examples for com.sun.tools.internal.xjc.generator.bean.field.FieldRendererFactory#getArray()

The following examples show how to use com.sun.tools.internal.xjc.generator.bean.field.FieldRendererFactory#getArray() . 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: BIAttribute.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Gets the realization of this particle, if any.
 *
 * @return
 *      null if the "collection" attribute was not specified.
 */
public final FieldRenderer getRealization() {
    Attr a = element.getAttributeNode("collection");
    if(a==null)     return null;

    String v = element.getAttribute("collection").trim();

    FieldRendererFactory frf = parent.parent.model.options.getFieldRendererFactory();
    if(v.equals("array"))   return frf.getArray();
    if(v.equals("list"))
        return frf.getList(
            parent.parent.codeModel.ref(ArrayList.class));

    // the correctness of the attribute value must be
    // checked by the validator.
    throw new InternalError("unexpected collection value: "+v);
}
 
Example 2
Source File: BIAttribute.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Gets the realization of this particle, if any.
 *
 * @return
 *      null if the "collection" attribute was not specified.
 */
public final FieldRenderer getRealization() {
    Attr a = element.getAttributeNode("collection");
    if(a==null)     return null;

    String v = element.getAttribute("collection").trim();

    FieldRendererFactory frf = parent.parent.model.options.getFieldRendererFactory();
    if(v.equals("array"))   return frf.getArray();
    if(v.equals("list"))
        return frf.getList(
            parent.parent.codeModel.ref(ArrayList.class));

    // the correctness of the attribute value must be
    // checked by the validator.
    throw new InternalError("unexpected collection value: "+v);
}
 
Example 3
Source File: BIAttribute.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Gets the realization of this particle, if any.
 *
 * @return
 *      null if the "collection" attribute was not specified.
 */
public final FieldRenderer getRealization() {
    Attr a = element.getAttributeNode("collection");
    if(a==null)     return null;

    String v = element.getAttribute("collection").trim();

    FieldRendererFactory frf = parent.parent.model.options.getFieldRendererFactory();
    if(v.equals("array"))   return frf.getArray();
    if(v.equals("list"))
        return frf.getList(
            parent.parent.codeModel.ref(ArrayList.class));

    // the correctness of the attribute value must be
    // checked by the validator.
    throw new InternalError("unexpected collection value: "+v);
}
 
Example 4
Source File: BIAttribute.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Gets the realization of this particle, if any.
 *
 * @return
 *      null if the "collection" attribute was not specified.
 */
public final FieldRenderer getRealization() {
    Attr a = element.getAttributeNode("collection");
    if(a==null)     return null;

    String v = element.getAttribute("collection").trim();

    FieldRendererFactory frf = parent.parent.model.options.getFieldRendererFactory();
    if(v.equals("array"))   return frf.getArray();
    if(v.equals("list"))
        return frf.getList(
            parent.parent.codeModel.ref(ArrayList.class));

    // the correctness of the attribute value must be
    // checked by the validator.
    throw new InternalError("unexpected collection value: "+v);
}
 
Example 5
Source File: BIAttribute.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Gets the realization of this particle, if any.
 *
 * @return
 *      null if the "collection" attribute was not specified.
 */
public final FieldRenderer getRealization() {
    Attr a = element.getAttributeNode("collection");
    if(a==null)     return null;

    String v = element.getAttribute("collection").trim();

    FieldRendererFactory frf = parent.parent.model.options.getFieldRendererFactory();
    if(v.equals("array"))   return frf.getArray();
    if(v.equals("list"))
        return frf.getList(
            parent.parent.codeModel.ref(ArrayList.class));

    // the correctness of the attribute value must be
    // checked by the validator.
    throw new InternalError("unexpected collection value: "+v);
}
 
Example 6
Source File: BIAttribute.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Gets the realization of this particle, if any.
 *
 * @return
 *      null if the "collection" attribute was not specified.
 */
public final FieldRenderer getRealization() {
    Attr a = element.getAttributeNode("collection");
    if(a==null)     return null;

    String v = element.getAttribute("collection").trim();

    FieldRendererFactory frf = parent.parent.model.options.getFieldRendererFactory();
    if(v.equals("array"))   return frf.getArray();
    if(v.equals("list"))
        return frf.getList(
            parent.parent.codeModel.ref(ArrayList.class));

    // the correctness of the attribute value must be
    // checked by the validator.
    throw new InternalError("unexpected collection value: "+v);
}
 
Example 7
Source File: BIAttribute.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Gets the realization of this particle, if any.
 *
 * @return
 *      null if the "collection" attribute was not specified.
 */
public final FieldRenderer getRealization() {
    Attr a = element.getAttributeNode("collection");
    if(a==null)     return null;

    String v = element.getAttribute("collection").trim();

    FieldRendererFactory frf = parent.parent.model.options.getFieldRendererFactory();
    if(v.equals("array"))   return frf.getArray();
    if(v.equals("list"))
        return frf.getList(
            parent.parent.codeModel.ref(ArrayList.class));

    // the correctness of the attribute value must be
    // checked by the validator.
    throw new InternalError("unexpected collection value: "+v);
}
 
Example 8
Source File: BIAttribute.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Gets the realization of this particle, if any.
 *
 * @return
 *      null if the "collection" attribute was not specified.
 */
public final FieldRenderer getRealization() {
    Attr a = element.getAttributeNode("collection");
    if(a==null)     return null;

    String v = element.getAttribute("collection").trim();

    FieldRendererFactory frf = parent.parent.model.options.getFieldRendererFactory();
    if(v.equals("array"))   return frf.getArray();
    if(v.equals("list"))
        return frf.getList(
            parent.parent.codeModel.ref(ArrayList.class));

    // the correctness of the attribute value must be
    // checked by the validator.
    throw new InternalError("unexpected collection value: "+v);
}
 
Example 9
Source File: CollectionTypeAttribute.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
private FieldRenderer calcFr(Model m) {
    FieldRendererFactory frf = m.options.getFieldRendererFactory();
    if (collectionType==null)
        return frf.getDefault();

    if (collectionType.equals("indexed"))
        return frf.getArray();

    return frf.getList(m.codeModel.ref(collectionType));
}
 
Example 10
Source File: CollectionTypeAttribute.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
private FieldRenderer calcFr(Model m) {
    FieldRendererFactory frf = m.options.getFieldRendererFactory();
    if (collectionType==null)
        return frf.getDefault();

    if (collectionType.equals("indexed"))
        return frf.getArray();

    return frf.getList(m.codeModel.ref(collectionType));
}
 
Example 11
Source File: CollectionTypeAttribute.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private FieldRenderer calcFr(Model m) {
    FieldRendererFactory frf = m.options.getFieldRendererFactory();
    if (collectionType==null)
        return frf.getDefault();

    if (collectionType.equals("indexed"))
        return frf.getArray();

    return frf.getList(m.codeModel.ref(collectionType));
}
 
Example 12
Source File: CollectionTypeAttribute.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private FieldRenderer calcFr(Model m) {
    FieldRendererFactory frf = m.options.getFieldRendererFactory();
    if (collectionType==null)
        return frf.getDefault();

    if (collectionType.equals("indexed"))
        return frf.getArray();

    return frf.getList(m.codeModel.ref(collectionType));
}
 
Example 13
Source File: CollectionTypeAttribute.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private FieldRenderer calcFr(Model m) {
    FieldRendererFactory frf = m.options.getFieldRendererFactory();
    if (collectionType==null)
        return frf.getDefault();

    if (collectionType.equals("indexed"))
        return frf.getArray();

    return frf.getList(m.codeModel.ref(collectionType));
}
 
Example 14
Source File: CollectionTypeAttribute.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
private FieldRenderer calcFr(Model m) {
    FieldRendererFactory frf = m.options.getFieldRendererFactory();
    if (collectionType==null)
        return frf.getDefault();

    if (collectionType.equals("indexed"))
        return frf.getArray();

    return frf.getList(m.codeModel.ref(collectionType));
}
 
Example 15
Source File: CollectionTypeAttribute.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
private FieldRenderer calcFr(Model m) {
    FieldRendererFactory frf = m.options.getFieldRendererFactory();
    if (collectionType==null)
        return frf.getDefault();

    if (collectionType.equals("indexed"))
        return frf.getArray();

    return frf.getList(m.codeModel.ref(collectionType));
}
 
Example 16
Source File: CollectionTypeAttribute.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
private FieldRenderer calcFr(Model m) {
    FieldRendererFactory frf = m.options.getFieldRendererFactory();
    if (collectionType==null)
        return frf.getDefault();

    if (collectionType.equals("indexed"))
        return frf.getArray();

    return frf.getList(m.codeModel.ref(collectionType));
}