home *** CD-ROM | disk | FTP | other *** search
- package javax.management;
-
- import java.util.Arrays;
-
- public class MBeanNotificationInfo extends MBeanFeatureInfo implements Cloneable {
- static final long serialVersionUID = -3888371564530107064L;
- private static final String[] NO_TYPES = new String[0];
- static final MBeanNotificationInfo[] NO_NOTIFICATIONS = new MBeanNotificationInfo[0];
- private final String[] types;
- private final transient boolean arrayGettersSafe;
-
- public MBeanNotificationInfo(String[] var1, String var2, String var3) {
- this(var1, var2, var3, (Descriptor)null);
- }
-
- public MBeanNotificationInfo(String[] var1, String var2, String var3, Descriptor var4) {
- super(var2, var3, var4);
- if (var1 == null) {
- var1 = NO_TYPES;
- }
-
- this.types = var1;
- this.arrayGettersSafe = MBeanInfo.arrayGettersSafe(this.getClass(), MBeanNotificationInfo.class);
- }
-
- public Object clone() {
- try {
- return super.clone();
- } catch (CloneNotSupportedException var2) {
- return null;
- }
- }
-
- public String[] getNotifTypes() {
- return this.types.length == 0 ? NO_TYPES : (String[])((String[])this.types.clone());
- }
-
- private String[] fastGetNotifTypes() {
- return this.arrayGettersSafe ? this.types : this.getNotifTypes();
- }
-
- public String toString() {
- return this.getClass().getName() + "[" + "description=" + this.getDescription() + ", " + "name=" + this.getName() + ", " + "notifTypes=" + Arrays.asList(this.fastGetNotifTypes()) + ", " + "descriptor=" + this.getDescriptor() + "]";
- }
-
- public boolean equals(Object var1) {
- if (var1 == this) {
- return true;
- } else if (!(var1 instanceof MBeanNotificationInfo)) {
- return false;
- } else {
- MBeanNotificationInfo var2 = (MBeanNotificationInfo)var1;
- return var2.getName().equals(this.getName()) && var2.getDescription().equals(this.getDescription()) && var2.getDescriptor().equals(this.getDescriptor()) && Arrays.equals(var2.fastGetNotifTypes(), this.fastGetNotifTypes());
- }
- }
-
- public int hashCode() {
- int var1 = this.getName().hashCode();
-
- for(int var2 = 0; var2 < this.types.length; ++var2) {
- var1 ^= this.types[var2].hashCode();
- }
-
- return var1;
- }
- }
-