anchor.diff:  
   === The `BeanManager` object
   
  -The nerve center for extending CDI is the `BeanManager` object. The
  -`BeanManager` interface lets us obtain beans, interceptors, decorators,
  -observers and contexts programmatically.
  -
  -[source.JAVA, java]
  ---------------------------------------------------------------------------------------------------------------------------
  -public interface BeanManager {
  -   public Object getReference(Bean<?> bean, Type beanType, CreationalContext<?> ctx);
  -   public Object getInjectableReference(InjectionPoint ij, CreationalContext<?> ctx);
  -   public <T> CreationalContext<T> createCreationalContext(Contextual<T> contextual);
  -   public Set<Bean<?>> getBeans(Type beanType, Annotation... qualifiers);
  -   public Set<Bean<?>> getBeans(String name);
  -   public Bean<?> getPassivationCapableBean(String id);
  -   public <X> Bean<? extends X> resolve(Set<Bean<? extends X>> beans);
  -   public void validate(InjectionPoint injectionPoint);
  -   public void fireEvent(Object event, Annotation... qualifiers);
  -   public <T> Set<ObserverMethod<? super T>> resolveObserverMethods(T event, Annotation... qualifiers);
  -   public List<Decorator<?>> resolveDecorators(Set<Type> types, Annotation... qualifiers);
  -   public List<Interceptor<?>> resolveInterceptors(InterceptionType type, Annotation... interceptorBindings);
  -   public boolean isScope(Class<? extends Annotation> annotationType);
  -   public boolean isNormalScope(Class<? extends Annotation> annotationType);
  -   public boolean isPassivatingScope(Class<? extends Annotation> annotationType);
  -   public boolean isQualifier(Class<? extends Annotation> annotationType);
  -   public boolean isInterceptorBinding(Class<? extends Annotation> annotationType);
  -   public boolean isStereotype(Class<? extends Annotation> annotationType);
  -   public Set<Annotation> getInterceptorBindingDefinition(Class<? extends Annotation> bindingType);
  -   public Set<Annotation> getStereotypeDefinition(Class<? extends Annotation> stereotype);
  -   public boolean areQualifiersEquivalent(Annotation qualifier1, Annotation qualifier2);
  -   public boolean areInterceptorBindingsEquivalent(Annotation interceptorBinding1, Annotation interceptorBinding2);
  -   public int getQualifierHashCode(Annotation qualifier);
  -   public int getInterceptorBindingHashCode(Annotation interceptorBinding);
  -   public Context getContext(Class<? extends Annotation> scopeType);
  -   public ELResolver getELResolver();
  -   public ExpressionFactory wrapExpressionFactory(ExpressionFactory expressionFactory);
  -   public <T> AnnotatedType<T> createAnnotatedType(Class<T> type);
  -   public <T> InjectionTarget<T> createInjectionTarget(AnnotatedType<T> type);
  -   public <T> InjectionTargetFactory<T> getInjectionTargetFactory(AnnotatedType<T> annotatedType);
  -   public <X> ProducerFactory<X> getProducerFactory(AnnotatedField<? super X> field, Bean<X> declaringBean);
  -   public <X> ProducerFactory<X> getProducerFactory(AnnotatedMethod<? super X> method, Bean<X> declaringBean);
  -   public <T> BeanAttributes<T> createBeanAttributes(AnnotatedType<T> type);
  -   public BeanAttributes<?> createBeanAttributes(AnnotatedMember<?> type);
  -   public <T> Bean<T> createBean(BeanAttributes<T> attributes, Class<T> beanClass,
  -   public <T, X> Bean<T> createBean(BeanAttributes<T> attributes, Class<X> beanClass, ProducerFactory<X> producerFactory);
  -   public InjectionPoint createInjectionPoint(AnnotatedField<?> field);
  -   public InjectionPoint createInjectionPoint(AnnotatedParameter<?> parameter);
  -   public <T extends Extension> T getExtension(Class<T> extensionClass);
  -}
  ---------------------------------------------------------------------------------------------------------------------------
  +The nerve center for extending CDI is the `BeanManager` object.
  +The `BeanManager` interface provides operations of use to portable extensions, e.g. lets us obtain beans, interceptors, decorators, observers and contexts programmatically.
  +Note that some of the methods may not be called before the `AfterBeanDiscovery` event is fired, e.g. `BeanManager.getBeans()`.
  +Furthermore, the `BeanManager.getReference()` and `BeanManager.getInjectableReference()` methods may not be called  before the `AfterDeploymentValidation` event is fired.
  +See also the javadoc for more details.
  +
  +Any container lifecycle event observer method can obtain an injected `BeanManager` reference:
  +
  +[source.JAVA, java]
  +----------------------------------------------------------------------------------------
  +void afterBeanDiscovery(@Observes AfterBeanDiscovery event, BeanManager beanManager) {};
  +----------------------------------------------------------------------------------------
   
   Any bean or other Java EE component which supports injection can obtain
   an instance of `BeanManager` via injection:
  
positive.code: -----------------------------------------------------------------
  public interface ProcessInjectionPoint<T, X> {
      public InjectionPoint getInjectionPoint();
      public void setInjectionPoint(InjectionPoint injectionPoint);
      public void addDefinitionError(Throwable t);
  }
  
negative.code: 
  public class SecurityManagerExtension implements Extension {
  
      void afterBeanDiscovery(@Observes AfterBeanDiscovery event, BeanManager bm) {
          event.addBean()
             /* read annotations of the class and create an InjectionTarget used to instantiate the class and inject dependencies */
             .read(bm.createAnnotatedType(SecurityManager.class))
             .beanClass(SecurityManager.class)
             .scope(ApplicationScoped.class)
             .name("securityManager");
      }
  
  }
  -------------------------------------------------------------------------------------------
  
  But a portable extension can also mess with beans that are discovered automatically by the container.
  
  === Configuring an `AnnotatedType`
  
  One of the most interesting things that an extension class can do is
  process the annotations of a bean class _before_ the container builds
  