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); } }
/** * 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); } } }
/** * @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 DummyListField(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(); }
/** * @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 DummyListField(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); } }
/** * 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); } } }
/** * @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 DummyListField(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); } }
/** * 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); } } }
/** * @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 DummyListField(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); } }
/** * 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); } } }
/** * @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 DummyListField(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); } }
/** * 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); } } }