0N/A/*
2362N/A * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
2362N/A * published by the Free Software Foundation. Oracle designates this
0N/A * particular file as subject to the "Classpath" exception as provided
2362N/A * by Oracle in the LICENSE file that accompanied this code.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A * or visit www.oracle.com if you need additional information or have any
2362N/A * questions.
0N/A */
0N/A
0N/A
0N/A/* Generated By:JJTree: Do not edit this line. SimpleNode.java */
0N/A
0N/Apackage com.sun.jmx.snmp.IPAcl;
0N/A
0N/Aimport java.net.InetAddress;
0N/Aimport java.util.Hashtable;
0N/Aimport java.util.Vector;
0N/A
0N/Aclass SimpleNode implements Node {
0N/A protected Node parent;
0N/A protected Node[] children;
0N/A protected int id;
0N/A protected Parser parser;
0N/A
0N/A public SimpleNode(int i) {
0N/A id = i;
0N/A }
0N/A
0N/A public SimpleNode(Parser p, int i) {
0N/A this(i);
0N/A parser = p;
0N/A }
0N/A
0N/A public static Node jjtCreate(int id) {
0N/A return new SimpleNode(id);
0N/A }
0N/A
0N/A public static Node jjtCreate(Parser p, int id) {
0N/A return new SimpleNode(p, id);
0N/A }
0N/A
0N/A public void jjtOpen() {
0N/A }
0N/A
0N/A public void jjtClose() {
0N/A }
0N/A
0N/A public void jjtSetParent(Node n) { parent = n; }
0N/A public Node jjtGetParent() { return parent; }
0N/A
0N/A public void jjtAddChild(Node n, int i) {
0N/A if (children == null) {
0N/A children = new Node[i + 1];
0N/A } else if (i >= children.length) {
0N/A Node c[] = new Node[i + 1];
0N/A System.arraycopy(children, 0, c, 0, children.length);
0N/A children = c;
0N/A }
0N/A children[i] = n;
0N/A }
0N/A
0N/A public Node jjtGetChild(int i) {
0N/A return children[i];
0N/A }
0N/A
0N/A public int jjtGetNumChildren() {
0N/A return (children == null) ? 0 : children.length;
0N/A }
0N/A
0N/A /*
0N/A SR. Extend the SimpleNode definition
0N/A */
0N/A
0N/A /**
0N/A * Build the Trap entries from the syntactic tree.
0N/A */
0N/A public void buildTrapEntries(Hashtable<InetAddress, Vector<String>> dest) {
0N/A if (children != null) {
0N/A for (int i = 0; i < children.length; ++i) {
0N/A SimpleNode n = (SimpleNode)children[i];
0N/A if (n != null) {
0N/A n.buildTrapEntries(dest);
0N/A }
0N/A } /* end of loop */
0N/A }
0N/A }
0N/A /**
0N/A * Build the Inform entries from the syntactic tree.
0N/A */
0N/A public void buildInformEntries(Hashtable<InetAddress, Vector<String>> dest) {
0N/A if (children != null) {
0N/A for (int i = 0; i < children.length; ++i) {
0N/A SimpleNode n = (SimpleNode)children[i];
0N/A if (n != null) {
0N/A n.buildInformEntries(dest);
0N/A }
0N/A } /* end of loop */
0N/A }
0N/A }
0N/A
0N/A /**
0N/A * Build the Acl entries from the syntactic tree.
0N/A */
0N/A public void buildAclEntries(PrincipalImpl owner, AclImpl acl) {
0N/A if (children != null) {
0N/A for (int i = 0; i < children.length; ++i) {
0N/A SimpleNode n = (SimpleNode)children[i];
0N/A if (n != null) {
0N/A n.buildAclEntries(owner, acl);
0N/A }
0N/A } /* end of loop */
0N/A }
0N/A }
0N/A
0N/A /* END SR */
0N/A
0N/A /* You can override these two methods in subclasses of SimpleNode to
0N/A customize the way the node appears when the tree is dumped. If
0N/A your output uses more than one line you should override
0N/A toString(String), otherwise overriding toString() is probably all
0N/A you need to do. */
0N/A
0N/A public String toString() { return ParserTreeConstants.jjtNodeName[id]; }
0N/A public String toString(String prefix) { return prefix + toString(); }
0N/A
0N/A /* Override this method if you want to customize how the node dumps
0N/A out its children. */
0N/A
0N/A public void dump(String prefix) {
0N/A if (children != null) {
0N/A for (int i = 0; i < children.length; ++i) {
0N/A SimpleNode n = (SimpleNode)children[i];
0N/A if (n != null) {
0N/A n.dump(prefix + " ");
0N/A }
0N/A }
0N/A }
0N/A }
0N/A}