Examples of StringBeanIdentifier


Examples of org.jboss.weld.bean.StringBeanIdentifier

public class BeanManagerImplBean extends AbstractBuiltInBean<BeanManagerImpl> {

    private static final Set<Type> TYPES = Arrays2.<Type>asSet(Object.class, BeanManagerImpl.class);

    public BeanManagerImplBean(BeanManagerImpl manager) {
        super(new StringBeanIdentifier(BeanIdentifiers.forBuiltInBean(manager, BeanManagerImpl.class, null)), manager, BeanManagerImpl.class);
    }
View Full Code Here

Examples of org.jboss.weld.bean.StringBeanIdentifier

* @see CDI-92
*/
public class BeanMetadataBean extends AbstractBuiltInMetadataBean<Bean<?>> {

    public BeanMetadataBean(BeanManagerImpl beanManager) {
        this(new StringBeanIdentifier(BeanIdentifiers.forBuiltInBean(beanManager, Bean.class, null)), beanManager);
    }
View Full Code Here

Examples of org.jboss.weld.bean.StringBeanIdentifier

public class BeanManagerBean extends AbstractBuiltInBean<BeanManagerProxy> {

    private static final Set<Type> TYPES = Arrays2.<Type>asSet(Object.class, BeanManager.class);

    public BeanManagerBean(BeanManagerImpl manager) {
        super(new StringBeanIdentifier(BeanIdentifiers.forBuiltInBean(manager, BeanManager.class, null)), manager, BeanManagerProxy.class);
    }
View Full Code Here

Examples of org.jboss.weld.bean.StringBeanIdentifier

    private final T context;
    private final Set<Type> types;
    private final Set<Annotation> qualifiers;

    public ContextBean(ContextHolder<T> contextHolder, BeanManagerImpl beanManager) {
        super(new StringBeanIdentifier(BeanIdentifiers.forBuiltInBean(beanManager, contextHolder.getType(), null)), beanManager, contextHolder.getType());
        this.context = contextHolder.getContext();
        this.types = HierarchyDiscovery.forNormalizedType(contextHolder.getType()).getTypeClosure();
        this.qualifiers = contextHolder.getQualifiers();
    }
View Full Code Here

Examples of org.jboss.weld.bean.StringBeanIdentifier

*
*/
public class InterceptedBeanMetadataBean extends BeanMetadataBean {

    public InterceptedBeanMetadataBean(BeanManagerImpl beanManager) {
        this(new StringBeanIdentifier(BeanIdentifiers.forBuiltInBean(beanManager, Bean.class, Intercepted.class.getSimpleName())), beanManager);
    }
View Full Code Here

Examples of org.jboss.weld.bean.StringBeanIdentifier

        this.bean = bean;
        this.contextId = contextId;
        if (bean instanceof CommonBean<?>) {
            this.beanId = ((CommonBean<?>) bean).getIdentifier();
        } else if (bean instanceof PassivationCapable) {
            this.beanId = new StringBeanIdentifier(((PassivationCapable) bean).getId());
        } else {
            this.beanId = null;
        }
    }
View Full Code Here

Examples of org.jboss.weld.bean.StringBeanIdentifier

        try {
            index.getIndex(null);
        } catch (IllegalArgumentException e) {
            // Expected
        }
        assertNull(index.getIndex(new StringBeanIdentifier("foo")));
    }
View Full Code Here

Examples of org.jboss.weld.bean.StringBeanIdentifier

        for (Bean<?> bean : beans) {
            if (bean instanceof CommonBean<?>) {
                tempIndex.add(((CommonBean<?>) bean).getIdentifier());
            } else if (bean instanceof PassivationCapable) {
                tempIndex.add(new StringBeanIdentifier(((PassivationCapable) bean).getId()));
            }
        }

        Collections.sort(tempIndex, new Comparator<BeanIdentifier>() {
            @Override
View Full Code Here

Examples of org.jboss.weld.bean.StringBeanIdentifier

     *
     * @param id An identifier for the contextual
     * @return the contextual
     */
    public <C extends Contextual<I>, I> C getContextual(String id) {
        return this.<C, I>getContextual(new StringBeanIdentifier(id));
    }
View Full Code Here

Examples of org.jboss.weld.bean.StringBeanIdentifier

        }
        if (contextual instanceof PassivationCapable) {
            // this is an extension-provided passivation capable bean
            PassivationCapable passivationCapable = (PassivationCapable) contextual;
            String id = passivationCapable.getId();
            BeanIdentifier identifier = new StringBeanIdentifier(id);
            passivationCapableContextuals.putIfAbsent(identifier, contextual);
            return identifier;
        } else {
            BeanIdentifier id = contextuals.get(contextual);
            if (id != null) {
                return id;
            } else {
                synchronized (contextual) {
                    id = contextuals.get(contextual);
                    if (id == null) {
                        id = new StringBeanIdentifier(new StringBuilder().append(GENERATED_ID_PREFIX).append(idGenerator.incrementAndGet()).toString());
                        contextuals.put(contextual, id);
                        contextualsInverse.put(id, contextual);
                    }
                    return id;
                }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.