Here you can find the source of getAttribute(MBeanInfo info, String attrName)
public static MBeanAttributeInfo getAttribute(MBeanInfo info, String attrName)
//package com.java2s; //License from project: LGPL import javax.management.MBeanInfo; import javax.management.MBeanAttributeInfo; public class Main { /**// www . java 2s .c om * Returns the attribute with the specified name. */ public static MBeanAttributeInfo getAttribute(MBeanInfo info, String attrName) { MBeanAttributeInfo[] attrs = info.getAttributes(); for (int i = 0; i < attrs.length; i++) { if (attrs[i].getName().equals(attrName)) return attrs[i]; } return null; } }