## mx4j.util
Class Utils

    java.lang.Object
      mx4j.util.Utils

public class Utils
extends java.lang.Object

Several utility functions for the JMX implementation

Version:
  $Revision: 1.18 $

Constructor Summary
`Utils()`

Method Summary
`static char[]` `arrayCopy(char[] chars)`
`static boolean` `arrayEquals(byte[] arr1, byte[] arr2)`
`static boolean` `arrayEquals(java.lang.Object[] arr1, java.lang.Object[] arr2)`
`static int` `arrayHashCode(byte[] arr)`
`static int` `arrayHashCode(java.lang.Object[] arr)`
`static boolean` `isAttributeGetter(java.lang.reflect.Method m)` Returns true is the given method is a JMX attribute getter method
`static boolean` `isAttributeSetter(java.lang.reflect.Method m)` Returns true if the method is a JMX attribute setter method
`static java.lang.Class` `loadClass(java.lang.ClassLoader loader, java.lang.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 java.lang.Class[]` `loadClasses(java.lang.ClassLoader loader, java.lang.String[] names)` Returns the classes whose names are specified by the `names` argument, loaded with the specified classloader.
`static boolean` `wildcardMatch(java.lang.String pattern, java.lang.String string)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Utils

    public Utils()

Method Detail

### loadClass

    public static java.lang.Class loadClass(java.lang.ClassLoader loader,
                                            java.lang.String name)
                                     throws java.lang.ClassNotFoundException

  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.

  Throws:
    `java.lang.ClassNotFoundException`

### loadClasses

    public static java.lang.Class[] loadClasses(java.lang.ClassLoader loader,
                                                java.lang.String[] names)
                                         throws java.lang.ClassNotFoundException

  Returns the classes whose names are specified by the `names` argument, loaded with the specified classloader.

  Throws:
    `java.lang.ClassNotFoundException`

### isAttributeGetter

    public static boolean isAttributeGetter(java.lang.reflect.Method m)

  Returns true is the given method is a JMX attribute getter method

### isAttributeSetter

    public static boolean isAttributeSetter(java.lang.reflect.Method m)

  Returns true if the method is a JMX attribute setter method

### wildcardMatch

    public static boolean wildcardMatch(java.lang.String pattern,
                                        java.lang.String string)

### arrayEquals

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

### arrayEquals

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

### arrayHashCode

    public static int arrayHashCode(java.lang.Object[] arr)

### arrayHashCode

    public static int arrayHashCode(byte[] arr)

### arrayCopy

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

Copyright © 2001-2005 The MX4J Contributors. All Rights Reserved.