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

How to use
configureQualifier
method
in
javax.enterprise.inject.spi.BeforeBeanDiscovery

Best Java code snippets using javax.enterprise.inject.spi.BeforeBeanDiscovery.configureQualifier (Showing top 2 results out of 315)

origin: org.jboss.cdi.tck/cdi-tck-impl

  public void observeBeforeBeanDiscovery(@Observes BeforeBeanDiscovery event) {
    // turn annotation into qualifier
    event.configureQualifier(CustomQualifier.class);
    
    // turn annotation into binding
    event.configureInterceptorBinding(CustomBinding.class);
  }
}
origin: org.apache.geronimo/geronimo-metrics

void letOtherExtensionsUseRegistries(@Observes final BeforeBeanDiscovery beforeBeanDiscovery, final BeanManager beanManager) {
  beforeBeanDiscovery.addQualifier(RegistryType.class);
  beanManager.fireEvent(applicationRegistry);
  beanManager.fireEvent(applicationRegistry, new RegistryTypeImpl(MetricRegistry.Type.APPLICATION));
  beanManager.fireEvent(baseRegistry, new RegistryTypeImpl(MetricRegistry.Type.BASE));
  beanManager.fireEvent(vendorRegistry, new RegistryTypeImpl(MetricRegistry.Type.VENDOR));
  // we make @Metric.name binding (to avoid to write producers relying on injection point)
  beforeBeanDiscovery.configureQualifier(org.eclipse.microprofile.metrics.annotation.Metric.class)
      .methods().stream().filter(method -> method.getAnnotated().getJavaMember().getName().equals("name"))
      .forEach(method -> method.remove(a -> a.annotationType() == Nonbinding.class));
}
javax.enterprise.inject.spiBeforeBeanDiscoveryconfigureQualifier

Javadoc

Obtains a new AnnotatedTypeConfigurator to configure a new javax.enterprise.inject.spi.AnnotatedTypeand declares it as a javax.inject.Qualifier qualifier type.

This is only required if you wish to make an annotation a qualifier without adding Qualifier to it and need to easily add other annotations (like javax.enterprise.util.Nonbinding on its members.

Popular methods of BeforeBeanDiscovery

  • addAnnotatedType
    Adds new annotated type for classes which are not picked up by the CDI container or if you like to a
  • addScope
    Declares a new scope.
  • addInterceptorBinding
    Declare a new interceptor binding via the information from the given AnnotatedType.
  • addQualifier
    Declare a new qualifier via the information from the given AnnotatedType.
  • addStereotype
    Declares a new stereotype.
  • configureInterceptorBinding
    Obtains a new AnnotatedTypeConfigurator to configure a new javax.enterprise.inject.spi.AnnotatedTyp

Popular in Java

  • Parsing JSON documents to java classes using gson
  • findViewById (Activity)
  • requestLocationUpdates (LocationManager)
  • getSystemService (Context)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • JButton (javax.swing)
  • Top 12 Jupyter Notebook Extensions
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