Codota Logo
BeanManager.isQualifier
Code IndexAdd Codota to your IDE (free)

How to use
isQualifier
method
in
javax.enterprise.inject.spi.BeanManager

Best Java code snippets using javax.enterprise.inject.spi.BeanManager.isQualifier (Showing top 20 results out of 315)

  • Common ways to obtain BeanManager
private void myMethod () {
BeanManager b =
  • Codota IconCDI.current().getBeanManager()
  • Codota IconBeanManagerProvider.getInstance().getBeanManager()
  • Codota IconWeldContainer container;container.getBeanManager()
  • Smart code suggestions by Codota
}
origin: apache/deltaspike

private List<Annotation> resolveQualifiers(Set<Annotation> annotations, BeanManager beanManager)
{
  List<Annotation> result = new ArrayList<Annotation>();
  for (Annotation annotation : annotations)
  {
    if (beanManager.isQualifier(annotation.annotationType()))
    {
      result.add(annotation);
    }
  }
  return result;
}
origin: picketlink/picketlink

private List<Annotation> resolveQualifiers(Set<Annotation> annotations, BeanManager beanManager)
{
  List<Annotation> result = new ArrayList<Annotation>();
  for (Annotation annotation : annotations)
  {
    if (beanManager.isQualifier(annotation.annotationType()))
    {
      result.add(annotation);
    }
  }
  return result;
}
origin: org.apache.camel/camel-test-cdi

FrameworkMethodInjectionPoint(Method method, int position, BeanManager manager) {
  this.method = method;
  this.annotated = new FrameworkAnnotatedParameter(method, position, manager);
  this.type = method.getGenericParameterTypes()[position];
  this.qualifiers = new HashSet<>();
  for (Annotation annotation : method.getParameterAnnotations()[position]) {
    if (manager.isQualifier(annotation.annotationType())) {
      qualifiers.add(annotation);
    }
  }
}
origin: org.apache.camel/camel-cdi

public Set<Annotation> getQualifiers() {
  return annotated.getAnnotations().stream()
    .filter(a -> manager.isQualifier(a.annotationType()))
    .collect(toSet());
}
origin: org.jboss.weld.se/weld-se

@Override
public boolean isQualifier(Class<? extends Annotation> annotationType) {
  return delegate().isQualifier(annotationType);
}
origin: org.jboss.cdi.tck/cdi-tck-impl

@Test
@SpecAssertion(section = BM_DETERMINING_ANNOTATION, id = "aa")
public void testDetermineQualifierType() {
  assertTrue(getCurrentManager().isQualifier(Any.class));
  assertTrue(getCurrentManager().isQualifier(Tame.class));
  assertFalse(getCurrentManager().isQualifier(AnimalStereotype.class));
  assertFalse(getCurrentManager().isQualifier(ApplicationScoped.class));
  assertFalse(getCurrentManager().isQualifier(Transactional.class));
}
origin: weld/core

@Override
public boolean isQualifier(Class<? extends Annotation> annotationType) {
  return delegate().isQualifier(annotationType);
}
origin: weld/core

@Override
public boolean isQualifier(Class<? extends Annotation> annotationType) {
  return delegate().isQualifier(annotationType);
}
origin: weld/core

@Override
public boolean isQualifier(Class<? extends Annotation> annotationType) {
  return delegate().isQualifier(annotationType);
}
origin: org.jboss.weld.se/weld-se-shaded

@Override
public boolean isQualifier(Class<? extends Annotation> annotationType) {
  return delegate().isQualifier(annotationType);
}
origin: org.apache.camel/camel-cdi

static Set<Annotation> getQualifiers(Annotated annotated, BeanManager manager) {
  return annotated.getAnnotations().stream()
    .filter(annotation -> manager.isQualifier(annotation.annotationType()))
    .collect(collectingAndThen(toSet(),
      qualifiers -> {
        if (qualifiers.isEmpty()) {
          qualifiers.add(DEFAULT);
        }
        qualifiers.add(ANY);
        return qualifiers;
      })
    );
}
origin: org.jboss.jsr299.tck/jsr299-tck-impl

@Test(groups="rewrite")
@SpecAssertion(section = "11.3.13", id = "aa")
// Should also check a custom bindingtype
public void testDetermineBindingType()
{
 assert getCurrentManager().isQualifier(Tame.class);
 assert !getCurrentManager().isQualifier(AnimalStereotype.class);
 assert !getCurrentManager().isQualifier(ApplicationScoped.class);
 assert !getCurrentManager().isQualifier(Transactional.class);
}
origin: org.jboss.weld.se/weld-se-shaded

public static void validateQualifiers(Iterable<Annotation> qualifiers, BeanManager manager, Object definer,
    String nullErrorMessage) {
  if (qualifiers == null) {
    throw MetadataLogger.LOG.qualifiersNull(nullErrorMessage, definer);
  }
  for (Annotation annotation : qualifiers) {
    if (!manager.isQualifier(annotation.annotationType())) {
      throw MetadataLogger.LOG.notAQualifier(annotation.annotationType(), definer);
    }
  }
}
origin: org.jboss.weld.se/weld-se

public static void validateQualifiers(Iterable<Annotation> qualifiers, BeanManager manager, Object definer,
    String nullErrorMessage) {
  if (qualifiers == null) {
    throw MetadataLogger.LOG.qualifiersNull(nullErrorMessage, definer);
  }
  for (Annotation annotation : qualifiers) {
    if (!manager.isQualifier(annotation.annotationType())) {
      throw MetadataLogger.LOG.notAQualifier(annotation.annotationType(), definer);
    }
  }
}
origin: org.jboss.weld.servlet/weld-servlet-shaded

public static void validateQualifiers(Iterable<Annotation> qualifiers, BeanManager manager, Object definer,
    String nullErrorMessage) {
  if (qualifiers == null) {
    throw MetadataLogger.LOG.qualifiersNull(nullErrorMessage, definer);
  }
  for (Annotation annotation : qualifiers) {
    if (!manager.isQualifier(annotation.annotationType())) {
      throw MetadataLogger.LOG.notAQualifier(annotation.annotationType(), definer);
    }
  }
}
origin: weld/core

public static void validateQualifiers(Iterable<Annotation> qualifiers, BeanManager manager, Object definer,
    String nullErrorMessage) {
  if (qualifiers == null) {
    throw MetadataLogger.LOG.qualifiersNull(nullErrorMessage, definer);
  }
  for (Annotation annotation : qualifiers) {
    if (!manager.isQualifier(annotation.annotationType())) {
      throw MetadataLogger.LOG.notAQualifier(annotation.annotationType(), definer);
    }
  }
}
origin: weld/core

public static void validateQualifiers(Iterable<Annotation> qualifiers, BeanManager manager, Object definer,
    String nullErrorMessage) {
  if (qualifiers == null) {
    throw MetadataLogger.LOG.qualifiersNull(nullErrorMessage, definer);
  }
  for (Annotation annotation : qualifiers) {
    if (!manager.isQualifier(annotation.annotationType())) {
      throw MetadataLogger.LOG.notAQualifier(annotation.annotationType(), definer);
    }
  }
}
origin: weld/core

public static void validateQualifiers(Iterable<Annotation> qualifiers, BeanManager manager, Object definer,
    String nullErrorMessage) {
  if (qualifiers == null) {
    throw MetadataLogger.LOG.qualifiersNull(nullErrorMessage, definer);
  }
  for (Annotation annotation : qualifiers) {
    if (!manager.isQualifier(annotation.annotationType())) {
      throw MetadataLogger.LOG.notAQualifier(annotation.annotationType(), definer);
    }
  }
}
origin: org.jboss.cdi.tck/cdi-tck-impl

@SuppressWarnings("serial")
@Test
@SpecAssertion(section = BEFORE_BEAN_DISCOVERY, id = "ab")
public void testAddingQualifierByClass() {
  assertTrue(BeforeBeanDiscoveryObserver.isObserved());
  assertEquals(getBeans(Alligator.class).size(), 0);
  assertEquals(getBeans(Alligator.class, new AnnotationLiteral<Tame>() {
  }).size(), 1);
  assertTrue(getCurrentManager().isQualifier(Tame.class));
}
origin: org.jboss.cdi.tck/cdi-tck-impl

@Test
@SpecAssertions({ @SpecAssertion(section = INIT_EVENTS, id = "be") })
public void testDecoratorIsNotApplied() {
  Foo payload = new Foo(false);
  manager.fireEvent(payload);
  assertTrue(fooObserver.isObserved());
  assertFalse(payload.isDecorated());
  assertTrue(manager.isQualifier(Default.class)); // not decorated
}
javax.enterprise.inject.spiBeanManagerisQualifier

Javadoc

Test the given annotation type to determine if it is a javax.inject.Qualifier.

Popular methods of BeanManager

  • createCreationalContext
    Obtain an instance of a javax.enterprise.context.spi.CreationalContext for the given javax.enterpris
  • getBeans
    Return the set of beans which have the given required type and qualifiers and are available for inje
  • getReference
    Obtains a contextual reference for a certain Bean and a certain bean type of the bean.
  • resolve
    Apply the ambiguous dependency resolution rules to a set of Bean. Note that when called during invoc
  • createAnnotatedType
    Obtain an AnnotatedType that may be used to read the annotations of the given class or interface.
  • createInjectionTarget
    Obtains an InjectionTarget for the given AnnotatedType. The container ignores the annotations and t
  • fireEvent
    Fire an event and notify observers. This method is deprecated from CDI 2.0 and #getEvent()) should b
  • getContext
    Obtains an active javax.enterprise.context.spi.Context for the given javax.enterprise.context .
  • isNormalScope
    Test the given annotation type to determine if it is a javax.enterprise.context.
  • isStereotype
    Test the given annotation type to determine if it is a javax.enterprise.inject.Stereotype.
  • getInjectableReference
    Obtains an injectable reference for a certain InjectionPoint.
  • getELResolver
    Returns a javax.el.ELResolver that resolves beans by EL name.
  • getInjectableReference,
  • getELResolver,
  • isScope,
  • getPassivationCapableBean,
  • getInjectionTargetFactory,
  • getStereotypeDefinition,
  • wrapExpressionFactory,
  • getExtension,
  • isInterceptorBinding

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getSystemService (Context)
  • getSharedPreferences (Context)
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • Kernel (java.awt.image)
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • IsNull (org.hamcrest.core)
    Is the value null?
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
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