FileDocCategorySizeDatePackage
ClassXml.javaAPI DocExample1468Wed May 29 22:10:50 BST 2002com.ronsoft.books.nio.appendix

ClassXml

public class ClassXml extends Object

Fields Summary
Constructors Summary
Methods Summary
private static java.lang.StringformatClass(java.lang.String classname, ClassInfo ci, java.lang.String desc)

		StringBuffer sb = new StringBuffer();

		sb.append ("<sect2><title>");
		sb.append ("<classname>");
		sb.append (classname);
		sb.append ("</classname></title>\n");

		sb.append ("<para>" + desc + "</para>");

		sb.append ("<para><emphasis>");

		if (ci.isInterface()) {
			sb.append ("Interface ");
		} else {
			sb.append ("Class ");
		}

		sb.append ("Definition</emphasis></para>");

		sb.append ("<blockquote><programlisting>");

		ci.stringify (sb, "    ", 0, true);

		sb.append ("</programlisting></blockquote>");

		sb.append ("<para><emphasis>See Also: </emphasis>");

		sb.append ("</sect2>");

		return (sb.toString());
	
public static java.lang.StringgetClassApi(java.lang.String pname, java.lang.String cname, java.lang.String protFlag)

		boolean prot = false;

		if ((protFlag != null) && (protFlag.equals ("true"))) {
			prot = true;
		}

		ClassInfo ci = new ClassInfo (pname + "." + cname, prot);

		return (ci.toString ("    ", false));
	
public static voidmain(java.lang.String[] argv)

		for (int i = 0; i < argv.length; i++) {
			ClassInfo ci = new ClassInfo (argv [i]);

			System.out.println (formatClass (argv [i], ci, "XXX"));
		}