/** * Build the field sub header. * * @param node the XML element that specifies which components to document * @param fieldsContentTree content tree to which the documentation will be added */ public void buildFieldSubHeader(XMLNode node, Content fieldsContentTree) { if (!currentClass.definesSerializableFields()) { FieldDoc field = (FieldDoc) currentMember; fieldWriter.addMemberHeader( field.type().asClassDoc(), field.type().typeName(), field.type().dimension(), field.name(), fieldsContentTree); } }
/** * Build the serial field tags information. * * @param serializableFieldsTree content tree to which the documentation will be added */ public void buildSerialFieldTagsInfo(Content serializableFieldsTree) { if (configuration.nocomment) { return; } FieldDoc field = (FieldDoc) currentMember; // Process Serializable Fields specified as array of // ObjectStreamFields. Print a member for each serialField tag. // (There should be one serialField tag per ObjectStreamField // element.) SerialFieldTag[] tags = field.serialFieldTags(); Arrays.sort(tags); int tagsLength = tags.length; for (int i = 0; i < tagsLength; i++) { if (tags[i].fieldName() == null || tags[i].fieldType() == null) // ignore malformed @serialField tags continue; Content fieldsContentTree = fieldWriter.getFieldsContentHeader((i == tagsLength - 1)); fieldWriter.addMemberHeader( tags[i].fieldTypeDoc(), tags[i].fieldType(), "", tags[i].fieldName(), fieldsContentTree); fieldWriter.addMemberDescription(tags[i], fieldsContentTree); serializableFieldsTree.addContent(fieldsContentTree); } }