Package io.quarkus.arc.impl
Class InstanceImpl<T>
- java.lang.Object
-
- io.quarkus.arc.impl.InstanceImpl<T>
-
- All Implemented Interfaces:
InjectableInstance<T>
,Iterable<T>
,javax.enterprise.inject.Instance<T>
,javax.inject.Provider<T>
public class InstanceImpl<T> extends Object implements InjectableInstance<T>
- Author:
- Martin Kouba
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearCache()
Removes the cached result of theProvider.get()
operation.void
destroy(Object instance)
T
get()
InstanceHandle<T>
getHandle()
Iterable<InstanceHandle<T>>
handles()
boolean
hasDependentInstances()
boolean
isAmbiguous()
boolean
isUnsatisfied()
Iterator<T>
iterator()
This method attempts to resolve ambiguities.InjectableInstance<T>
select(Annotation... qualifiers)
<U extends T>
InjectableInstance<U>select(Class<U> subtype, Annotation... qualifiers)
<U extends T>
InjectableInstance<U>select(javax.enterprise.util.TypeLiteral<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 java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
iterator
public Iterator<T> 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.
- Specified by:
iterator
in interfaceInjectableInstance<T>
- Specified by:
iterator
in interfaceIterable<T>
- Returns:
- an iterator over the contextual references of the disambiguated beans
- See Also:
DefaultBean
-
select
public InjectableInstance<T> select(Annotation... qualifiers)
- Specified by:
select
in interfaceInjectableInstance<T>
- Specified by:
select
in interfacejavax.enterprise.inject.Instance<T>
-
select
public <U extends T> InjectableInstance<U> select(Class<U> subtype, Annotation... qualifiers)
- Specified by:
select
in interfaceInjectableInstance<T>
- Specified by:
select
in interfacejavax.enterprise.inject.Instance<T>
-
select
public <U extends T> InjectableInstance<U> select(javax.enterprise.util.TypeLiteral<U> subtype, Annotation... qualifiers)
- Specified by:
select
in interfaceInjectableInstance<T>
- Specified by:
select
in interfacejavax.enterprise.inject.Instance<T>
-
isUnsatisfied
public boolean isUnsatisfied()
- Specified by:
isUnsatisfied
in interfacejavax.enterprise.inject.Instance<T>
-
isAmbiguous
public boolean isAmbiguous()
- Specified by:
isAmbiguous
in interfacejavax.enterprise.inject.Instance<T>
-
destroy
public void destroy(Object instance)
- Specified by:
destroy
in interfacejavax.enterprise.inject.Instance<T>
-
getHandle
public InstanceHandle<T> getHandle()
- Specified by:
getHandle
in interfaceInjectableInstance<T>
-
handles
public Iterable<InstanceHandle<T>> handles()
- Specified by:
handles
in interfaceInjectableInstance<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:
WithCaching
-
-