com.sun.tools.internal.xjc.outline.FieldOutline Java Examples

The following examples show how to use com.sun.tools.internal.xjc.outline.FieldOutline. 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: IsSetField.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
protected IsSetField( ClassOutlineImpl outline, CPropertyInfo prop,
        FieldOutline core, boolean unsetMethod, boolean issetMethod ) {
    super(outline,prop);
    this.core = core;
    this.generateIsSetMethod = issetMethod;
    this.generateUnSetMethod = unsetMethod;

    generate(outline,prop);
}
 
Example #2
Source File: SignatureWriter.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
private void dump( ClassOutline ci ) throws IOException {
    JDefinedClass cls = ci.implClass;

    StringBuilder buf = new StringBuilder();
    buf.append("interface ");
    buf.append(cls.name());

    boolean first=true;
    Iterator itr = cls._implements();
    while(itr.hasNext()) {
        if(first) {
            buf.append(" extends ");
            first=false;
        } else {
            buf.append(", ");
        }
        buf.append( printName((JClass)itr.next()) );
    }
    buf.append(" {");
    println(buf.toString());
    indent++;

    // dump the field
    for( FieldOutline fo : ci.getDeclaredFields() ) {
        String type = printName(fo.getRawType());
        println(type+' '+fo.getPropertyInfo().getName(true)+';');
    }

    dumpChildren(cls);

    indent--;
    println("}");
}
 
Example #3
Source File: BeanGenerator.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Determines the FieldRenderer used for the given FieldUse,
 * then generates the field declaration and accessor methods.
 *
 * The <code>fields</code> map will be updated with the newly
 * created FieldRenderer.
 */
private FieldOutline generateFieldDecl(ClassOutlineImpl cc, CPropertyInfo prop) {
    FieldRenderer fr = prop.realization;
    if (fr == null) // none is specified. use the default factory
    {
        fr = model.options.getFieldRendererFactory().getDefault();
    }

    FieldOutline field = fr.generate(cc, prop);
    fields.put(prop, field);

    return field;
}
 
Example #4
Source File: UntypedListFieldRenderer.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public FieldOutline generate(ClassOutlineImpl context, CPropertyInfo prop) {
    if (dummy) {
        return new DummyListField(context, prop, coreList);
    }
    if (content) {
        return new ContentListField(context, prop, coreList);
    }
    return new UntypedListField(context, prop, coreList);
}
 
Example #5
Source File: SignatureWriter.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
private void dump( ClassOutline ci ) throws IOException {
    JDefinedClass cls = ci.implClass;

    StringBuilder buf = new StringBuilder();
    buf.append("interface ");
    buf.append(cls.name());

    boolean first=true;
    Iterator itr = cls._implements();
    while(itr.hasNext()) {
        if(first) {
            buf.append(" extends ");
            first=false;
        } else {
            buf.append(", ");
        }
        buf.append( printName((JClass)itr.next()) );
    }
    buf.append(" {");
    println(buf.toString());
    indent++;

    // dump the field
    for( FieldOutline fo : ci.getDeclaredFields() ) {
        String type = printName(fo.getRawType());
        println(type+' '+fo.getPropertyInfo().getName(true)+';');
    }

    dumpChildren(cls);

    indent--;
    println("}");
}
 
Example #6
Source File: SignatureWriter.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private void dump( ClassOutline ci ) throws IOException {
    JDefinedClass cls = ci.implClass;

    StringBuilder buf = new StringBuilder();
    buf.append("interface ");
    buf.append(cls.name());

    boolean first=true;
    Iterator itr = cls._implements();
    while(itr.hasNext()) {
        if(first) {
            buf.append(" extends ");
            first=false;
        } else {
            buf.append(", ");
        }
        buf.append( printName((JClass)itr.next()) );
    }
    buf.append(" {");
    println(buf.toString());
    indent++;

    // dump the field
    for( FieldOutline fo : ci.getDeclaredFields() ) {
        String type = printName(fo.getRawType());
        println(type+' '+fo.getPropertyInfo().getName(true)+';');
    }

    dumpChildren(cls);

    indent--;
    println("}");
}
 
Example #7
Source File: IsSetField.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
protected IsSetField( ClassOutlineImpl outline, CPropertyInfo prop,
        FieldOutline core, boolean unsetMethod, boolean issetMethod ) {
    super(outline,prop);
    this.core = core;
    this.generateIsSetMethod = issetMethod;
    this.generateUnSetMethod = unsetMethod;

    generate(outline,prop);
}
 
Example #8
Source File: IsSetField.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
protected IsSetField( ClassOutlineImpl outline, CPropertyInfo prop,
        FieldOutline core, boolean unsetMethod, boolean issetMethod ) {
    super(outline,prop);
    this.core = core;
    this.generateIsSetMethod = issetMethod;
    this.generateUnSetMethod = unsetMethod;

    generate(outline,prop);
}
 
Example #9
Source File: IsSetField.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
protected IsSetField( ClassOutlineImpl outline, CPropertyInfo prop,
        FieldOutline core, boolean unsetMethod, boolean issetMethod ) {
    super(outline,prop);
    this.core = core;
    this.generateIsSetMethod = issetMethod;
    this.generateUnSetMethod = unsetMethod;

    generate(outline,prop);
}
 
Example #10
Source File: BeanGenerator.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Determines the FieldRenderer used for the given FieldUse,
 * then generates the field declaration and accessor methods.
 *
 * The <code>fields</code> map will be updated with the newly
 * created FieldRenderer.
 */
private FieldOutline generateFieldDecl(ClassOutlineImpl cc, CPropertyInfo prop) {
    FieldRenderer fr = prop.realization;
    if (fr == null) // none is specified. use the default factory
    {
        fr = model.options.getFieldRendererFactory().getDefault();
    }

    FieldOutline field = fr.generate(cc, prop);
    fields.put(prop, field);

    return field;
}
 
Example #11
Source File: UntypedListFieldRenderer.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public FieldOutline generate(ClassOutlineImpl context, CPropertyInfo prop) {
    if (dummy) {
        return new DummyListField(context, prop, coreList);
    }
    if (content) {
        return new ContentListField(context, prop, coreList);
    }
    return new UntypedListField(context, prop, coreList);
}
 
Example #12
Source File: BeanGenerator.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Determines the FieldRenderer used for the given FieldUse,
 * then generates the field declaration and accessor methods.
 *
 * The <code>fields</code> map will be updated with the newly
 * created FieldRenderer.
 */
private FieldOutline generateFieldDecl(ClassOutlineImpl cc, CPropertyInfo prop) {
    FieldRenderer fr = prop.realization;
    if (fr == null) // none is specified. use the default factory
    {
        fr = model.options.getFieldRendererFactory().getDefault();
    }

    FieldOutline field = fr.generate(cc, prop);
    fields.put(prop, field);

    return field;
}
 
Example #13
Source File: SignatureWriter.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
private void dump( ClassOutline ci ) throws IOException {
    JDefinedClass cls = ci.implClass;

    StringBuilder buf = new StringBuilder();
    buf.append("interface ");
    buf.append(cls.name());

    boolean first=true;
    Iterator itr = cls._implements();
    while(itr.hasNext()) {
        if(first) {
            buf.append(" extends ");
            first=false;
        } else {
            buf.append(", ");
        }
        buf.append( printName((JClass)itr.next()) );
    }
    buf.append(" {");
    println(buf.toString());
    indent++;

    // dump the field
    for( FieldOutline fo : ci.getDeclaredFields() ) {
        String type = printName(fo.getRawType());
        println(type+' '+fo.getPropertyInfo().getName(true)+';');
    }

    dumpChildren(cls);

    indent--;
    println("}");
}
 
Example #14
Source File: BeanGenerator.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Determines the FieldRenderer used for the given FieldUse,
 * then generates the field declaration and accessor methods.
 *
 * The <code>fields</code> map will be updated with the newly
 * created FieldRenderer.
 */
private FieldOutline generateFieldDecl(ClassOutlineImpl cc, CPropertyInfo prop) {
    FieldRenderer fr = prop.realization;
    if (fr == null) // none is specified. use the default factory
    {
        fr = model.options.getFieldRendererFactory().getDefault();
    }

    FieldOutline field = fr.generate(cc, prop);
    fields.put(prop, field);

    return field;
}
 
Example #15
Source File: SignatureWriter.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
private void dump( ClassOutline ci ) throws IOException {
    JDefinedClass cls = ci.implClass;

    StringBuilder buf = new StringBuilder();
    buf.append("interface ");
    buf.append(cls.name());

    boolean first=true;
    Iterator itr = cls._implements();
    while(itr.hasNext()) {
        if(first) {
            buf.append(" extends ");
            first=false;
        } else {
            buf.append(", ");
        }
        buf.append( printName((JClass)itr.next()) );
    }
    buf.append(" {");
    println(buf.toString());
    indent++;

    // dump the field
    for( FieldOutline fo : ci.getDeclaredFields() ) {
        String type = printName(fo.getRawType());
        println(type+' '+fo.getPropertyInfo().getName(true)+';');
    }

    dumpChildren(cls);

    indent--;
    println("}");
}
 
Example #16
Source File: UntypedListFieldRenderer.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public FieldOutline generate(ClassOutlineImpl context, CPropertyInfo prop) {
    if (dummy) {
        return new DummyListField(context, prop, coreList);
    }
    if (content) {
        return new ContentListField(context, prop, coreList);
    }
    return new UntypedListField(context, prop, coreList);
}
 
Example #17
Source File: BeanGenerator.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Determines the FieldRenderer used for the given FieldUse,
 * then generates the field declaration and accessor methods.
 *
 * The <code>fields</code> map will be updated with the newly
 * created FieldRenderer.
 */
private FieldOutline generateFieldDecl(ClassOutlineImpl cc, CPropertyInfo prop) {
    FieldRenderer fr = prop.realization;
    if (fr == null) // none is specified. use the default factory
    {
        fr = model.options.getFieldRendererFactory().getDefault();
    }

    FieldOutline field = fr.generate(cc, prop);
    fields.put(prop, field);

    return field;
}
 
Example #18
Source File: IsSetField.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
protected IsSetField( ClassOutlineImpl outline, CPropertyInfo prop,
        FieldOutline core, boolean unsetMethod, boolean issetMethod ) {
    super(outline,prop);
    this.core = core;
    this.generateIsSetMethod = issetMethod;
    this.generateUnSetMethod = unsetMethod;

    generate(outline,prop);
}
 
Example #19
Source File: IsSetField.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
protected IsSetField( ClassOutlineImpl outline, CPropertyInfo prop,
        FieldOutline core, boolean unsetMethod, boolean issetMethod ) {
    super(outline,prop);
    this.core = core;
    this.generateIsSetMethod = issetMethod;
    this.generateUnSetMethod = unsetMethod;

    generate(outline,prop);
}
 
Example #20
Source File: UntypedListFieldRenderer.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public FieldOutline generate(ClassOutlineImpl context, CPropertyInfo prop) {
    if (dummy) {
        return new DummyListField(context, prop, coreList);
    }
    if (content) {
        return new ContentListField(context, prop, coreList);
    }
    return new UntypedListField(context, prop, coreList);
}
 
Example #21
Source File: UntypedListFieldRenderer.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public FieldOutline generate(ClassOutlineImpl context, CPropertyInfo prop) {
    if (dummy) {
        return new DummyListField(context, prop, coreList);
    }
    if (content) {
        return new ContentListField(context, prop, coreList);
    }
    return new UntypedListField(context, prop, coreList);
}
 
Example #22
Source File: SignatureWriter.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
private void dump( ClassOutline ci ) throws IOException {
    JDefinedClass cls = ci.implClass;

    StringBuilder buf = new StringBuilder();
    buf.append("interface ");
    buf.append(cls.name());

    boolean first=true;
    Iterator itr = cls._implements();
    while(itr.hasNext()) {
        if(first) {
            buf.append(" extends ");
            first=false;
        } else {
            buf.append(", ");
        }
        buf.append( printName((JClass)itr.next()) );
    }
    buf.append(" {");
    println(buf.toString());
    indent++;

    // dump the field
    for( FieldOutline fo : ci.getDeclaredFields() ) {
        String type = printName(fo.getRawType());
        println(type+' '+fo.getPropertyInfo().getName(true)+';');
    }

    dumpChildren(cls);

    indent--;
    println("}");
}
 
Example #23
Source File: BeanGenerator.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Determines the FieldRenderer used for the given FieldUse,
 * then generates the field declaration and accessor methods.
 *
 * The <code>fields</code> map will be updated with the newly
 * created FieldRenderer.
 */
private FieldOutline generateFieldDecl(ClassOutlineImpl cc, CPropertyInfo prop) {
    FieldRenderer fr = prop.realization;
    if (fr == null) // none is specified. use the default factory
    {
        fr = model.options.getFieldRendererFactory().getDefault();
    }

    FieldOutline field = fr.generate(cc, prop);
    fields.put(prop, field);

    return field;
}
 
Example #24
Source File: SignatureWriter.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private void dump( ClassOutline ci ) throws IOException {
    JDefinedClass cls = ci.implClass;

    StringBuilder buf = new StringBuilder();
    buf.append("interface ");
    buf.append(cls.name());

    boolean first=true;
    Iterator itr = cls._implements();
    while(itr.hasNext()) {
        if(first) {
            buf.append(" extends ");
            first=false;
        } else {
            buf.append(", ");
        }
        buf.append( printName((JClass)itr.next()) );
    }
    buf.append(" {");
    println(buf.toString());
    indent++;

    // dump the field
    for( FieldOutline fo : ci.getDeclaredFields() ) {
        String type = printName(fo.getRawType());
        println(type+' '+fo.getPropertyInfo().getName(true)+';');
    }

    dumpChildren(cls);

    indent--;
    println("}");
}
 
Example #25
Source File: IsSetField.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
protected IsSetField( ClassOutlineImpl outline, CPropertyInfo prop,
        FieldOutline core, boolean unsetMethod, boolean issetMethod ) {
    super(outline,prop);
    this.core = core;
    this.generateIsSetMethod = issetMethod;
    this.generateUnSetMethod = unsetMethod;

    generate(outline,prop);
}
 
Example #26
Source File: BeanGenerator.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Determines the FieldRenderer used for the given FieldUse,
 * then generates the field declaration and accessor methods.
 *
 * The <code>fields</code> map will be updated with the newly
 * created FieldRenderer.
 */
private FieldOutline generateFieldDecl(ClassOutlineImpl cc, CPropertyInfo prop) {
    FieldRenderer fr = prop.realization;
    if (fr == null) // none is specified. use the default factory
    {
        fr = model.options.getFieldRendererFactory().getDefault();
    }

    FieldOutline field = fr.generate(cc, prop);
    fields.put(prop, field);

    return field;
}
 
Example #27
Source File: UntypedListFieldRenderer.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public FieldOutline generate(ClassOutlineImpl context, CPropertyInfo prop) {
    if (dummy) {
        return new DummyListField(context, prop, coreList);
    }
    if (content) {
        return new ContentListField(context, prop, coreList);
    }
    return new UntypedListField(context, prop, coreList);
}
 
Example #28
Source File: BeanGenerator.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public FieldOutline getField(CPropertyInfo prop) {
    return fields.get(prop);
}
 
Example #29
Source File: ElementAdapter.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public FieldOutline owner() {
    return ElementAdapter.this;
}
 
Example #30
Source File: ConstFieldRenderer.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
public FieldOutline generate(ClassOutlineImpl outline, CPropertyInfo prop) {
    if(prop.defaultValue.compute(outline.parent())==null)
        return fallback.generate(outline, prop);
    else
        return new ConstField(outline,prop);
}