congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
BeanAttributesImpl.isAlternative
Code IndexAdd Tabnine to your IDE (free)

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

Best Java code snippets using org.apache.webbeans.component.BeanAttributesImpl.isAlternative (Showing top 2 results out of 315)

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

(!beanAttributes.isAlternative() || isEnabledAlternative(at, beanAttributes.getStereotypes())))
org.apache.webbeans.componentBeanAttributesImplisAlternative

Popular methods of BeanAttributesImpl

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

Popular in Java

  • Start an intent from android
  • scheduleAtFixedRate (Timer)
  • setRequestProperty (URLConnection)
  • getApplicationContext (Context)
  • String (java.lang)
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Sublime Text for Python
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now