This adds the remaining OpenXXXInfo interfaces. Changelog:
2006-08-01 Andrew John Hughes <[EMAIL PROTECTED]>
* javax/management/openmbean/OpenMBeanAttributeInfo.java:
(toString()): Corrected documentation.
* javax/management/openmbean/OpenMBeanConstructorInfo.java,
* javax/management/openmbean/OpenMBeanInfo.java,
* javax/management/openmbean/OpenMBeanOperationInfo.java:
New files.
* javax/management/openmbean/OpenMBeanParameterInfo.java:
(toString()): Corrected documentation.
--
Andrew :-)
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html
public class gcj extends Freedom implements Java { ... }
Index: javax/management/openmbean/OpenMBeanAttributeInfo.java
===================================================================
RCS file:
/cvsroot/classpath/classpath/javax/management/openmbean/OpenMBeanAttributeInfo.java,v
retrieving revision 1.1
diff -u -3 -p -u -r1.1 OpenMBeanAttributeInfo.java
--- javax/management/openmbean/OpenMBeanAttributeInfo.java 30 Jul 2006
21:03:31 -0000 1.1
+++ javax/management/openmbean/OpenMBeanAttributeInfo.java 1 Aug 2006
19:25:04 -0000
@@ -105,19 +105,12 @@ public interface OpenMBeanAttributeInfo
boolean isWritable();
/**
- * <p>
* Returns a textual representation of this instance. This
* is constructed using the class name
* (<code>javax.management.openmbean.OpenMBeanAttributeInfo</code>)
* along with the name, open type, default, minimum, maximum
* and legal values of the parameter and the access permissions
* ([EMAIL PROTECTED] #isIs()}, [EMAIL PROTECTED] #isReadable()}, [EMAIL
PROTECTED] #isWritable()}).
- * </p>
- * <p>
- * As instances of this class are immutable, the return value
- * is computed just once for each instance and reused
- * throughout its life.
- * </p>
*
* @return a @link{java.lang.String} instance representing
* the instance in textual form.
Index: javax/management/openmbean/OpenMBeanConstructorInfo.java
===================================================================
RCS file: javax/management/openmbean/OpenMBeanConstructorInfo.java
diff -N javax/management/openmbean/OpenMBeanConstructorInfo.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ javax/management/openmbean/OpenMBeanConstructorInfo.java 1 Aug 2006
19:25:04 -0000
@@ -0,0 +1,112 @@
+/* OpenMBeanConstructorInfo.java -- Open typed info about a constructor.
+ Copyright (C) 2006 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package javax.management.openmbean;
+
+import javax.management.MBeanParameterInfo;
+
+/**
+ * Describes a constructor for an open management bean.
+ * This interface includes those methods specified by [EMAIL PROTECTED]
+ * javax.management.MBeanConstructorInfo}, so implementations should
+ * extend this class. The [EMAIL PROTECTED] #getSignature()} method should
+ * return an array containing instances of [EMAIL PROTECTED]
OpenMBeanParameterInfo}.
+ *
+ * @author Andrew John Hughes ([EMAIL PROTECTED])
+ * @since 1.5
+ */
+public interface OpenMBeanConstructorInfo
+{
+
+ /**
+ * Compares this attribute with the supplied object. This returns
+ * true iff the object is an instance of [EMAIL PROTECTED]
OpenMBeanConstructorInfo}
+ * with an equal name and signature.
+ *
+ * @param obj the object to compare.
+ * @return true if the object is a [EMAIL PROTECTED] OpenMBeanParameterInfo}
+ * instance,
+ * <code>name.equals(object.getName())</code>,
+ * and <code>signature.equals(object.getSignature())</code>.
+ */
+ boolean equals(Object obj);
+
+ /**
+ * Returns a description of this constructor.
+ *
+ * @return a human-readable description.
+ */
+ String getDescription();
+
+ /**
+ * Returns the name of this constructor.
+ *
+ * @return the name of the constructor.
+ */
+ String getName();
+
+ /**
+ * Returns the constructor's signature, in the form of
+ * information on each parameter. Each parameter is
+ * described by an instance of [EMAIL PROTECTED] OpenMBeanParameterInfo}.
+ *
+ * @return an array of [EMAIL PROTECTED] OpenMBeanParameterInfo} objects,
+ * describing the constructor parameters.
+ */
+ MBeanParameterInfo[] getSignature();
+
+ /**
+ * Returns the hashcode of the constructor information as the sum of
+ * the hashcodes of the name and signature (calculated by
+ * <code>java.util.Arrays.asList(signature).hashCode()</code>).
+ *
+ * @return the hashcode of the constructor information.
+ */
+ int hashCode();
+
+ /**
+ * Returns a textual representation of this instance. This
+ * is constructed using the class name
+ * (<code>javax.management.openmbean.OpenMBeanConstructorInfo</code>)
+ * along with the name and signature.
+ *
+ * @return a @link{java.lang.String} instance representing
+ * the instance in textual form.
+ */
+ String toString();
+
+}
Index: javax/management/openmbean/OpenMBeanInfo.java
===================================================================
RCS file: javax/management/openmbean/OpenMBeanInfo.java
diff -N javax/management/openmbean/OpenMBeanInfo.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ javax/management/openmbean/OpenMBeanInfo.java 1 Aug 2006 19:25:04
-0000
@@ -0,0 +1,154 @@
+/* OpenMBeanInfo.java -- Open typed info about a management bean.
+ Copyright (C) 2006 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package javax.management.openmbean;
+
+import javax.management.MBeanAttributeInfo;
+import javax.management.MBeanConstructorInfo;
+import javax.management.MBeanNotificationInfo;
+import javax.management.MBeanOperationInfo;
+
+/**
+ * Describes an open management bean. Open management beans are
+ * management beans where [EMAIL PROTECTED]
+ * javax.management.DynamicMBean#getMBeanInfo()} returns an
+ * implementation of this interface. This interface includes those
+ * methods specified by [EMAIL PROTECTED] javax.management.MBeanInfo},
+ * so implementations should extend this class. Each method
+ * which returns an array of one of the <code>MBeanXXXInfo</code>
+ * classes should return an array containing instances
+ * of the equivalent open version (<code>OpenMBeanXXXInfo</code>).
+ *
+ * @author Andrew John Hughes ([EMAIL PROTECTED])
+ * @since 1.5
+ */
+public interface OpenMBeanInfo
+{
+
+ /**
+ * Compares this attribute with the supplied object. This returns
+ * true iff the object is an instance of [EMAIL PROTECTED]
OpenMBeanOperationInfo}
+ * with the same class name and equal instances of the info classes.
+ *
+ * @param obj the object to compare.
+ * @return true if the object is a [EMAIL PROTECTED] OpenMBeanParameterInfo}
+ * instance,
+ * <code>className.equals(object.getClassName())</code>
+ * and each info class has an equal in the other object.
+ */
+ boolean equals(Object obj);
+
+ /**
+ * Returns descriptions of each of the attributes provided by this
+ * management bean. The elements should be implementations of the
+ * [EMAIL PROTECTED] OpenMBeanAttributeInfo} class.
+ *
+ * @return an array of [EMAIL PROTECTED] OpenMBeanAttributeInfo} objects,
+ * representing the attributes emitted by this
+ * management bean.
+ */
+ MBeanAttributeInfo[] getAttributes();
+
+ /**
+ * Returns the class name of the management bean.
+ *
+ * @return the bean's class name.
+ */
+ String getClassName();
+
+ /**
+ * Returns descriptions of each of the constructors provided by this
+ * management bean. The elements should be implementations of the
+ * [EMAIL PROTECTED] OpenMBeanConstructorInfo} class.
+ *
+ * @return an array of [EMAIL PROTECTED] OpenMBeanConstructorInfo} objects,
+ * representing the constructors emitted by this
+ * management bean.
+ */
+ MBeanConstructorInfo[] getConstructors();
+
+ /**
+ * Returns a description of this operation.
+ *
+ * @return a human-readable description.
+ */
+ String getDescription();
+
+ /**
+ * Returns descriptions of each of the notifications provided by this
+ * management bean. The elements should be implementations of the
+ * [EMAIL PROTECTED] OpenMBeanNotificationInfo} class.
+ *
+ * @return an array of [EMAIL PROTECTED] OpenMBeanNotificationInfo} objects,
+ * representing the notifications emitted by this
+ * management bean.
+ */
+ MBeanNotificationInfo[] getNotifications();
+
+ /**
+ * Returns descriptions of each of the operations provided by this
+ * management bean. The elements should be implementations of the
+ * [EMAIL PROTECTED] OpenMBeanOperationInfo} class.
+ *
+ * @return an array of [EMAIL PROTECTED] OpenMBeanOperationInfo} objects,
+ * representing the operations emitted by this
+ * management bean.
+ */
+ MBeanOperationInfo[] getOperations();
+
+ /**
+ * Returns the hashcode of the bean information as the sum of the
+ * hashcodes of the class name and each array (calculated using
+ *
java.util.HashSet(<code>java.util.Arrays.asList(signature)).hashCode()</code>).
+ *
+ * @return the hashcode of the bean information.
+ */
+ int hashCode();
+
+ /**
+ * Returns a textual representation of this instance. This
+ * is constructed using the class name
+ * (<code>javax.management.openmbean.OpenMBeanInfo</code>)
+ * along with the class name and textual representations
+ * of each array.
+ *
+ * @return a @link{java.lang.String} instance representing
+ * the instance in textual form.
+ */
+ String toString();
+
+}
Index: javax/management/openmbean/OpenMBeanOperationInfo.java
===================================================================
RCS file: javax/management/openmbean/OpenMBeanOperationInfo.java
diff -N javax/management/openmbean/OpenMBeanOperationInfo.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ javax/management/openmbean/OpenMBeanOperationInfo.java 1 Aug 2006
19:25:04 -0000
@@ -0,0 +1,154 @@
+/* OpenMBeanOperationInfo.java -- Open typed info about a operation.
+ Copyright (C) 2006 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package javax.management.openmbean;
+
+import javax.management.MBeanParameterInfo;
+
+/**
+ * Describes a operation for an open management bean.
+ * This interface includes those methods specified by [EMAIL PROTECTED]
+ * javax.management.MBeanOperationInfo}, so implementations should
+ * extend this class. The [EMAIL PROTECTED] #getSignature()} method should
+ * return an array containing instances of [EMAIL PROTECTED]
OpenMBeanParameterInfo}.
+ *
+ * @author Andrew John Hughes ([EMAIL PROTECTED])
+ * @since 1.5
+ */
+public interface OpenMBeanOperationInfo
+{
+
+ /**
+ * Compares this attribute with the supplied object. This returns
+ * true iff the object is an instance of [EMAIL PROTECTED]
OpenMBeanOperationInfo}
+ * with an equal name, signature, open return type and impact.
+ *
+ * @param obj the object to compare.
+ * @return true if the object is a [EMAIL PROTECTED] OpenMBeanParameterInfo}
+ * instance,
+ * <code>name.equals(object.getName())</code>,
+ * <code>signature.equals(object.getSignature())</code>,
+ * <code>returnType.equals(object.getOpenReturnType())</code>,
+ * and <code>impact == object.getImpact()</code>.
+ */
+ boolean equals(Object obj);
+
+ /**
+ * Returns a description of this operation.
+ *
+ * @return a human-readable description.
+ */
+ String getDescription();
+
+ /**
+ * <p>
+ * Returns the impact of performing this operation.
+ * The value is equal to one of the following:
+ * </p>
+ * <ol>
+ * <li>[EMAIL PROTECTED] javax.management.MBeanOperationInfo#INFO}
+ * — the method just returns
+ * information (akin to an accessor).</li>
+ * <li>[EMAIL PROTECTED] javax.management.MBeanOperationInfo#ACTION}
+ * the method just alters the state of the bean, without
+ * returning a value (akin to a mutator).</li>
+ * <li>[EMAIL PROTECTED] javax.management.MBeanOperationInfo#ACTION_INFO}
+ * the method both makes state changes and returns a value.</li>
+ * <li>[EMAIL PROTECTED] javax.management.MBeanOperationInfo#UNKNOWN}
+ * the behaviour of the operation is unknown.</li>
+ * </ol>
+ *
+ * @return the impact of performing the operation.
+ */
+ int getImpact();
+
+ /**
+ * Returns the name of this operation.
+ *
+ * @return the name of the operation.
+ */
+ String getName();
+
+ /**
+ * Returns the open type instance which represents the type of the
+ * return value.
+ *
+ * @return the open type of the return value.
+ */
+ OpenType getReturnOpenType();
+
+ /**
+ * Returns the return type of the operation, as the class
+ * name. This should be identical to
+ * <code>getReturnOpenType.getClassName()</code>.
+ *
+ * @return the return type.
+ */
+ String getReturnType();
+
+ /**
+ * Returns the operation's signature, in the form of
+ * information on each parameter. Each parameter is
+ * described by an instance of [EMAIL PROTECTED] OpenMBeanParameterInfo}.
+ *
+ * @return an array of [EMAIL PROTECTED] OpenMBeanParameterInfo} objects,
+ * describing the operation parameters.
+ */
+ MBeanParameterInfo[] getSignature();
+
+ /**
+ * Returns the hashcode of the operation information as the sum of
+ * the hashcodes of the name, open return type, impact and signature
+ * (calculated by
+ * <code>java.util.Arrays.asList(signature).hashCode()</code>).
+ *
+ * @return the hashcode of the operation information.
+ */
+ int hashCode();
+
+ /**
+ * Returns a textual representation of this instance. This
+ * is constructed using the class name
+ * (<code>javax.management.openmbean.OpenMBeanOperationInfo</code>)
+ * along with the name, signature, open return type and impact.
+ *
+ * @return a @link{java.lang.String} instance representing
+ * the instance in textual form.
+ */
+ String toString();
+
+}
Index: javax/management/openmbean/OpenMBeanParameterInfo.java
===================================================================
RCS file:
/cvsroot/classpath/classpath/javax/management/openmbean/OpenMBeanParameterInfo.java,v
retrieving revision 1.1
diff -u -3 -p -u -r1.1 OpenMBeanParameterInfo.java
--- javax/management/openmbean/OpenMBeanParameterInfo.java 30 Jul 2006
21:03:31 -0000 1.1
+++ javax/management/openmbean/OpenMBeanParameterInfo.java 1 Aug 2006
19:25:04 -0000
@@ -176,18 +176,11 @@ public interface OpenMBeanParameterInfo
boolean isValue(Object obj);
/**
- * <p>
* Returns a textual representation of this instance. This
* is constructed using the class name
* (<code>javax.management.openmbean.OpenMBeanParameterInfo</code>)
* along with the name, open type, default, minimum, maximum
* and legal values of the parameter.
- * </p>
- * <p>
- * As instances of this class are immutable, the return value
- * is computed just once for each instance and reused
- * throughout its life.
- * </p>
*
* @return a @link{java.lang.String} instance representing
* the instance in textual form.
signature.asc
Description: Digital signature
