Class MBeanUtil


  • public class MBeanUtil
    extends Object
    • Constructor Detail

      • MBeanUtil

        public MBeanUtil()
    • Method Detail

      • getAttributeName

        public static String getAttributeName​(Method method)

        Returns the name of the attribute represented by the specified attribute method. Does not check whether the specified method is actually an attribute though (use isAttribute to determine that).

      • getAttributeName

        public static String getAttributeName​(String methodName)

        Returns the name of the attribute represented by the specified attribute method. Does not check whether the specified method is actually an attribute though (use isAttribute to determine that).

      • isAttribute

        public static boolean isAttribute​(Method method)

        Returns true if the specified method represents an MBean attribute getter or setter. Returns false for methods which represent invoke operations.

      • isGetter

        public static boolean isGetter​(Method method)

        Returns true if the specified method represents an MBean attribute getter.

      • isGetterName

        public static boolean isGetterName​(String methodName,
                                           String[] arguments)

        Returns true if the specified methodName and arguments could potentially be a getter operation. Used do detect and warn in cases where someone has invoked an attribute getter directly (instead of using getAttribute(s) as they should).

      • isSetterName

        public static boolean isSetterName​(String methodName,
                                           String[] arguments)
      • isSetter

        public static boolean isSetter​(Method method)

        Returns true if the specified method represents an MBean attribute setter.