1 16 17 package org.apache.velocity.runtime.parser.node; 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.Token; 24 25 import org.apache.velocity.exception.MethodInvocationException; 26 import org.apache.velocity.exception.ParseErrorException; 27 import org.apache.velocity.exception.ResourceNotFoundException; 28 29 34 35 public interface Node 36 { 37 38 42 public void jjtOpen(); 43 44 48 public void jjtClose(); 49 50 54 public void jjtSetParent(Node n); 55 public Node jjtGetParent(); 56 57 61 public void jjtAddChild(Node n, int i); 62 63 67 public Node jjtGetChild(int i); 68 69 70 public int jjtGetNumChildren(); 71 72 73 public Object jjtAccept(ParserVisitor visitor, Object data); 74 75 public Object childrenAccept(ParserVisitor visitor, Object data); 76 77 public Token getFirstToken(); 79 public Token getLastToken(); 80 public int getType(); 81 82 public Object init( InternalContextAdapter context, Object data) throws Exception ; 83 84 public boolean evaluate( InternalContextAdapter context) 85 throws MethodInvocationException; 86 87 public Object value( InternalContextAdapter context) 88 throws MethodInvocationException; 89 90 public boolean render( InternalContextAdapter context, Writer writer) 91 throws IOException ,MethodInvocationException, ParseErrorException, ResourceNotFoundException; 92 93 public Object execute(Object o, InternalContextAdapter context) 94 throws MethodInvocationException; 95 96 public void setInfo(int info); 97 public int getInfo(); 98 99 public String literal(); 100 public void setInvalid(); 101 public boolean isInvalid(); 102 public int getLine(); 103 public int getColumn(); 104 } 105 | Popular Tags |