# getPriority method

1. @protected

int? getPriority(

1. Object instance

)

Gets the priority of an instance for dependency resolution.

This method extracts the priority value from an instance using the dependency comparator if it's an OrderComparator.

`instance` the instance to get priority for

Returns the priority value, or `null` if no priority can be determined

## Implementation

    @protected
    int? getPriority(Object instance) {
    		final comparator = getDependencyComparator();
      if (comparator is OrderComparator) {
        return comparator.getPriority(instance);
      }

      return null;
    	}