1 23 24 29 30 package com.sun.enterprise.tools.common.dd.ejb; 31 32 import org.w3c.dom.*; 33 import org.netbeans.modules.schema2beans.*; 34 import java.beans.*; 35 import java.util.*; 36 37 39 public class MethodParams extends com.sun.enterprise.tools.common.dd.SunBaseBean 40 { 41 42 static Vector comparators = new Vector(); 43 44 static public final String METHOD_PARAM = "MethodParam"; 46 public MethodParams() { 47 this(Common.USE_DEFAULT_VALUES); 48 } 49 50 public MethodParams(int options) 51 { 52 super(comparators, new org.netbeans.modules.schema2beans.Version(1, 2, 0)); 53 this.createProperty("method-param", METHOD_PARAM, 56 Common.TYPE_0_N | Common.TYPE_STRING | Common.TYPE_KEY, 57 String .class); 58 this.initialize(options); 59 } 60 61 void initialize(int options) 63 { 64 65 } 66 67 public void setMethodParam(int index, String value) { 69 this.setValue(METHOD_PARAM, index, value); 70 } 71 72 public String getMethodParam(int index) { 74 return (String )this.getValue(METHOD_PARAM, index); 75 } 76 77 public void setMethodParam(String [] value) { 79 this.setValue(METHOD_PARAM, value); 80 } 81 82 public String [] getMethodParam() { 84 return (String [])this.getValues(METHOD_PARAM); 85 } 86 87 public int sizeMethodParam() { 89 return this.size(METHOD_PARAM); 90 } 91 92 public int addMethodParam(String value) { 94 return this.addValue(METHOD_PARAM, value); 95 } 96 97 public int removeMethodParam(String value) { 102 return this.removeValue(METHOD_PARAM, value); 103 } 104 105 public static void addComparator(org.netbeans.modules.schema2beans.BeanComparator c) { 107 comparators.add(c); 108 } 109 110 public static void removeComparator(org.netbeans.modules.schema2beans.BeanComparator c) { 112 comparators.remove(c); 113 } 114 public void validate() throws org.netbeans.modules.schema2beans.ValidateException { 115 boolean restrictionFailure = false; 116 for (int _index = 0; _index < sizeMethodParam(); ++_index) { 118 String element = getMethodParam(_index); 119 if (element != null) { 120 } 121 } 122 } 123 124 public void dump(StringBuffer str, String indent){ 126 String s; 127 Object o; 128 org.netbeans.modules.schema2beans.BaseBean n; 129 str.append(indent); 130 str.append("MethodParam["+this.sizeMethodParam()+"]"); for(int i=0; i<this.sizeMethodParam(); i++) 132 { 133 str.append(indent+"\t"); 134 str.append("#"+i+":"); 135 str.append(indent+"\t"); str.append("<"); s = this.getMethodParam(i); 138 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(METHOD_PARAM, i, str, indent); 141 } 142 143 } 144 public String dumpBeanNode(){ 145 StringBuffer str = new StringBuffer (); 146 str.append("MethodParams\n"); this.dump(str, "\n "); return str.toString(); 149 }} 150 151 153 154 998 | Popular Tags |