org.sonatype.guice.bean.locators
Interface RankingFunction

All Known Implementing Classes:
DefaultRankingFunction

public interface RankingFunction

Assigns each Binding a rank according to some function; higher ranks take precedence over lower ranks.


Method Summary
 int maxRank()
          Estimates the maximum possible rank for this function; used to arrange injectors in order of ranking probability.
<T> int
rank(com.google.inject.Binding<T> binding)
          Assigns a numeric rank to the given binding.
 

Method Detail

maxRank

int maxRank()
Estimates the maximum possible rank for this function; used to arrange injectors in order of ranking probability.

Returns:
Maximum rank

rank

<T> int rank(com.google.inject.Binding<T> binding)
Assigns a numeric rank to the given binding.

Parameters:
binding - The binding
Returns:
Assigned rank


Copyright © 2010-2012 Sonatype, Inc.. All Rights Reserved.