1 18 19 20 package org.apache.tomcat.util.digester; 21 22 23 import org.xml.sax.Attributes ; 24 25 33 34 public class PathCallParamRule extends Rule { 35 36 38 44 public PathCallParamRule(int paramIndex) { 45 46 this.paramIndex = paramIndex; 47 48 } 49 50 52 55 protected int paramIndex = 0; 56 57 59 60 71 public void begin(String namespace, String name, Attributes attributes) throws Exception { 72 73 String param = getDigester().getMatch(); 74 75 if(param != null) { 76 Object parameters[] = (Object []) digester.peekParams(); 77 parameters[paramIndex] = param; 78 } 79 80 } 81 82 85 public String toString() { 86 87 StringBuffer sb = new StringBuffer ("PathCallParamRule["); 88 sb.append("paramIndex="); 89 sb.append(paramIndex); 90 sb.append("]"); 91 return (sb.toString()); 92 93 } 94 } 95 | Popular Tags |