/** * 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; }
/** * 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; }
/** * 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; }
/** * 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; }
/** * 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; }
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)); } }
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)); } }
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)); } }
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)); } }
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)); } }
public static FieldOutline createAttributeField( ClassOutlineImpl classOutline, String name, final QName attName, final CTypeInfo typeInfo, final boolean required // , // final XSDatatype datatype, // final JType type ) { final CPropertyInfo propertyInfo = new CAttributePropertyInfo(name, null, new CCustomizations(), null, attName, typeInfo, required); propertyInfo.realization = new FieldRendererFactory().getDefault(); final FieldOutline fieldOutline = propertyInfo.realization.generate(classOutline, propertyInfo); return fieldOutline; } //
public static FieldOutline createAttributeField( ClassOutlineImpl classOutline, String name, final QName attName, final CNonElement typeInfo, final boolean required // , // final XSDatatype datatype, // final JType type ) { final CPropertyInfo propertyInfo = new CAttributePropertyInfo( // name name, // source null, new CCustomizations(), // locator null, // attName attName, // typeUse typeInfo, // typeName typeInfo.getTypeName(), // required required); propertyInfo.realization = new FieldRendererFactory().getDefault(); final FieldOutline fieldOutline = propertyInfo.realization.generate(classOutline, propertyInfo); return fieldOutline; }
public static FieldOutline createAttributeField( ClassOutlineImpl classOutline, String name, final QName attName, final CNonElement typeInfo, final boolean required // , // final XSDatatype datatype, // final JType type ) { final CPropertyInfo propertyInfo = new CAttributePropertyInfo( // name name, // source null, new CCustomizations(), // locator null, // attName attName, // typeUse typeInfo, // typeName typeInfo.getTypeName(), // required required); propertyInfo.realization = new FieldRendererFactory().getDefault(); final FieldOutline fieldOutline = propertyInfo.realization.generate(classOutline, propertyInfo); return fieldOutline; }
public static FieldOutline createAttributeField( ClassOutlineImpl classOutline, String name, final QName attName, final CNonElement typeInfo, final boolean required // , // final XSDatatype datatype, // final JType type ) { final CPropertyInfo propertyInfo = new CAttributePropertyInfo( // name name, // source null, new CCustomizations(), // locator null, // attName attName, // typeUse typeInfo, // typeName typeInfo.getTypeName(), // required required); propertyInfo.realization = new FieldRendererFactory().getDefault(); final FieldOutline fieldOutline = propertyInfo.realization.generate(classOutline, propertyInfo); return fieldOutline; }
case WRAPPER: r = prop.isOptionalPrimitive() ? frf.getSingle() : frf.getDefault(); break; case ISSET: r = prop.isOptionalPrimitive() ? frf.getSinglePrimitiveAccess() : frf.getDefault(); break; default:
case WRAPPER: r = prop.isOptionalPrimitive() ? frf.getSingle() : frf.getDefault(); break; case ISSET: r = prop.isOptionalPrimitive() ? frf.getSinglePrimitiveAccess() : frf.getDefault(); break; default:
case WRAPPER: r = prop.isOptionalPrimitive() ? frf.getSingle() : frf.getDefault(); break; case ISSET: r = prop.isOptionalPrimitive() ? frf.getSinglePrimitiveAccess() : frf.getDefault(); break; default:
r = frf.getDefault();