Package com.vaadin.flow.di
Class LookupInitializer.LookupImpl
java.lang.Object
com.vaadin.flow.di.LookupInitializer.LookupImpl
- All Implemented Interfaces:
Lookup
- Enclosing class:
LookupInitializer
Default implementation of
Lookup.- Author:
- Vaadin Ltd
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedLookupImpl(Map<Class<?>, Collection<Class<?>>> initialServices, BiFunction<Class<?>, Class<?>, Object> factory) Creates a new instance ofLookupwith services found in the application classpath. -
Method Summary
Modifier and TypeMethodDescription<T> TLookup for a service of the given type.<T> Collection<T> Lookup for all services by the providedserviceClass.
-
Field Details
-
serviceMap
-
-
Constructor Details
-
LookupImpl
protected LookupImpl(Map<Class<?>, Collection<Class<?>>> initialServices, BiFunction<Class<?>, Class<?>, Object> factory) Creates a new instance ofLookupwith services found in the application classpath.- Parameters:
initialServices- map of initial services with their implementationsfactory- a factory to create a service object instance
-
-
Method Details
-
lookup
Description copied from interface:LookupLookup for a service of the given type.The
serviceClassis usually an interface (though it doesn't have to be) and the returned value is some implementation of this interface. -
lookupAll
Description copied from interface:LookupLookup for all services by the providedserviceClass.The
serviceClassis usually an interface class (though it doesn't have to be) and the returned value is all implementations of this interface.
-