1 14 15 package org.quickserver.util.xmlreader; 16 17 import java.util.*; 18 19 35 public class ServerHooks extends ArrayList { 36 37 40 public void addClassName(String className) { 41 if(className!=null && className.trim().length()!=0) { 42 add(className.trim()); 43 } 44 } 45 46 49 public String toXML(String pad) { 50 if(pad==null) pad=""; 51 StringBuffer sb = new StringBuffer (); 52 sb.append(pad+"<server-hooks>\n"); 53 Iterator iterator = iterator(); 54 while(iterator.hasNext()) { 55 String classname = (String ) iterator.next(); 56 sb.append(pad+"\t<class-name>"+classname+"</class-name>\n"); 57 } 58 sb.append(pad+"</server-hooks>\n"); 59 return sb.toString(); 60 } 61 } 62 | Popular Tags |