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); } }
/** * @param coreList * A concrete class that implements the List interface. * An instance of this class will be used to store data * for this field. */ protected UntypedListField(ClassOutlineImpl context, CPropertyInfo prop, JClass coreList) { // the JAXB runtime picks ArrayList if the signature is List, // so don't do eager allocation if it's ArrayList. // otherwise we need to do eager allocation so that the collection type specified by the user // will be used. super(context, prop, !coreList.fullName().equals("java.util.ArrayList")); this.coreList = coreList.narrow(exposedType.boxify()); generate(); }
@Override public void generateAccessors() { final MethodWriter writer = outline.createMethodWriter(); final Accessor acc = create(JExpr._this()); writer.javadoc().append(prop.javadoc); JBlock block = $get.body(); fixNullRef(block); // avoid using an internal getter block._return(acc.ref(true)); "<p>\n" + "Objects of the following type(s) are allowed in the list\n") .append(listPossibleTypes(prop));
prop = field.getPropertyInfo(); this.field = fields.get(field.getPropertyInfo().getName(false));
@Override public void generateAccessors() { final MethodWriter writer = outline.createMethodWriter(); final Accessor acc = create(JExpr._this()); writer.javadoc().append(prop.javadoc); JBlock block = $get.body(); fixNullRef(block); // avoid using an internal getter block._return(acc.ref(true)); "<p>\n" + "Objects of the following type(s) are allowed in the list\n") .append(listPossibleTypes(prop));
@Override public void generateAccessors() { final MethodWriter writer = outline.createMethodWriter(); final Accessor acc = create(JExpr._this()); writer.javadoc().append(prop.javadoc); JBlock block = $get.body(); fixNullRef(block); // avoid using an internal getter block._return(acc.ref(true)); "<p>\n" + "Objects of the following type(s) are allowed in the list\n") .append(listPossibleTypes(prop));
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); } }
/** * @param coreList * A concrete class that implements the List interface. * An instance of this class will be used to store data * for this field. */ protected UntypedListField(ClassOutlineImpl context, CPropertyInfo prop, JClass coreList) { // the JAXB runtime picks ArrayList if the signature is List, // so don't do eager allocation if it's ArrayList. // otherwise we need to do eager allocation so that the collection type specified by the user // will be used. super(context, prop, !coreList.fullName().equals("java.util.ArrayList")); this.coreList = coreList.narrow(exposedType.boxify()); generate(); }
@Override public void generateAccessors() { final MethodWriter writer = outline.createMethodWriter(); final Accessor acc = create(JExpr._this()); writer.javadoc().append(prop.javadoc); JBlock block = $get.body(); fixNullRef(block); // avoid using an internal getter block._return(acc.ref(true)); "<p>\n" + "Objects of the following type(s) are allowed in the list\n") .append(listPossibleTypes(prop));
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); } }
/** * @param coreList * A concrete class that implements the List interface. * An instance of this class will be used to store data * for this field. */ protected UntypedListField(ClassOutlineImpl context, CPropertyInfo prop, JClass coreList) { // the JAXB runtime picks ArrayList if the signature is List, // so don't do eager allocation if it's ArrayList. // otherwise we need to do eager allocation so that the collection type specified by the user // will be used. super(context, prop, !coreList.fullName().equals("java.util.ArrayList")); this.coreList = coreList.narrow(exposedType.boxify()); generate(); }
@Override public void generateAccessors() { final MethodWriter writer = outline.createMethodWriter(); final Accessor acc = create(JExpr._this()); writer.javadoc().append(prop.javadoc); JBlock block = $get.body(); fixNullRef(block); // avoid using an internal getter block._return(acc.ref(true)); "<p>\n" + "Objects of the following type(s) are allowed in the list\n") .append(listPossibleTypes(prop));
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); } }
/** * @param coreList * A concrete class that implements the List interface. * An instance of this class will be used to store data * for this field. */ protected UntypedListField(ClassOutlineImpl context, CPropertyInfo prop, JClass coreList) { // the JAXB runtime picks ArrayList if the signature is List, // so don't do eager allocation if it's ArrayList. // otherwise we need to do eager allocation so that the collection type specified by the user // will be used. super(context, prop, !coreList.fullName().equals("java.util.ArrayList")); this.coreList = coreList.narrow(exposedType.boxify()); generate(); }
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); } }
/** * @param coreList * A concrete class that implements the List interface. * An instance of this class will be used to store data * for this field. */ protected UntypedListField(ClassOutlineImpl context, CPropertyInfo prop, JClass coreList) { // the JAXB runtime picks ArrayList if the signature is List, // so don't do eager allocation if it's ArrayList. // otherwise we need to do eager allocation so that the collection type specified by the user // will be used. super(context, prop, !coreList.fullName().equals("java.util.ArrayList")); this.coreList = coreList.narrow(exposedType.boxify()); generate(); }