private Set<String> getImplicitBeanClasses(Index index, ResourceRoot resourceRoot) { Set<String> implicitBeanClasses = new HashSet<String>(); for (AnnotationType beanDefiningAnnotation : beanDefiningAnnotations) { List<AnnotationInstance> annotationInstances = index.getAnnotations(beanDefiningAnnotation.getName()); for (ClassInfo classInfo : Indices.getAnnotatedClasses(annotationInstances)) { implicitBeanClasses.add(Indices.CLASS_INFO_TO_FQCN.apply(classInfo)); } } // Make all explicit components into implicit beans so they will support injection for(ComponentDescription description : components.componentDescriptions.get(resourceRoot)) { if(!components.implicitComponentDescriptions.contains(description)) { implicitBeanClasses.add(description.getComponentClassName()); } } return implicitBeanClasses; }
private boolean isAlternativeBean(Class<?> enabledClass, Multimap<Class<?>, Bean<?>> beansByClass) { // check that the class is a bean class of at least one alternative for (Bean<?> bean : beansByClass.get(enabledClass)) { if (bean.isAlternative()) { return true; } } return false; }
private boolean isAlternativeBean(Class<?> enabledClass, Multimap<Class<?>, Bean<?>> beansByClass) { // check that the class is a bean class of at least one alternative for (Bean<?> bean : beansByClass.get(enabledClass)) { if (bean.isAlternative()) { return true; } } return false; }
private boolean isAlternativeBean(Class<?> enabledClass, Multimap<Class<?>, Bean<?>> beansByClass) { // check that the class is a bean class of at least one alternative for (Bean<?> bean : beansByClass.get(enabledClass)) { if (bean.isAlternative()) { return true; } } return false; }
private boolean isAlternativeBean(Class<?> enabledClass, Multimap<Class<?>, Bean<?>> beansByClass) { // check that the class is a bean class of at least one alternative for (Bean<?> bean : beansByClass.get(enabledClass)) { if (bean.isAlternative()) { return true; } } return false; }
/** * Returns unmodifiable collections. Moreover, it does not trigger initialization of a new value collection (i.e. when no collection of values for a * given key exists). */ @Override public Collection<V> get(K key) { if (delegate.containsKey(key)) { return unmodifiableValueCollection(delegate.get(key)); } return Collections.emptyList(); }
@Override public Set<Annotation> getDeclaredMetaAnnotations(Class<? extends Annotation> metaAnnotationType) { return declaredMetaAnnotationMap.containsKey(metaAnnotationType) ? ImmutableSet.copyOf(declaredMetaAnnotationMap.get(metaAnnotationType)) : Collections.<Annotation> emptySet(); }
/** * Returns unmodifiable collections. Moreover, it does not trigger initialization of a new value collection (i.e. when no collection of values for a * given key exists). */ @Override public Collection<V> get(K key) { if (delegate.containsKey(key)) { return unmodifiableValueCollection(delegate.get(key)); } return Collections.emptyList(); }
/** * Returns unmodifiable collections. Moreover, it does not trigger initialization of a new value collection (i.e. when no collection of values for a * given key exists). */ @Override public Collection<V> get(K key) { if (delegate.containsKey(key)) { return unmodifiableValueCollection(delegate.get(key)); } return Collections.emptyList(); }
@Override public Set<Annotation> getDeclaredMetaAnnotations(Class<? extends Annotation> metaAnnotationType) { return declaredMetaAnnotationMap.containsKey(metaAnnotationType) ? ImmutableSet.copyOf(declaredMetaAnnotationMap.get(metaAnnotationType)) : Collections.emptySet(); }
@Override public Set<Annotation> getDeclaredMetaAnnotations(Class<? extends Annotation> metaAnnotationType) { return declaredMetaAnnotationMap.containsKey(metaAnnotationType) ? ImmutableSet.copyOf(declaredMetaAnnotationMap.get(metaAnnotationType)) : Collections.emptySet(); }
@Override public Set<Annotation> getDeclaredMetaAnnotations(Class<? extends Annotation> metaAnnotationType) { return declaredMetaAnnotationMap.containsKey(metaAnnotationType) ? ImmutableSet.copyOf(declaredMetaAnnotationMap.get(metaAnnotationType)) : Collections.emptySet(); }
/** * Returns unmodifiable collections. Moreover, it does not trigger initialization of a new value collection (i.e. when no collection of values for a * given key exists). */ @Override public Collection<V> get(K key) { if (delegate.containsKey(key)) { return unmodifiableValueCollection(delegate.get(key)); } return Collections.emptyList(); }
/** * Returns unmodifiable collections. Moreover, it does not trigger initialization of a new value collection (i.e. when no collection of values for a * given key exists). */ @Override public Collection<V> get(K key) { if (delegate.containsKey(key)) { return unmodifiableValueCollection(delegate.get(key)); } return Collections.emptyList(); }
@Override public Set<Annotation> getDeclaredMetaAnnotations(Class<? extends Annotation> metaAnnotationType) { return declaredMetaAnnotationMap.containsKey(metaAnnotationType) ? ImmutableSet.copyOf(declaredMetaAnnotationMap.get(metaAnnotationType)) : Collections.emptySet(); }
@Override public void registerComponents(ResourceRoot resourceRoot, WildFlyBeanDeploymentArchive beanDeploymentArchive, DeploymentReflectionIndex reflectionIndex) { for (EJBComponentDescription ejb : ejbComponentDescriptions.get(resourceRoot)) { beanDeploymentArchive.addEjbDescriptor(new EjbDescriptorImpl<Object>(ejb, beanDeploymentArchive, reflectionIndex)); beanDeploymentArchive.addBeanClass(ejb.getComponentClassName()); } }
private static boolean isOverridden(EnhancedAnnotatedMethod<?, ?> method, Multimap<MethodSignature, Package> seenMethods) { if (method.isPrivate()) { return false; } else if (method.isPackagePrivate() && seenMethods.containsKey(method.getSignature())) { return seenMethods.get(method.getSignature()).contains(method.getPackage()); } else { return seenMethods.containsKey(method.getSignature()); } }
private static boolean isOverridden(EnhancedAnnotatedMethod<?, ?> method, Multimap<MethodSignature, Package> seenMethods) { if (method.isPrivate()) { return false; } else if (method.isPackagePrivate() && seenMethods.containsKey(method.getSignature())) { return seenMethods.get(method.getSignature()).contains(method.getPackage()); } else { return seenMethods.containsKey(method.getSignature()); } }
private static boolean isOverridden(EnhancedAnnotatedMethod<?, ?> method, Multimap<MethodSignature, Package> seenMethods) { if (method.isPrivate()) { return false; } else if (method.isPackagePrivate() && seenMethods.containsKey(method.getSignature())) { return seenMethods.get(method.getSignature()).contains(method.getPackage()); } else { return seenMethods.containsKey(method.getSignature()); } }
private static boolean isOverridden(EnhancedAnnotatedMethod<?, ?> method, Multimap<MethodSignature, Package> seenMethods) { if (method.isPrivate()) { return false; } else if (method.isPackagePrivate() && seenMethods.containsKey(method.getSignature())) { return seenMethods.get(method.getSignature()).contains(method.getPackage()); } else { return seenMethods.containsKey(method.getSignature()); } }