Codota Logo
BeanAttributesImpl.<init>
Code IndexAdd Codota to your IDE (free)

How to use
org.apache.webbeans.component.BeanAttributesImpl
constructor

Best Java code snippets using org.apache.webbeans.component.BeanAttributesImpl.<init> (Showing top 20 results out of 315)

  • Common ways to obtain BeanAttributesImpl
private void myMethod () {
BeanAttributesImpl b =
  • Codota IconWebBeansContext webBeansContext;AnnotatedType annotatedType;BeanAttributesBuilder.forContext(webBeansContext).newBeanAttibutes(annotatedType).build()
  • Smart code suggestions by Codota
}
origin: org.apache.openwebbeans/openwebbeans-impl

  public BeanAttributes<T> getBeanAttributes()
  {
    // make sure we always have an @Any Qualifier as well.
    qualifiers.add(AnyLiteral.INSTANCE);

    return new BeanAttributesImpl<>(types, qualifiers, scope, name, false, stereotypes, alternative);
  }
}
origin: org.apache.openwebbeans/openwebbeans-jms

return new JmsBean<>(webBeansContext, model, new BeanAttributesImpl<>(apiTypes, qualifiers));
origin: org.apache.openwebbeans/openwebbeans-impl

protected BuiltInOwbBean(
    WebBeansContext webBeansContext,
    WebBeansType webBeansType,
    BeanAttributesImpl<T> beanAttributes,
    Class<T> returnType,
    boolean nullable,
    ProducerFactory<T> producerFactory)
{
  super(webBeansContext, webBeansType, beanAttributes, returnType, nullable);
  Asserts.assertNotNull(producerFactory, "ProducerFactory");
  producer = producerFactory.createProducer(this);
}

origin: org.apache.openwebbeans/openwebbeans-impl

public InjectionPointBean(WebBeansContext webBeansContext)
{
  super(webBeansContext,
     WebBeansType.INJECTIONPOINT,
     new BeanAttributesImpl<>(CollectionUtil.<Type>unmodifiableSet(InjectionPoint.class, Object.class)),
     InjectionPoint.class,
     false,
     new SimpleProducerFactory<>(new InjectionPointProducer()));
}
origin: org.apache.openwebbeans/openwebbeans-impl

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)));
}
origin: org.apache.openwebbeans/openwebbeans-impl

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)));
}
origin: org.apache.openwebbeans/openwebbeans-impl

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)));
}

origin: org.apache.openwebbeans/openwebbeans-impl

public EventMetadataBean(WebBeansContext webBeansContext)
{
  super(webBeansContext,
     WebBeansType.METADATA,
     new BeanAttributesImpl<>(CollectionUtil.<Type>unmodifiableSet(EventMetadata.class, Object.class)),
     EventMetadata.class,
     false,
     new SimpleProducerFactory<>(new EventMetadataProducer()));
}

origin: org.apache.openwebbeans/openwebbeans-impl

@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>>()));
}

origin: org.apache.openwebbeans/openwebbeans-impl

@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)));
}
origin: org.apache.openwebbeans/openwebbeans-impl

@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>>()));
}

origin: org.apache.openwebbeans/openwebbeans-impl

@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>>()));
}

origin: org.apache.openwebbeans/openwebbeans-impl

@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>>()));
}

origin: org.apache.openwebbeans/openwebbeans-impl

/**
 * 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);
}
origin: org.apache.openwebbeans/openwebbeans-impl

/**
 * New WebBeans component class.
 *
 * @return the new component
 */
public <T> NewManagedBean<T> createNewComponent(OwbBean<T> bean, Class<T> type)
{
  Asserts.assertNotNull(bean, "bean");
  if (!EnumSet.of(WebBeansType.MANAGED, WebBeansType.ENTERPRISE, WebBeansType.PRODUCERMETHOD, WebBeansType.PRODUCERFIELD).contains(bean.getWebBeansType()))
  {
    throw new WebBeansConfigurationException("@New annotation on type : " + bean.getBeanClass()
        + " must defined as a simple or an enterprise web bean");
  }
  AnnotatedType<T> annotatedType = webBeansContext.getAnnotatedElementFactory().newAnnotatedType(type);
  BeanAttributesImpl<T> newBeanAttributes = new BeanAttributesImpl<>(bean.getTypes(), Collections.<Annotation>singleton(new NewLiteral(type)));
  NewManagedBean<T> newBean = new NewManagedBean<>(bean.getWebBeansContext(), bean.getWebBeansType(), annotatedType, newBeanAttributes, type, bean.getInjectionPoints());
  //TODO XXX set producer
  return newBean;
}
origin: org.apache.openwebbeans/openwebbeans-impl

/**
 * 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)));
}

origin: org.apache.openwebbeans/openwebbeans-impl

/**
 * Creates a new extesion bean.
 * 
 * @param returnType return type
 * @param webBeansContext
 */
public ExtensionBean(WebBeansContext webBeansContext, Class<T> returnType)
{
  super(webBeansContext,
     WebBeansType.EXTENSION,
     new BeanAttributesImpl<>(
     webBeansContext.getAnnotatedElementFactory().getAnnotatedType(returnType).getTypeClosure(),
     AnnotationUtil.DEFAULT_AND_ANY_ANNOTATION_SET,
     ApplicationScoped.class),
     returnType,
     false,
     new ExtensionProducerFactory<>(webBeansContext.getAnnotatedElementFactory().getAnnotatedType(returnType), webBeansContext));
}
origin: org.apache.openwebbeans/openwebbeans-impl

public BeanAttributesImpl<T> build()
{
  // we need to check the stereotypes first because we might need it to determine the scope
  stereotypes = defineStereotypes(annotated);
  defineScope();
  if (scope == null)
  {
    // this indicates that we shall not use this AnnotatedType to create Beans from it.
    return null;
  }
  defineTypes();
  defineName();
  defineQualifiers();
  defineNullable();
  defineAlternative();
  return new BeanAttributesImpl<>(types, qualifiers, scope, name, nullable, stereotypes, alternative);
}
origin: org.apache.tomee/openejb-core

public NewCdiEjbBean(final CdiEjbBean<T> that) {
  super(that.getBeanContext(), that.getWebBeansContext(), that.getBeanContext().getManagedClass(), that.getAnnotatedType(),
      new NewEjbInjectionTargetFactory<T>(that.getAnnotatedType(), that.getWebBeansContext(), that.getInjectionTarget()),
      new BeanAttributesImpl<T>(that));
  this.id = that.getId() + "NewBean";
  initInternals();
}
origin: org.apache.openwebbeans/openwebbeans-impl

public <T> Bean<T> createNewComponent(Class<T> type)
{
  Asserts.nullCheckForClass(type);
  OpenWebBeansEjbPlugin ejbPlugin = webBeansContext.getPluginLoader().getEjbPlugin();
  if (ejbPlugin != null && ejbPlugin.isNewSessionBean(type))
  {
    return ejbPlugin.defineNewSessionBean(type);
  }
  AnnotatedType<T> annotatedType = webBeansContext.getAnnotatedElementFactory().newAnnotatedType(type);
  BeanAttributesImpl<T> defaultBeanAttributes = BeanAttributesBuilder.forContext(webBeansContext).newBeanAttibutes(annotatedType).build();
  BeanAttributesImpl<T> newBeanAttributes = new BeanAttributesImpl<>(defaultBeanAttributes.getTypes(), Collections.<Annotation>singleton(new NewLiteral(type)));
  // TODO replace this by InjectionPointBuilder
  ManagedBeanBuilder<T, ManagedBean<T>> beanBuilder = new ManagedBeanBuilder<>(webBeansContext, annotatedType, newBeanAttributes, false);
  NewManagedBean<T> newBean
    = new NewManagedBean<>(webBeansContext, WebBeansType.MANAGED, annotatedType, newBeanAttributes, type, beanBuilder.getBean().getInjectionPoints());
  return newBean;
}

org.apache.webbeans.componentBeanAttributesImpl<init>

Javadoc

do not remove, this ct is used from within TomEE for example.

Popular methods of BeanAttributesImpl

  • getStereotypes
  • getTypes
  • isAlternative
  • getName
  • getQualifiers
  • getScope

Popular in Java

  • Start an intent from android
  • getApplicationContext (Context)
  • runOnUiThread (Activity)
  • getSharedPreferences (Context)
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Hashtable (java.util)
    Hashtable is a synchronized implementation of Map. All optional operations are supported.Neither key
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • JCheckBox (javax.swing)
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.This exception may include information for locating the er
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now