text: public virtual ITerminalNode[] GetTokens(int ttype){if (children == null){return Collections.EmptyList<ITerminalNode>();}List<ITerminalNode> tokens = null;foreach (IParseTree o in children){if (o is ITerminalNode){ITerminalNode tnode = (ITerminalNode)o;IToken symbol = tnode.Symbol;if (symbol.Type == ttype){if (tokens == null){tokens = new List<ITerminalNode>();}tokens.Add(tnode);}}}if (tokens == null){return Collections.EmptyList<ITerminalNode>();}return tokens;}