home *** CD-ROM | disk | FTP | other *** search
/ Sky at Night 2007 June / SAN CD 6-2007 CD-ROM 25.iso / pc / Software / AstroGrav_Win / Java / jre1.6.0 / lib / rt.jar / javax / management / MBeanNotificationInfo.class (.txt) < prev    next >
Encoding:
Java Class File  |  2006-11-29  |  2.2 KB  |  67 lines

  1. package javax.management;
  2.  
  3. import java.util.Arrays;
  4.  
  5. public class MBeanNotificationInfo extends MBeanFeatureInfo implements Cloneable {
  6.    static final long serialVersionUID = -3888371564530107064L;
  7.    private static final String[] NO_TYPES = new String[0];
  8.    static final MBeanNotificationInfo[] NO_NOTIFICATIONS = new MBeanNotificationInfo[0];
  9.    private final String[] types;
  10.    private final transient boolean arrayGettersSafe;
  11.  
  12.    public MBeanNotificationInfo(String[] var1, String var2, String var3) {
  13.       this(var1, var2, var3, (Descriptor)null);
  14.    }
  15.  
  16.    public MBeanNotificationInfo(String[] var1, String var2, String var3, Descriptor var4) {
  17.       super(var2, var3, var4);
  18.       if (var1 == null) {
  19.          var1 = NO_TYPES;
  20.       }
  21.  
  22.       this.types = var1;
  23.       this.arrayGettersSafe = MBeanInfo.arrayGettersSafe(this.getClass(), MBeanNotificationInfo.class);
  24.    }
  25.  
  26.    public Object clone() {
  27.       try {
  28.          return super.clone();
  29.       } catch (CloneNotSupportedException var2) {
  30.          return null;
  31.       }
  32.    }
  33.  
  34.    public String[] getNotifTypes() {
  35.       return this.types.length == 0 ? NO_TYPES : (String[])((String[])this.types.clone());
  36.    }
  37.  
  38.    private String[] fastGetNotifTypes() {
  39.       return this.arrayGettersSafe ? this.types : this.getNotifTypes();
  40.    }
  41.  
  42.    public String toString() {
  43.       return this.getClass().getName() + "[" + "description=" + this.getDescription() + ", " + "name=" + this.getName() + ", " + "notifTypes=" + Arrays.asList(this.fastGetNotifTypes()) + ", " + "descriptor=" + this.getDescriptor() + "]";
  44.    }
  45.  
  46.    public boolean equals(Object var1) {
  47.       if (var1 == this) {
  48.          return true;
  49.       } else if (!(var1 instanceof MBeanNotificationInfo)) {
  50.          return false;
  51.       } else {
  52.          MBeanNotificationInfo var2 = (MBeanNotificationInfo)var1;
  53.          return var2.getName().equals(this.getName()) && var2.getDescription().equals(this.getDescription()) && var2.getDescriptor().equals(this.getDescriptor()) && Arrays.equals(var2.fastGetNotifTypes(), this.fastGetNotifTypes());
  54.       }
  55.    }
  56.  
  57.    public int hashCode() {
  58.       int var1 = this.getName().hashCode();
  59.  
  60.       for(int var2 = 0; var2 < this.types.length; ++var2) {
  61.          var1 ^= this.types[var2].hashCode();
  62.       }
  63.  
  64.       return var1;
  65.    }
  66. }
  67.