FileDocCategorySizeDatePackage
SerialMethodSubWriter.javaAPI DocExample2985Wed Apr 19 11:17:12 BST 2000com.sun.tools.doclets.standard

SerialMethodSubWriter

public class SerialMethodSubWriter extends MethodSubWriter
Generate serialized form for Serializable/Externalizable methods. Documentation denoted by the serialData tag is processed.
author
Joe Fialli

Fields Summary
Constructors Summary
public SerialMethodSubWriter(SubWriterHolderWriter writer, ClassDoc classdoc)

        super(writer, classdoc);
    
Methods Summary
public voidbuildVisibleMemberMap()

      // Do nothing.
    
public java.util.Listmembers(com.sun.javadoc.ClassDoc cd)

	return Util.asList(cd.serializationMethods());
    
protected voidprintHeader(com.sun.javadoc.ClassDoc cd)

        writer.anchor("serialized_methods");
        writer.printTableHeadingBackground(writer.getText("doclet.Serialized_Form_methods"));

	// Specify if Class is Serializable or Externalizable.

        writer.p();

	if (cd.isSerializable() && !cd.isExternalizable()) {
            if (members(cd).size() == 0) {
		String msg =
		    writer.getText("doclet.Serializable_no_customization");
		writer.print(msg);
		writer.p();
	    }
	}
    
protected voidprintMember(com.sun.javadoc.ClassDoc cd, com.sun.javadoc.ProgramElementDoc member)

        ExecutableMemberDoc emd = (ExecutableMemberDoc)member;
        String name = emd.name();
        printHead(emd);
        printFullComment(emd);
    
public voidprintMembers()
Print header even if there are no serializable methods.

        if (members(classdoc).size() > 0) {
	    super.printMembers();
        }
    
protected voidprintSerialDataTag(com.sun.javadoc.Tag[] serialData)

        if (serialData != null && serialData.length > 0) {
            writer.dt();
            writer.boldText("doclet.SerialData");
            writer.dd();
	    for (int i = 0; i < serialData.length; i++)
		writer.printInlineComment(serialData[i]);
        }
    
protected voidprintTags(com.sun.javadoc.ProgramElementDoc member)
Print comments, See tags and serialData for SerialMethods.

        MethodDoc method = (MethodDoc)member;
	Tag[] serialData = method.tags("serialData");
	Tag[] sinces = method.tags("since");
        SeeTag[] sees = method.seeTags();
        if (serialData.length + sees.length + sinces.length > 0) {
            writer.dd();
            writer.dl();
	    printSerialDataTag(serialData);
            writer.printSinceTag(method);
            writer.printSeeTags(method);
            writer.dlEnd();
            writer.ddEnd();
	} else {
	    if (method.name().compareTo("writeExternal") == 0) {
		serialWarning("doclet.MissingSerialDataTag",
			    method.containingClass().qualifiedName(),
			    method.name());
	    }
	}