# sort static method

void sort(

1. List<Object> list

)

Utility method to sort a list of objects according to Jetleaf's annotation and order-based rules.

This static method provides a convenient way to sort lists without explicitly creating a comparator instance. It's particularly useful for one-off sorting operations.

### Parameters:

- `list`: The list to sort in-place using annotation-aware ordering

### Usage:

    // Sort configuration classes by their @Order annotations
    final configClasses = [
      Class<DatabaseConfig>(),    // @Order(2)
      Class<SecurityConfig>(),    // @Order(1)
      Class<WebConfig>(),         // @Order(3)
      Class<CacheConfig>()        // No @Order - defaults to LOWEST_PRECEDENCE
    ];

    AnnotationAwareOrderComparator.sort(configClasses);

    // Order: SecurityConfig (1), DatabaseConfig (2),
    //        WebConfig (3), CacheConfig (MAX_VALUE)
    for (final cls in configClasses) {
      print(cls.getSimpleName());
    }

### Framework Usage:

This method is used internally by Jetleaf to sort:

- Pod factory post-processors
- Application context initializers
- Event listeners
- Configuration classes
- Any framework extension points that support ordering

## Implementation

    static void sort(List<Object> list) => list.sort(AnnotationAwareOrderComparator().whenCompared);