1 package org.apache.velocity.runtime.parser.node; 2 3 18 19 import java.io.Writer ; 20 import java.io.IOException ; 21 22 import org.apache.velocity.context.InternalContextAdapter; 23 import org.apache.velocity.runtime.parser.*; 24 25 import org.apache.velocity.exception.MethodInvocationException; 26 import org.apache.velocity.exception.ParseErrorException; 27 import org.apache.velocity.exception.ResourceNotFoundException; 28 29 39 public class ASTElseIfStatement extends SimpleNode 40 { 41 public ASTElseIfStatement(int id) 42 { 43 super(id); 44 } 45 46 public ASTElseIfStatement(Parser p, int id) 47 { 48 super(p, id); 49 } 50 51 52 public Object jjtAccept(ParserVisitor visitor, Object data) 53 { 54 return visitor.visit(this, data); 55 } 56 57 65 public boolean evaluate ( InternalContextAdapter context) 66 throws MethodInvocationException 67 { 68 return jjtGetChild(0).evaluate(context); 69 } 70 71 74 public boolean render( InternalContextAdapter context, Writer writer) 75 throws IOException ,MethodInvocationException, 76 ResourceNotFoundException, ParseErrorException 77 { 78 return jjtGetChild(1).render( context, writer ); 79 } 80 } 81 | Popular Tags |