Package io.quarkus.arc.processor
Class BeanStream
java.lang.Object
io.quarkus.arc.processor.BeanStream
Convenient
Stream wrapper that can be used to filter a set of beans.
This object is stateful and cannot be reused. After a terminal opration is performed, the underlying stream is considered consumed, and can no longer be used.
This construct is not threadsafe.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionassignableTo(org.jboss.jandex.Type requiredType, org.jboss.jandex.AnnotationInstance... requiredQualifiers) collect()Terminal operation.<R,A> R Terminal operation.Terminal operation.booleanisEmpty()Terminal operation.iterator()Terminal operation.matchBeanTypes(Predicate<Set<org.jboss.jandex.Type>> predicate) stream()withBeanClass(Class<?> beanClass) withBeanClass(org.jboss.jandex.DotName beanClass) withBeanType(Class<?> beanType) withBeanType(org.jboss.jandex.DotName beanTypeName) withBeanType(org.jboss.jandex.Type beanType) withName()final BeanStreamwithQualifier(Class<? extends Annotation>... qualifiers) withQualifier(org.jboss.jandex.DotName... qualifierNames) withScope(Class<? extends Annotation> scope) withScope(org.jboss.jandex.DotName scopeName) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
BeanStream
-
-
Method Details
-
withScope
- Parameters:
scopeName-- Returns:
- the new stream of beans
- See Also:
-
withScope
- Parameters:
scopeName-- Returns:
- the new stream of beans
- See Also:
-
withBeanType
- Parameters:
beanType-- Returns:
- the new stream of beans
- See Also:
-
withBeanType
- Parameters:
beanType-- Returns:
- the new stream of beans
- See Also:
-
withBeanType
- Parameters:
beanType-- Returns:
- the new stream of beans
- See Also:
-
withBeanClass
- Parameters:
beanClass-- Returns:
- the new stream of beans
- See Also:
-
matchBeanTypes
- Parameters:
predicate-- Returns:
- the new stream of beans
-
withTarget
- Returns:
- the new stream of beans
- See Also:
-
withBeanClass
- Parameters:
beanClass-- Returns:
- the new stream of beans
- See Also:
-
withQualifier
- Parameters:
qualifier-- Returns:
- the new stream of beans
- See Also:
-
withQualifier
- Parameters:
qualifierNames-- Returns:
- the new stream of beans
- See Also:
-
withName
- Parameters:
name-- Returns:
- the new stream of beans
- See Also:
-
withName
- Returns:
- the new stream of beans
- See Also:
-
withAroundInvokeInterceptor
- Returns:
- the new stream of beans that have an associated interceptor
-
withLifecycleInterceptor
- Returns:
- the new stream of beans that have an associated lifecycle interceptor
-
findByIdentifier
-
producers
- Returns:
- the new stream of producer beans
-
producerMethods
- Returns:
- the new stream of producer method beans
-
producerFields
- Returns:
- the new stream of producer field beans
-
classBeans
- Returns:
- the new stream of class beans
-
syntheticBeans
- Returns:
- the new stream of synthetic beans
-
namedBeans
- Returns:
- the new stream of named beans
- See Also:
-
defaultBeans
- Returns:
- the new stream of default beans
- See Also:
-
alternativeBeans
- Returns:
- the new stream of default beans
- See Also:
-
assignableTo
public BeanStream assignableTo(org.jboss.jandex.Type requiredType, org.jboss.jandex.AnnotationInstance... requiredQualifiers) - Parameters:
requiredType-requiredQualifiers-- Returns:
- the new stream of beans assignable to the required type and qualifiers
-
filter
- Parameters:
predicate-- Returns:
- the new stream
-
collect
Terminal operation.- Returns:
- the list of beans
-
stream
- Returns:
- the underlying stream instance
-
isEmpty
public boolean isEmpty()Terminal operation.- Returns:
- true if the stream contains no elements
-
iterator
Terminal operation. -
firstResult
Terminal operation. -
collect
Terminal operation.- Type Parameters:
R-A-- Parameters:
collector-- Returns:
- the collected result
-