public boolean isAnyOfElementTypes(final HasAnnotations hasAnnotations, final WiringElementType... types) { for (final WiringElementType t : types) { if (isElementType(t, hasAnnotations)) return true; } return false; }
private Collection<WiringElementType> getWiringTypesForScopeAnnotation(final Class<? extends Annotation> directScope) { if (injectionContext.isElementType(WiringElementType.NormalScopedBean, directScope)) { return Collections.singleton(WiringElementType.NormalScopedBean); } else if (injectionContext.isElementType(WiringElementType.DependentBean, directScope)) { return Arrays.asList(WiringElementType.DependentBean, WiringElementType.PseudoScopedBean); } else { return Collections.singleton(WiringElementType.PseudoScopedBean); } }
private Class<? extends Annotation> getScope(final HasAnnotations annotated) { final Class<? extends Annotation> foundScope = getDirectScope(annotated); return (foundScope != null && !injectionContext.isElementType(WiringElementType.DependentBean, foundScope)) ? foundScope : Dependent.class; }