@SuppressWarnings("unchecked")
    public void sort(Object[] array, Class<?> arrayType,
                     String property, boolean reverse) {
        BeanComparator comparator = 
            newBeanComparator(arrayType, property, reverse);
        Arrays.sort(array, comparator);
    }
@ SuppressWarnings ( "unchecked" ) public void sort ( Object [ ] array , Class < ? > arrayType , String property , boolean reverse ) { BeanComparator comparator = newBeanComparator ( arrayType , property , reverse ) ; Arrays . sort ( array , comparator ) ; }
Sort the given array by using the given property to evaluate against
each element in the array comparing the resulting values. For example,
if the object array contained User instances that had a lastName
property, then you could sort the array by last name via:
<code>sort(users, 'lastName', false)</code>. This ensures that each
element in the array is of the given type and uses the given type to
perform the property lookup and evaluation.

@param array The array to sort
@param arrayType The type of elements in the array
@param property The name of the property on the elements to sort against
@param reverse The state of whether to reverse the order