src/main/java/org/jboss/util/HashCode.java
public static int generate(final Object array[], final boolean deep) {
      int hashcode = 0;

      for (int i=0; i<array.length; i++) {
         if (deep && (array[i] instanceof Object[])) {
            hashcode ^= generate((Object[])array[i], true);
         }
         else {
            hashcode ^= array[i].hashCode();
         }
      } 

      return hashcode;
   }
public static int generate(final Object array[], final boolean deep) {
      int hashcode = 0;

      for (int i=0; i<array.length; i++) {
         if (deep && (array[i] instanceof Object[])) {
            hashcode ^= generate((Object[])array[i], true);
         }
         else {
            hashcode ^= array[i].hashCode();
         }
      } 

      return hashcode;
   }
public static int generate ( final Object array [ ] , final boolean deep ) { int hashcode = 0 ; for ( int i = 0 ; i < array . length ; i ++ ) { if ( deep && ( array [ i ] instanceof Object [ ] ) ) { hashcode ^= generate ( ( Object [ ] ) array [ i ] , true ) ; } else { hashcode ^= array [ i ] . hashCode ( ) ; } } return hashcode ; }
Generate a hash code for an object array.

<p>Does not handle nested primitive array elements.

@param array   Array to generate hashcode for.
@param deep    True to traverse elements which are arrays to
determine the elements hash code.
@return        Hash code.
Generate a hash code for an object array .