User: squirest Date: 02/01/17 17:14:13 Modified: src/main/javax/management MBeanOperationInfo.java Log: changed public static final int values to be the same as in the RI so that code compiled using the RI will still work against jboss-jmx Revision Changes Path 1.4 +87 -87 jmx/src/main/javax/management/MBeanOperationInfo.java Index: MBeanOperationInfo.java =================================================================== RCS file: /cvsroot/jboss/jmx/src/main/javax/management/MBeanOperationInfo.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- MBeanOperationInfo.java 2001/12/11 21:19:47 1.3 +++ MBeanOperationInfo.java 2002/01/18 01:14:13 1.4 @@ -1,87 +1,87 @@ -/* - * JBoss, the OpenSource J2EE webOS - * - * Distributable under LGPL license. - * See terms of license at gnu.org. - */ -package javax.management; - -/** - * Describes an operation exposed by an MBean - * - * This implementation protects its immutability by taking shallow clones of all arrays - * supplied in constructors and by returning shallow array clones in getXXX() methods. - * - * @author <a href="mailto:[EMAIL PROTECTED]">Juha Lindfors</a>. - * @author <a href="mailto:[EMAIL PROTECTED]">Trevor Squires</a>. - * - * @version $Revision: 1.3 $ - */ -public class MBeanOperationInfo extends MBeanFeatureInfo - implements java.io.Serializable, Cloneable -{ - - // Attributes ---------------------------------------------------- - public static final int INFO = 0x1234; - public static final int ACTION = 0x332; - public static final int ACTION_INFO = 0xabcd; - public static final int UNKNOWN = 0xdead; - - protected int impact = UNKNOWN; - protected MBeanParameterInfo[] signature = null; - protected String returnType = null; - - // Constructors -------------------------------------------------- - public MBeanOperationInfo(java.lang.String description, - java.lang.reflect.Method method) - { - super(method.getName(), description); - this.returnType = method.getReturnType().getName(); - - Class[] sign = method.getParameterTypes(); - signature = new MBeanParameterInfo[sign.length]; - - for (int i = 0; i < sign.length; ++i) - { - String name = sign[i].getName(); - signature[i] = new MBeanParameterInfo(name, name, "MBean Operation Parameter."); - } - } - - public MBeanOperationInfo(String name, String description, - MBeanParameterInfo[] signature, - String returnType, int impact) - { - super(name, description); - this.signature = (null == signature) ? new MBeanParameterInfo[0] : (MBeanParameterInfo[]) signature.clone(); - this.returnType = returnType; - this.impact = impact; - } - - // Public -------------------------------------------------------- - public String getReturnType() - { - return returnType; - } - - public MBeanParameterInfo[] getSignature() - { - return (MBeanParameterInfo[]) signature.clone(); - } - - public int getImpact() - { - return impact; - } - - // Cloneable implementation -------------------------------------- - public java.lang.Object clone() throws CloneNotSupportedException - { - MBeanOperationInfo clone = (MBeanOperationInfo) super.clone(); - clone.signature = getSignature(); - clone.returnType = getReturnType(); - clone.impact = getImpact(); - - return clone; - } -} +/* + * JBoss, the OpenSource J2EE webOS + * + * Distributable under LGPL license. + * See terms of license at gnu.org. + */ +package javax.management; + +/** + * Describes an operation exposed by an MBean + * + * This implementation protects its immutability by taking shallow clones of all arrays + * supplied in constructors and by returning shallow array clones in getXXX() methods. + * + * @author <a href="mailto:[EMAIL PROTECTED]">Juha Lindfors</a>. + * @author <a href="mailto:[EMAIL PROTECTED]">Trevor Squires</a>. + * + * @version $Revision: 1.4 $ + */ +public class MBeanOperationInfo extends MBeanFeatureInfo + implements java.io.Serializable, Cloneable +{ + + // Attributes ---------------------------------------------------- + public static final int INFO = 0; + public static final int ACTION = 1; + public static final int ACTION_INFO = 2; + public static final int UNKNOWN = 3; + + protected int impact = UNKNOWN; + protected MBeanParameterInfo[] signature = null; + protected String returnType = null; + + // Constructors -------------------------------------------------- + public MBeanOperationInfo(java.lang.String description, + java.lang.reflect.Method method) + { + super(method.getName(), description); + this.returnType = method.getReturnType().getName(); + + Class[] sign = method.getParameterTypes(); + signature = new MBeanParameterInfo[sign.length]; + + for (int i = 0; i < sign.length; ++i) + { + String name = sign[i].getName(); + signature[i] = new MBeanParameterInfo(name, name, "MBean Operation Parameter."); + } + } + + public MBeanOperationInfo(String name, String description, + MBeanParameterInfo[] signature, + String returnType, int impact) + { + super(name, description); + this.signature = (null == signature) ? new MBeanParameterInfo[0] : (MBeanParameterInfo[]) signature.clone(); + this.returnType = returnType; + this.impact = impact; + } + + // Public -------------------------------------------------------- + public String getReturnType() + { + return returnType; + } + + public MBeanParameterInfo[] getSignature() + { + return (MBeanParameterInfo[]) signature.clone(); + } + + public int getImpact() + { + return impact; + } + + // Cloneable implementation -------------------------------------- + public java.lang.Object clone() throws CloneNotSupportedException + { + MBeanOperationInfo clone = (MBeanOperationInfo) super.clone(); + clone.signature = getSignature(); + clone.returnType = getReturnType(); + clone.impact = getImpact(); + + return clone; + } +}
_______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
