boolean fieldAccess = !usePropertyBasedAccess();
String custom = getDeclaration(fmd);
if (decs.length() > 0)
decs.endl();
ParameterTemplate templ;
if (custom != null) {
templ = new ParameterTemplate();
templ.append(custom);
templ.setParameter("fieldName", fieldName);
templ.setParameter("capFieldName", capFieldName);
templ.setParameter("propertyName", propertyName);
templ.setParameter("fieldType", fieldType);
templ.setParameter("keyType", keyType);
templ.setParameter("elementType", elementType);
templ.setParameter("fieldValue", fieldValue);
decs.append(templ.toString());
} else {
if (fieldAccess)
writeAnnotations(decs, getFieldAnnotations(fmd), 1);
decs.tab().append("private ").append(fieldType).
append(paramType).append(" ").append(fieldName).
append(fieldValue).append(";");
if (fieldAccess)
decs.endl();
}
custom = getFieldCode(fmd);
if (code.length() > 0)
code.afterSection();
if (custom != null) {
templ = new ParameterTemplate();
templ.append(custom);
templ.setParameter("fieldName", fieldName);
templ.setParameter("capFieldName", capFieldName);
templ.setParameter("propertyName", propertyName);
templ.setParameter("fieldType", fieldType);
templ.setParameter("keyType", keyType);
templ.setParameter("elementType", elementType);
templ.setParameter("fieldValue", fieldValue);
code.append(templ.toString());
} else {
// getter
if (!fieldAccess)
writeAnnotations(code, getFieldAnnotations(fmd), 1);
code.tab().append("public ").append(fieldType).append(paramType).