2362N/A * Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 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 * 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 * 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. 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 0N/A * Describes an MBean attribute exposed for management. Instances of 0N/A * this class are immutable. Subclasses may be mutable but this is 0N/A /* Serial version */ 0N/A /* For complicated reasons, the serialVersionUID changed 0N/A between JMX 1.0 and JMX 1.1, even though JMX 1.1 did not 0N/A have compatibility code for this class. So the 0N/A serialization produced by this class with JMX 1.2 and 0N/A jmx.serial.form=1.0 is not the same as that produced by 0N/A this class with JMX 1.1 and jmx.serial.form=1.0. However, 0N/A the serialization without that property is the same, and 0N/A that is the only form required by JMX 1.2. 0N/A long uid =
8644704819898565848L;
0N/A // OK: exception means no compat with 1.0, too bad 0N/A * @serial The actual attribute type. 0N/A * @serial The attribute write right. 0N/A * @serial The attribute read right. 0N/A * @serial Indicates if this method is a "is" 0N/A private final boolean is;
0N/A * Constructs an <CODE>MBeanAttributeInfo</CODE> object. 0N/A * @param name The name of the attribute. 0N/A * @param type The type or class name of the attribute. 0N/A * @param description A human readable description of the attribute. 0N/A * @param isReadable True if the attribute has a getter method, false otherwise. 0N/A * @param isWritable True if the attribute has a setter method, false otherwise. 0N/A * @param isIs True if this attribute has an "is" getter, false otherwise. 0N/A * @throws IllegalArgumentException if {@code isIs} is true but 0N/A * {@code isReadable} is not, or if {@code isIs} is true and 0N/A * {@code type} is not {@code boolean} or {@code java.lang.Boolean}. 0N/A * (New code should always use {@code boolean} rather than 0N/A * {@code java.lang.Boolean}.) 0N/A * Constructs an <CODE>MBeanAttributeInfo</CODE> object. 0N/A * @param name The name of the attribute. 0N/A * @param type The type or class name of the attribute. 0N/A * @param description A human readable description of the attribute. 0N/A * @param isReadable True if the attribute has a getter method, false otherwise. 0N/A * @param isWritable True if the attribute has a setter method, false otherwise. 0N/A * @param isIs True if this attribute has an "is" getter, false otherwise. 0N/A * @param descriptor The descriptor for the attribute. This may be null 0N/A * which is equivalent to an empty descriptor. 0N/A * @throws IllegalArgumentException if {@code isIs} is true but 0N/A * {@code isReadable} is not, or if {@code isIs} is true and 0N/A * {@code type} is not {@code boolean} or {@code java.lang.Boolean}. 0N/A * (New code should always use {@code boolean} rather than 0N/A * {@code java.lang.Boolean}.) 0N/A "for a non-readable attribute");
0N/A "for a non-boolean attribute");
0N/A * <p>This constructor takes the name of a simple attribute, and Method 0N/A * objects for reading and writing the attribute. The {@link Descriptor} 0N/A * of the constructed object will include fields contributed by any 0N/A * annotations on the {@code Method} objects that contain the 0N/A * {@link DescriptorKey} meta-annotation. 0N/A * @param name The programmatic name of the attribute. 0N/A * @param description A human readable description of the attribute. 0N/A * @param getter The method used for reading the attribute value. 0N/A * May be null if the property is write-only. 0N/A * @param setter The method used for writing the attribute value. 0N/A * May be null if the attribute is read-only. 0N/A * @exception IntrospectionException There is a consistency 0N/A * problem in the definition of this attribute. 0N/A * <p>Returns a shallow clone of this instance. 0N/A * The clone is obtained by simply calling <tt>super.clone()</tt>, 0N/A * thus calling the default native shallow cloning mechanism 0N/A * implemented by <tt>Object.clone()</tt>. 0N/A * No deeper cloning of any internal field is made.</p> 0N/A * <p>Since this class is immutable, cloning is chiefly of 0N/A * interest to subclasses.</p> 0N/A // should not happen as this class is cloneable 0N/A * Returns the class name of the attribute. 0N/A * @return the class name. 0N/A * Whether the value of the attribute can be read. 0N/A * @return True if the attribute can be read, false otherwise. 0N/A * Whether new values can be written to the attribute. 0N/A * @return True if the attribute can be written to, false otherwise. 0N/A * Indicates if this attribute has an "is" getter. 0N/A * @return true if this attribute has an "is" getter. 0N/A * Compare this MBeanAttributeInfo to another. 0N/A * @param o the object to compare to. 0N/A * @return true if and only if <code>o</code> is an MBeanAttributeInfo such 0N/A * that its {@link #getName()}, {@link #getType()}, {@link 0N/A * #getDescription()}, {@link #isReadable()}, {@link 0N/A * #isWritable()}, and {@link #isIs()} values are equal (not 0N/A * necessarily identical) to those of this MBeanAttributeInfo. 0N/A /* We do not include everything in the hashcode. We assume that 0N/A if two operations are different they'll probably have different 0N/A names or types. The penalty we pay when this assumption is 0N/A wrong should be less than the penalty we would pay if it were 0N/A right and we needlessly hashed in the description and parameter 0N/A * Finds the type of the attribute. 0N/A "getter and setter");