public final class BeanStream extends Object implements Iterable<BeanInfo>
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 and Description |
|---|
BeanStream(Collection<BeanInfo> beans) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic BeanStream(Collection<BeanInfo> beans)
public BeanStream withScope(Class<? extends Annotation> scope)
scopeName - BeanInfo.getScope()public BeanStream withScope(org.jboss.jandex.DotName scopeName)
scopeName - BeanInfo.getScope()public BeanStream withBeanType(Class<?> beanType)
beanType - BeanInfo.getTypes()public BeanStream withBeanType(org.jboss.jandex.DotName beanTypeName)
beanType - BeanInfo.getTypes()public BeanStream withBeanType(org.jboss.jandex.Type beanType)
beanType - BeanInfo.getTypes()public BeanStream withBeanClass(Class<?> beanClass)
beanClass - BeanInfo.getBeanClass()public BeanStream withTarget()
BeanInfo.getTarget()public BeanStream withBeanClass(org.jboss.jandex.DotName beanClass)
beanClass - BeanInfo.getBeanClass()@SafeVarargs public final BeanStream withQualifier(Class<? extends Annotation>... qualifiers)
qualifier - BeanInfo.getQualifiers()public BeanStream withQualifier(org.jboss.jandex.DotName... qualifierNames)
qualifierNames - BeanInfo.getQualifiers()public BeanStream withName(String name)
name - BeanInfo.getName()public BeanStream withName()
BeanInfo.getName()public Optional<BeanInfo> findByIdentifier(String id)
id - Optional with the matching bean, or an empty Optional if no such bean is foundBeanInfo.getIdentifier()public BeanStream producers()
public BeanStream producerMethods()
public BeanStream producerFields()
public BeanStream classBeans()
public BeanStream syntheticBeans()
public BeanStream namedBeans()
BeanInfo.getName()public BeanStream defaultBeans()
BeanInfo.isDefaultBean()public BeanStream alternativeBeans()
BeanInfo.isAlternative()public BeanStream assignableTo(org.jboss.jandex.Type requiredType, org.jboss.jandex.AnnotationInstance... requiredQualifiers)
requiredType - requiredQualifiers - public boolean isEmpty()
Copyright © 2021 JBoss by Red Hat. All rights reserved.