Module io.helidon.inject.testing
Package io.helidon.inject.testing
Class ReflectionBasedSingletonServiceProvider<T>
java.lang.Object
io.helidon.inject.runtime.AbstractServiceProvider<T>
io.helidon.inject.testing.ReflectionBasedSingletonServiceProvider<T>
- Type Parameters:
T- the service type
- All Implemented Interfaces:
io.helidon.common.Weighted,io.helidon.inject.api.ActivationPhaseReceiver,io.helidon.inject.api.Activator,io.helidon.inject.api.DeActivator,io.helidon.inject.api.InjectionPointProvider<T>,io.helidon.inject.api.Resettable,io.helidon.inject.api.ServiceProvider<T>,io.helidon.inject.api.ServiceProviderBindable<T>,Provider<T>,Comparable<io.helidon.common.Weighted>
Creates a simple reflection based service provider - for testing purposes only!
-
Nested Class Summary
Nested classes/interfaces inherited from class io.helidon.inject.runtime.AbstractServiceProvider
AbstractServiceProvider.LogEntryAndResult -
Field Summary
Fields inherited from interface io.helidon.common.Weighted
DEFAULT_WEIGHT -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> ReflectionBasedSingletonServiceProvider<T> Generates a service provider eligible for binding into the service registry with the following proviso: The service type will be ofjakarta.inject.Singletonscope The service type will be created reflectively, and will expect to have an empty constructor The service type will not be able to provide its dependencies, nor will it be able to accept injection The service type will not be able to participate in lifecycle -PostConstructMethodorPreDestroyMethodNote: Generally it is encouraged for users to rely on the annotation processors and other built on compile-time tooling to generate the appropriate service providers and modules.protected TcreateServiceProvider(Map<String, Object> deps) booleanisCustom()Methods inherited from class io.helidon.inject.runtime.AbstractServiceProvider
activate, activationLog, activator, createLogEntryAndResult, currentActivationPhase, deactivate, deActivator, dependencies, dependencies, description, doConstructing, doDestroying, doInjectingFields, doInjectingMethods, doPostConstructing, doPreDestroying, equals, expectedQualifiedServiceError, first, get, get, getOrCreateInjectionPlan, hashCode, id, identityPrefix, identitySuffix, injectionPlanBinder, injectionServices, injectionServices, interceptor, interceptor, isAlreadyAtTargetPhase, isInterceptor, isProvider, list, logger, maybeActivate, moduleName, name, onFailedFinish, onFinalShutdown, onFinished, onPhaseEvent, postConstructMethod, preDestroyMethod, reset, serviceInfo, serviceInfo, serviceProviderBindable, serviceRef, serviceTypeInjectionOrder, startTransitionCurrentActivationPhase, toAbstractServiceProvider, toString, weightMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.helidon.inject.api.ServiceProviderBindable
isIntercepted, isRootProvider, rootProvider, rootProviderMethods inherited from interface io.helidon.common.Weighted
compareTo
-
Method Details
-
create
public static <T> ReflectionBasedSingletonServiceProvider<T> create(Class<T> serviceType, io.helidon.inject.api.ServiceInfoBasics siBasics) Generates a service provider eligible for binding into the service registry with the following proviso:- The service type will be of
jakarta.inject.Singletonscope - The service type will be created reflectively, and will expect to have an empty constructor
- The service type will not be able to provide its dependencies, nor will it be able to accept injection
- The service type will not be able to participate in lifecycle -
PostConstructMethodorPreDestroyMethod
- Type Parameters:
T- the class of the service type- Parameters:
serviceType- the service typesiBasics- the service info basic descriptor, or null to generate a default (empty) placeholder- Returns:
- the service provider capable of being bound to the services registry
- See Also:
- The service type will be of
-
isCustom
public boolean isCustom()- Overrides:
isCustomin classAbstractServiceProvider<T>
-
createServiceProvider
- Overrides:
createServiceProviderin classAbstractServiceProvider<T>
-
serviceType
-