Class ServiceHolderImpl<T>

  • Type Parameters:
    T - type of the kept instance.
    All Implemented Interfaces:
    ServiceHolder<T>

    public class ServiceHolderImpl<T>
    extends Object
    implements ServiceHolder<T>
    Implementation of the instance keeper which kept the instance of the class from InjectionManager and the other information about this instance.
    • Constructor Detail

      • ServiceHolderImpl

        public ServiceHolderImpl​(T service,
                                 Set<Type> contractTypes)
        Creates a new instance of the service holder which keeps the concrete instance and its additional information.
        Parameters:
        service - service instance kept by this holder.
        contractTypes - types which represent the given instance.
      • ServiceHolderImpl

        public ServiceHolderImpl​(T service,
                                 Class<T> implementationClass,
                                 Set<Type> contractTypes,
                                 int rank)
        Creates a new instance of the service holder which keeps the concrete instance and its additional information.
        Parameters:
        service - service instance kept by this holder.
        implementationClass - implementation class of the given instance.
        contractTypes - types which represent the given instance.
        rank - ranking of the given instance.