Codota Logo
BeanAttributesImpl.getTypes
Code IndexAdd Codota to your IDE (free)

How to use
getTypes
method
in
org.apache.webbeans.component.BeanAttributesImpl

Best Java code snippets using org.apache.webbeans.component.BeanAttributesImpl.getTypes (Showing top 2 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: HotswapProjects/HotswapAgent

@SuppressWarnings({ "rawtypes", "unchecked" })
private static void createAnnotatedTypeForExistingBeanClass(BeanManagerImpl beanManager, InjectionTargetBean bean) {
  WebBeansContext wbc = beanManager.getWebBeansContext();
  AnnotatedElementFactory annotatedElementFactory = wbc.getAnnotatedElementFactory();
  // Clear AnnotatedElementFactory caches
  annotatedElementFactory.clear();
  AnnotatedType annotatedType = annotatedElementFactory.newAnnotatedType(bean.getBeanClass());
  ReflectionHelper.set(bean, InjectionTargetBean.class, "annotatedType", annotatedType);
  // Updated members that were set by bean attributes
  BeanAttributesImpl attributes = BeanAttributesBuilder.forContext(wbc).newBeanAttibutes(annotatedType).build();
  ReflectionHelper.set(bean, BeanAttributesImpl.class, "types", attributes.getTypes());
  ReflectionHelper.set(bean, BeanAttributesImpl.class, "qualifiers", attributes.getQualifiers());
  ReflectionHelper.set(bean, BeanAttributesImpl.class, "scope", attributes.getScope());
  ReflectionHelper.set(bean, BeanAttributesImpl.class, "name", attributes.getName());
  ReflectionHelper.set(bean, BeanAttributesImpl.class, "stereotypes", attributes.getStereotypes());
  ReflectionHelper.set(bean, BeanAttributesImpl.class, "alternative", attributes.isAlternative());
  InjectionTargetFactory factory = new InjectionTargetFactoryImpl(annotatedType, bean.getWebBeansContext());
  InjectionTarget injectionTarget = factory.createInjectionTarget(bean);
  ReflectionHelper.set(bean, InjectionTargetBean.class, "injectionTarget", injectionTarget);
  LOGGER.debug("New annotated type created for bean '{}'", bean.getBeanClass());
}
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.componentBeanAttributesImplgetTypes

Popular methods of BeanAttributesImpl

  • <init>
  • getStereotypes
  • isAlternative
  • getName
  • getQualifiers
  • getScope

Popular in Java

  • Making http requests using okhttp
  • getApplicationContext (Context)
  • requestLocationUpdates (LocationManager)
  • getSystemService (Context)
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Notification (javax.management)
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