1. /*
  2. * @(#)file JDMNetMask.java
  3. * @(#)author Sun Microsystems, Inc.
  4. * @(#)version 1.6
  5. * @(#)date 04/09/15
  6. *
  7. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  8. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  9. *
  10. */
  11. /* Generated By:JJTree: Do not edit this line. JDMNetMask.java */
  12. package com.sun.jmx.snmp.IPAcl;
  13. import java.net.UnknownHostException;
  14. class JDMNetMask extends Host {
  15. protected StringBuffer address= new StringBuffer();
  16. protected String mask = null;
  17. public JDMNetMask(int id) {
  18. super(id);
  19. }
  20. public JDMNetMask(Parser p, int id) {
  21. super(p, id);
  22. }
  23. public static Node jjtCreate(int id) {
  24. return new JDMNetMask(id);
  25. }
  26. public static Node jjtCreate(Parser p, int id) {
  27. return new JDMNetMask(p, id);
  28. }
  29. protected String getHname() {
  30. return address.toString();
  31. }
  32. protected PrincipalImpl createAssociatedPrincipal()
  33. throws UnknownHostException {
  34. return new NetMaskImpl(address.toString(), Integer.parseInt(mask));
  35. }
  36. }