/** * Constructs an <CODE>MBeanConstructorInfo</CODE> object. The {@link Descriptor} of the * constructed object will include fields contributed by any annotations on the {@code * Constructor} object that contain the {@link DescriptorKey} meta-annotation. * * @param description A human readable description of the operation. * @param constructor The <CODE>java.lang.reflect.Constructor</CODE> object describing the MBean * constructor. */ public MBeanConstructorInfo(String description, Constructor constructor) { this( constructor.getName(), description, constructorSignature(constructor), Introspector.descriptorForElement(constructor)); }
/** * Constructs an <CODE>MBeanOperationInfo</CODE> object. The {@link Descriptor} of the constructed * object will include fields contributed by any annotations on the {@code Method} object that * contain the {@link DescriptorKey} meta-annotation. * * @param method The <CODE>java.lang.reflect.Method</CODE> object describing the MBean operation. * @param description A human readable description of the operation. */ public MBeanOperationInfo(String description, Method method) { this( method.getName(), description, methodSignature(method), method.getReturnType().getName(), UNKNOWN, Introspector.descriptorForElement(method)); }
static MBeanParameterInfo[] parameters(Class[] classes, Annotation[][] annots) { final MBeanParameterInfo[] params = new MBeanParameterInfo[classes.length]; assert (classes.length == annots.length); for (int i = 0; i < classes.length; i++) { Descriptor d = Introspector.descriptorForAnnotations(annots[i]); final String pn = "p" + (i + 1); params[i] = new MBeanParameterInfo(pn, classes[i].getName(), "", d); } return params; }