FileDocCategorySizeDatePackage
JDMAccess.javaAPI DocJava SE 5 API1233Fri Aug 26 14:55:00 BST 2005com.sun.jmx.snmp.IPAcl

JDMAccess.java

/*
 * @(#)file      JDMAccess.java
 * @(#)author    Sun Microsystems, Inc.
 * @(#)version   4.9
 * @(#)date      05/08/26
 *
 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
 * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 *
 */


/* Generated By:JJTree: Do not edit this line. JDMAccess.java */

package com.sun.jmx.snmp.IPAcl;


/**
 * @version     4.9     12/19/03
 * @author      Sun Microsystems, Inc.
 */
class JDMAccess extends SimpleNode {
  protected int access= -1;

  JDMAccess(int id) {
    super(id);
  }

  JDMAccess(Parser p, int id) {
    super(p, id);
  }

  public static Node jjtCreate(int id) {
      return new JDMAccess(id);
  }

  public static Node jjtCreate(Parser p, int id) {
      return new JDMAccess(p, id);
  }

  protected void putPermission(AclEntryImpl entry) {
    if (access == ParserConstants.RO) {
       // We have a read-only access.
       //
       entry.addPermission(com.sun.jmx.snmp.IPAcl.SnmpAcl.getREAD());
    }
    if (access == ParserConstants.RW) {
       // We have a read-write access.
       //
       entry.addPermission(com.sun.jmx.snmp.IPAcl.SnmpAcl.getREAD());
       entry.addPermission(com.sun.jmx.snmp.IPAcl.SnmpAcl.getWRITE());
    }
  }
}