Refine search
private void setExtensions(Iterable<Metadata<Extension>> extensions) { this.extensions = new ArrayList<Metadata<? extends Extension>>(); Iterables.addAll(this.extensions, extensions); }
private <T> Iterable<T> createDynamicGlobalIterable(final Function<BeanManagerImpl, Iterable<T>> transform) { return flatMap(managers, transform); }
List<Class<?>> globallyEnabledDecorators = getDecoratorList(null); ImmutableList.Builder<Class<?>> moduleInterceptorsBuilder = ImmutableList.<Class<?>>builder(); moduleInterceptorsBuilder.addAll(globallyEnabledInterceptors); ImmutableList.Builder<Class<?>> moduleDecoratorsBuilder = ImmutableList.<Class<?>>builder(); moduleDecoratorsBuilder.addAll(globallyEnabledDecorators); deployment)); alternativeClasses = ImmutableSet.copyOf(Iterables.transform(beansXml.getEnabledAlternativeClasses(), loader)); alternativeStereotypes = cast(ImmutableSet.copyOf(Iterables.transform(beansXml.getEnabledAlternativeStereotypes(), loader))); } else { alternativeClasses = Collections.emptySet();
@Override public String toString() { return "BeanDeploymentModule [id=" + id + ", web=" + web + ", managers=" + Iterables.transform(managers, BEAN_MANAGER_TO_ID) + "]"; } }
/** * Combine the iterables into a single one. * * @param iterables * @return a single combined iterable */ public static <T> Iterable<T> concat(final Iterable<? extends Iterable<? extends T>> iterables) { return () -> Iterators.concat(iterators(iterables)); }
/** * Combine the iterables into a single one. */ public static <T> Iterable<T> concat(Iterable<? extends T> a, Iterable<? extends T> b) { return concat(Arrays.asList(a, b)); }
public boolean associate(HttpServletRequest request) { // At this point the bean store should never be set - see also HttpContextLifecycle#nestedInvocationGuard BoundBeanStore beanStore = getBeanStore(); if (beanStore != null) { ContextLogger.LOG.beanStoreLeakDuringAssociation(this.getClass().getName(), request); if (ContextLogger.LOG.isDebugEnabled()) { ContextLogger.LOG.beanStoreLeakAffectedBeanIdentifiers(this.getClass().getName(), Iterables.toMultiRowString(beanStore)); } } // We always associate a new bean store to avoid possible leaks (security threats) beanStore = new RequestBeanStore(request, namingScheme); setBeanStore(beanStore); beanStore.attach(); return true; }
@Override public String toString() { return "BeanDeploymentModule [id=" + id + ", web=" + web + ", managers=" + Iterables.transform(managers, BeanManagerImpl::getId) + "]"; } }
@Override public Iterator<T> iterator() { return Iterators.concat(iterators(iterables)); } };
/** * Combine the iterables into a single one. */ public static <T> Iterable<T> concat(Iterable<? extends T> a, Iterable<? extends T> b) { return concat(Arrays.asList(a, b)); }
public boolean associate(HttpServletRequest request) { // At this point the bean store should never be set - see also HttpContextLifecycle#nestedInvocationGuard BoundBeanStore beanStore = getBeanStore(); if (beanStore != null) { ContextLogger.LOG.beanStoreLeakDuringAssociation(this.getClass().getName(), request); if (ContextLogger.LOG.isDebugEnabled()) { ContextLogger.LOG.beanStoreLeakAffectedBeanIdentifiers(this.getClass().getName(), Iterables.toMultiRowString(beanStore)); } } // We always associate a new bean store to avoid possible leaks (security threats) beanStore = new RequestBeanStore(request, namingScheme); setBeanStore(beanStore); beanStore.attach(); return true; }
public IterativeWorkerTaskFactory(Iterable<? extends T> iterable) { this.queue = new ConcurrentLinkedQueue<T>(); Iterables.addAll(queue, iterable); }