Package io.quarkus.arc.impl
Class InstanceImpl<T>
java.lang.Object
io.quarkus.arc.impl.InstanceImpl<T>
- All Implemented Interfaces:
InjectableInstance<T>,jakarta.enterprise.inject.Instance<T>,jakarta.inject.Provider<T>,Iterable<T>
- Author:
- Martin Kouba
-
Nested Class Summary
Nested classes/interfaces inherited from interface jakarta.enterprise.inject.Instance
jakarta.enterprise.inject.Instance.Handle<T extends Object> -
Method Summary
Modifier and TypeMethodDescriptionvoidRemoves the cached result of theProvider.get()operation.voidstatic jakarta.enterprise.inject.Instance<Object>forSynthesis(CreationalContextImpl<?> creationalContext, boolean allowInjectionPointLookup) get()handles()booleanbooleanbooleaniterator()This method attempts to resolve ambiguities.<U extends T>
InjectableInstance<U>select(jakarta.enterprise.util.TypeLiteral<U> subtype, Annotation... qualifiers) select(Annotation... qualifiers) <U extends T>
InjectableInstance<U>select(Class<U> subtype, Annotation... qualifiers) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.quarkus.arc.InjectableInstance
orElse, orNullMethods inherited from interface jakarta.enterprise.inject.Instance
handlesStream, isResolvable, streamMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
forSynthesis
public static jakarta.enterprise.inject.Instance<Object> forSynthesis(CreationalContextImpl<?> creationalContext, boolean allowInjectionPointLookup) -
iterator
Description copied from interface:InjectableInstanceThis method attempts to resolve ambiguities.In general, if multiple beans are eligible then the container eliminates all beans that are:
- not alternatives, except for producer methods and fields of beans that are alternatives,
- default beans.
-
get
- Specified by:
getin interfacejakarta.inject.Provider<T>
-
select
- Specified by:
selectin interfaceInjectableInstance<T>- Specified by:
selectin interfacejakarta.enterprise.inject.Instance<T>
-
select
- Specified by:
selectin interfaceInjectableInstance<T>- Specified by:
selectin interfacejakarta.enterprise.inject.Instance<T>
-
select
public <U extends T> InjectableInstance<U> select(jakarta.enterprise.util.TypeLiteral<U> subtype, Annotation... qualifiers) - Specified by:
selectin interfaceInjectableInstance<T>- Specified by:
selectin interfacejakarta.enterprise.inject.Instance<T>
-
isUnsatisfied
public boolean isUnsatisfied()- Specified by:
isUnsatisfiedin interfacejakarta.enterprise.inject.Instance<T>
-
isAmbiguous
public boolean isAmbiguous()- Specified by:
isAmbiguousin interfacejakarta.enterprise.inject.Instance<T>
-
destroy
- Specified by:
destroyin interfacejakarta.enterprise.inject.Instance<T>
-
getHandle
- Specified by:
getHandlein interfaceInjectableInstance<T>- Specified by:
getHandlein interfacejakarta.enterprise.inject.Instance<T>
-
handles
- Specified by:
handlesin interfaceInjectableInstance<T>- Specified by:
handlesin interfacejakarta.enterprise.inject.Instance<T>
-
hasDependentInstances
public boolean hasDependentInstances() -
clearCache
public void clearCache()Description copied from interface:InjectableInstanceRemoves the cached result of theProvider.get()operation. If the cached result was a contextual reference of aDependentbean, destroy the reference as well.- Specified by:
clearCachein interfaceInjectableInstance<T>- See Also:
-