mx4j.util

Class Utils

public class Utils extends Object

Several utility functions for the JMX implementation

Version: $Revision: 1.18 $

Method Summary
static char[]arrayCopy(char[] chars)
static booleanarrayEquals(Object[] arr1, Object[] arr2)
static booleanarrayEquals(byte[] arr1, byte[] arr2)
static intarrayHashCode(Object[] arr)
static intarrayHashCode(byte[] arr)
static booleanisAttributeGetter(Method m)
Returns true is the given method is a JMX attribute getter method
static booleanisAttributeSetter(Method m)
Returns true if the method is a JMX attribute setter method
static ClassloadClass(ClassLoader loader, String name)
This methods load a class given the classloader and the name of the class, and work for extended names of primitive types.
static Class[]loadClasses(ClassLoader loader, String[] names)
Returns the classes whose names are specified by the names argument, loaded with the specified classloader.
static booleanwildcardMatch(String pattern, String string)

Method Detail

arrayCopy

public static char[] arrayCopy(char[] chars)

arrayEquals

public static boolean arrayEquals(Object[] arr1, Object[] arr2)

arrayEquals

public static boolean arrayEquals(byte[] arr1, byte[] arr2)

arrayHashCode

public static int arrayHashCode(Object[] arr)

arrayHashCode

public static int arrayHashCode(byte[] arr)

isAttributeGetter

public static boolean isAttributeGetter(Method m)
Returns true is the given method is a JMX attribute getter method

isAttributeSetter

public static boolean isAttributeSetter(Method m)
Returns true if the method is a JMX attribute setter method

loadClass

public static Class loadClass(ClassLoader loader, String name)
This methods load a class given the classloader and the name of the class, and work for extended names of primitive types.

If you try to do ClassLoader.loadClass("boolean") it barfs it cannot find the class, so this method cope with this problem.

loadClasses

public static Class[] loadClasses(ClassLoader loader, String[] names)
Returns the classes whose names are specified by the names argument, loaded with the specified classloader.

wildcardMatch

public static boolean wildcardMatch(String pattern, String string)
Copyright © 2001-2005 The MX4J Contributors. All Rights Reserved.