# fromValue static method

AutowireMode fromValue(

1. int value

)

Returns the AutowireMode that corresponds to the given integer `value`.

    final mode = AutowireMode.fromValue(1);
    print(mode == AutowireMode.BY_NAME); // true

Throws an IllegalArgumentException if the value does not map to any mode.

## Implementation

    static AutowireMode fromValue(int value) {
      return switch (value) {
        0 => NO,
        1 => BY_NAME,
        2 => BY_TYPE,
        _ => throw IllegalArgumentException('No AutowireMode with value $value')
      };
    }