ServletContextBean(WebBeansContext ctx, ServletContext context) { super(ctx, WebBeansType.SERVLET_CONTEXT, ServletContext.class, new SimpleProducerFactory<>( new ProviderBasedProducer<>(ctx, ServletContext.class, new Provider<ServletContext>() { @Override public ServletContext get() { return context; } }, true))); }
ServletRequestBean(WebBeansContext ctx, WebContextsService contexts) { super(ctx, WebBeansType.SERVLET_REQUEST, HttpServletRequest.class, new SimpleProducerFactory<>( new ProviderBasedProducer<>(ctx, HttpServletRequest.class, new Provider<HttpServletRequest>() { @Override public HttpServletRequest get() { ServletRequestContext requestContext = contexts.getRequestContext(false); return requestContext == null ? null : requestContext.getServletRequest(); } }, true))); }
protected InternalBean(final WebBeansContext webBeansContext, final Class<T> api, final Class<?> type) { super(webBeansContext, WebBeansType.MANAGED, api, new SimpleProducerFactory<T>( new ProviderBasedProducer<>(webBeansContext, type, new OpenEJBComponentProvider(webBeansContext, type), false))); this.id = "openejb#container#" + api.getName(); }
public InjectionPointBean(WebBeansContext webBeansContext) { super(webBeansContext, WebBeansType.INJECTIONPOINT, new BeanAttributesImpl<>(CollectionUtil.<Type>unmodifiableSet(InjectionPoint.class, Object.class)), InjectionPoint.class, false, new SimpleProducerFactory<>(new InjectionPointProducer())); }
public InterceptionFactoryBean(WebBeansContext webBeansContext) { super(webBeansContext, WebBeansType.INTERCEPTIONFACTORY, new BeanAttributesImpl<>( CollectionUtil.<Type>unmodifiableSet(InterceptionFactory.class, Object.class), AnnotationUtil.DEFAULT_AND_ANY_ANNOTATION_SET), InterceptionFactory.class, false, new SimpleProducerFactory<>(new InterceptionFactoryProducer(webBeansContext))); }
public RequestContextControllerBean(WebBeansContext webBeansContext) { super(webBeansContext, WebBeansType.MANAGER, new BeanAttributesImpl<>(CollectionUtil.unmodifiableSet(RequestContextController.class, Object.class), AnnotationUtil.DEFAULT_AND_ANY_ANNOTATION_SET), RequestContextController.class, false, new SimpleProducerFactory<>(new RequestContextControllerProducer(webBeansContext))); }
public EventMetadataBean(WebBeansContext webBeansContext) { super(webBeansContext, WebBeansType.METADATA, new BeanAttributesImpl<>(CollectionUtil.<Type>unmodifiableSet(EventMetadata.class, Object.class)), EventMetadata.class, false, new SimpleProducerFactory<>(new EventMetadataProducer())); }
public BeanManagerBean(WebBeansContext webBeansContext) { super(webBeansContext, WebBeansType.MANAGER, new BeanAttributesImpl<>(CollectionUtil.<Type>unmodifiableSet(BeanManager.class, Object.class), AnnotationUtil.DEFAULT_AND_ANY_ANNOTATION_SET), BeanManager.class, false, new SimpleProducerFactory<>(new BeanManagerProducer(webBeansContext))); }
public ValidatorFactoryBean(WebBeansContext webBeansContext) { super(webBeansContext, WebBeansType.VALIDATIONFACT, ValidatorFactory.class, new SimpleProducerFactory<>( new ProviderBasedProducer<>(webBeansContext, ValidatorFactory.class, new ValidatorFactoryProvider(webBeansContext), true))); }
public ValidatorBean(WebBeansContext webBeansContext) { super(webBeansContext, WebBeansType.VALIDATION, Validator.class, new SimpleProducerFactory<>(new ProviderBasedProducer<>(webBeansContext, Validator.class, new ValidatorProvider(webBeansContext), true))); }
@SuppressWarnings("serial") public InterceptorMetadataBean(WebBeansContext webBeansContext) { super(webBeansContext, WebBeansType.METADATA, new BeanAttributesImpl<>(CollectionUtil.<Type>unmodifiableSet(Interceptor.class, Object.class)), new TypeLiteral<Interceptor<T>>(){}.getRawType(), false, new SimpleProducerFactory<>(new MetadataProducer<Interceptor<T>>())); }
public PrincipalBean(final WebBeansContext webBeansContext, final boolean proxy) { super(webBeansContext, WebBeansType.PRINCIPAL, Principal.class, new SimpleProducerFactory<>(new ProviderBasedProducer<>(webBeansContext, Principal.class, new PrincipalProvider(webBeansContext), proxy))); }
@SuppressWarnings("serial") public InstanceBean(WebBeansContext webBeansContext) { super(webBeansContext, WebBeansType.INSTANCE, new BeanAttributesImpl(CollectionUtil.unmodifiableSet(Instance.class, Provider.class, Object.class)), new TypeLiteral<Instance<T>>(){}.getRawType(), false, new SimpleProducerFactory(new InstanceProducer(webBeansContext))); }
@SuppressWarnings("serial") public DecoratorMetadataBean(WebBeansContext webBeansContext) { super(webBeansContext, WebBeansType.METADATA, new BeanAttributesImpl<>(CollectionUtil.<Type>unmodifiableSet(Decorator.class, Object.class)), new TypeLiteral<Decorator<T>>(){}.getRawType(), false, new SimpleProducerFactory<>(new MetadataProducer<Decorator<T>>())); }
@SuppressWarnings("serial") public BeanMetadataBean(WebBeansContext webBeansContext) { super(webBeansContext, WebBeansType.METADATA, new BeanAttributesImpl<>(CollectionUtil.<Type>unmodifiableSet(Bean.class, Contextual.class, Object.class)), new TypeLiteral<Bean<T>>(){}.getRawType(), false, new SimpleProducerFactory<>(new MetadataProducer<Bean<T>>())); }
public UserTransactionBean(WebBeansContext webBeansContext) { super(webBeansContext, WebBeansType.USERTRANSACTION, UserTransaction.class, new SimpleProducerFactory<>( new ProviderBasedProducer<>(webBeansContext, UserTransaction.class, new UserTransactionProvider(webBeansContext), true))); }
@SuppressWarnings("serial") public InterceptedOrDecoratedBeanMetadataBean(WebBeansContext webBeansContext) { super(webBeansContext, WebBeansType.METADATA, new BeanAttributesImpl<>( CollectionUtil.<Type>unmodifiableSet(Bean.class, Contextual.class, Object.class), CollectionUtil.<Annotation>unmodifiableSet(new AnnotationLiteral<Intercepted>() { }, new AnnotationLiteral<Decorated>() { })), new TypeLiteral<Bean<T>>(){}.getRawType(), false, new SimpleProducerFactory<>(new BeanMetadataProducer<Bean<T>>())); }
/** * Default constructor. * @param webBeansContext */ public ConversationBean(WebBeansContext webBeansContext) { super(webBeansContext, WebBeansType.CONVERSATION, new BeanAttributesImpl<>( CollectionUtil.<Type>unmodifiableSet(Conversation.class, ConversationImpl.class, Object.class), AnnotationUtil.DEFAULT_AND_ANY_ANNOTATION_SET, RequestScoped.class, "javax.enterprise.context.conversation", false, Collections.<Class<? extends Annotation>>emptySet(), false), ConversationImpl.class, false, new SimpleProducerFactory<>( new ConversationProducer(webBeansContext.getAnnotatedElementFactory().newAnnotatedType(ConversationImpl.class), webBeansContext))); setEnabled(true); }
/** * Creates a new instance of event bean. * @param webBeansContext */ @SuppressWarnings("serial") public EventBean(WebBeansContext webBeansContext) { super(webBeansContext, WebBeansType.OBSERVABLE, new BeanAttributesImpl<>(CollectionUtil.<Type>unmodifiableSet(new TypeLiteral<Event<T>>() { }.getRawType(), Object.class)), new TypeLiteral<Event<T>>(){}.getRawType(), false, new SimpleProducerFactory<>(new EventProducer<T>(webBeansContext))); }