Interface ServiceHolder<T>
-
- Type Parameters:
T
-
- All Known Implementing Classes:
ServiceHolderImpl
public interface ServiceHolder<T>
Implementation of this class is used as a holder for service instance fromInjectionManager
along with other information about the provided service.- See Also:
ServiceHolderImpl
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Set<java.lang.reflect.Type>
getContractTypes()
Gets all contracts which represents the kept instance.java.lang.Class<T>
getImplementationClass()
Gets an implementation class of the instance which is kept in this service holder.T
getInstance()
An instance of the service got fromInjectionManager
.int
getRank()
Gets ranking of the kept instance.
-
-
-
Method Detail
-
getInstance
T getInstance()
An instance of the service got fromInjectionManager
.- Returns:
- service instance.
-
getImplementationClass
java.lang.Class<T> getImplementationClass()
Gets an implementation class of the instance which is kept in this service holder.- Returns:
- implementation class of the kept instance.
-
getContractTypes
java.util.Set<java.lang.reflect.Type> getContractTypes()
Gets all contracts which represents the kept instance.- Returns:
- all contracts.
-
getRank
int getRank()
Gets ranking of the kept instance.- Returns:
- instance's ranking.
-
-