-
public class MirrorUtilsSome utility functions used by Mirror that are more widely applicable.
-
-
Field Summary
Fields Modifier and Type Field Description public final static MirrorUtilsINSTANCE
-
Method Summary
Modifier and Type Method Description final Array<Method>stableSort(Array<Method> methods)Sorts the given methods into a consistent and stable order. final Array<Constructor<?>>stableSort(Array<Constructor<?>> constructors)Sorts the given constructors into a consistent and stable order. final Array<Field>stableSort(Array<Field> fields)Sorts the given fields into a consistent and stable order. final Array<Class<?>>stableSort(Array<Class<?>> classes)Sorts the given classes into a consistent and stable order. -
-
Method Detail
-
stableSort
final Array<Method> stableSort(Array<Method> methods)
Sorts the given methods into a consistent and stable order. This method sorts the array in place.
Java Core Reflection doesn't return class members in any particular order, so that order may change between versions or VMs. This method uses a custom comparison function to ensure the order is stable between versions and VMs.
- Parameters:
methods- The array of methods to sort
-
stableSort
final Array<Constructor<?>> stableSort(Array<Constructor<?>> constructors)
Sorts the given constructors into a consistent and stable order. This method sorts the array in place.
Java Core Reflection doesn't return class members in any particular order, so that order may change between versions or VMs. This method uses a custom comparison function to ensure the order is stable between versions and VMs.
- Parameters:
constructors- The array of constructors to sort
-
stableSort
final Array<Field> stableSort(Array<Field> fields)
Sorts the given fields into a consistent and stable order. This method sorts the array in place.
Java Core Reflection doesn't return class members in any particular order, so that order may change between versions or VMs. This method uses a custom comparison function to ensure the order is stable between versions and VMs.
- Parameters:
fields- The array of fields to sort
-
stableSort
final Array<Class<?>> stableSort(Array<Class<?>> classes)
Sorts the given classes into a consistent and stable order. This method sorts the array in place.
Java Core Reflection doesn't return class members in any particular order, so that order may change between versions or VMs. This method uses a custom comparison function to ensure the order is stable between versions and VMs.
- Parameters:
classes- The array of classes to sort
-
-
-
-