1 28 29 package com.caucho.jsp.java; 30 31 import com.caucho.jsp.JspParseException; 32 import com.caucho.vfs.WriteStream; 33 34 import java.io.IOException ; 35 import java.util.ArrayList ; 36 37 40 public class JspParams extends JspNode { 41 private ArrayList <JspParam> _params = new ArrayList <JspParam>(); 42 43 46 public ArrayList <JspParam> getParams() 47 { 48 return _params; 49 } 50 51 54 public void addChild(JspNode node) 55 throws JspParseException 56 { 57 if (node instanceof JspParam) 58 _params.add((JspParam) node); 59 else if (node instanceof JspBody) { 60 } 61 else 62 super.addChild(node); 63 } 64 65 68 public void addChildEnd(JspNode node) 69 throws JspParseException 70 { 71 if (node instanceof JspBody) { 72 JspBody body = (JspBody) node; 73 74 for (JspNode child : body.getChildren()) { 75 if (child instanceof JspParam) 76 _params.add((JspParam) child); 77 else 78 super.addChild(child); 79 } 80 } 81 } 82 83 88 public void printXml(WriteStream os) 89 throws IOException 90 { 91 throw new IOException (L.l("<jsp:params> does not generate code directly.")); 92 } 93 94 99 public void generate(JspJavaWriter out) 100 throws Exception 101 { 102 throw error(L.l("<jsp:params> does not generate code directly.")); 103 } 104 } 105 | Popular Tags |