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 TypeMethodDescriptionvoid
Removes the cached result of theProvider.get()
operation.void
static jakarta.enterprise.inject.Instance<Object>
forSynthesis
(CreationalContextImpl<?> creationalContext, boolean allowInjectionPointLookup) get()
handles()
boolean
boolean
boolean
iterator()
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, wait
Methods inherited from interface io.quarkus.arc.InjectableInstance
orElse, orNull
Methods inherited from interface jakarta.enterprise.inject.Instance
handlesStream, isResolvable, stream
Methods 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:InjectableInstance
This 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:
get
in interfacejakarta.inject.Provider<T>
-
select
- Specified by:
select
in interfaceInjectableInstance<T>
- Specified by:
select
in interfacejakarta.enterprise.inject.Instance<T>
-
select
- Specified by:
select
in interfaceInjectableInstance<T>
- Specified by:
select
in interfacejakarta.enterprise.inject.Instance<T>
-
select
public <U extends T> InjectableInstance<U> select(jakarta.enterprise.util.TypeLiteral<U> subtype, Annotation... qualifiers) - Specified by:
select
in interfaceInjectableInstance<T>
- Specified by:
select
in interfacejakarta.enterprise.inject.Instance<T>
-
isUnsatisfied
public boolean isUnsatisfied()- Specified by:
isUnsatisfied
in interfacejakarta.enterprise.inject.Instance<T>
-
isAmbiguous
public boolean isAmbiguous()- Specified by:
isAmbiguous
in interfacejakarta.enterprise.inject.Instance<T>
-
destroy
- Specified by:
destroy
in interfacejakarta.enterprise.inject.Instance<T>
-
getHandle
- Specified by:
getHandle
in interfaceInjectableInstance<T>
- Specified by:
getHandle
in interfacejakarta.enterprise.inject.Instance<T>
-
handles
- Specified by:
handles
in interfaceInjectableInstance<T>
- Specified by:
handles
in interfacejakarta.enterprise.inject.Instance<T>
-
hasDependentInstances
public boolean hasDependentInstances() -
clearCache
public void clearCache()Description copied from interface:InjectableInstance
Removes the cached result of theProvider.get()
operation. If the cached result was a contextual reference of aDependent
bean, destroy the reference as well.- Specified by:
clearCache
in interfaceInjectableInstance<T>
- See Also:
-