Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * JBoss, Home of Professional Open Source
   * Copyright 2010, Red Hat, Inc., and individual contributors
   * by the @authors tag. See the copyright.txt in the distribution for a
   * full listing of individual contributors.
   *
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
  * http://www.apache.org/licenses/LICENSE-2.0
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
 package javax.enterprise.inject.spi;
 
 

This event type is thrown by the container before the bean discovery process begins. If any observer method of the BeforeBeanDiscovery event throws an exception, the exception is treated as a definition error by the container.

Author(s):
Pete Muir
David Allen
 
 public interface BeforeBeanDiscovery {
    

Declares an annotation type as a javax.inject.Qualifier qualifier type.

This is only required if you wish to make an annotation a qualifier without adding javax.inject.Qualifier to it.

Parameters:
qualifier The annotation to treat as a qualifier
Throws:
java.lang.IllegalStateException if called outside of the observer method invocation
 
     public void addQualifier(Class<? extends Annotationqualifier);

    

Declares an annotation type as a javax.inject.Qualifier qualifier type.

This is only required if you wish to make an annotation a qualifier without adding javax.inject.Qualifier to it.

Parameters:
qualifier The annotation to treat as a qualifier
Throws:
java.lang.IllegalStateException if called outside of the observer method invocation
Since:
1.1
 
     public void addQualifier(AnnotatedType<? extends Annotationqualifier);

    

Declares an annotation type as a scope type.

This is only required if you wish to make an annotation a scope type without adding the javax.enterprise.context.NormalScope or javax.inject.Scope annotations to it. You can also use this method to override an existing normal scope definition.

Parameters:
scopeType The annotation type to treat as a scope type
normal Indicates if the scope is normal
passivating Indicates if the scope is passivation capable
Throws:
java.lang.IllegalStateException if called outside of the observer method invocation
See also:
AfterBeanDiscovery.addContext(javax.enterprise.context.spi.Context)
 
     public void addScope(Class<? extends AnnotationscopeTypeboolean normalboolean passivating);

    

Declares an annotation type as a stereotype, and specifies its meta-annotations.

This is only required if you wish to make an annotation a stereotype without adding javax.enterprise.inject.Stereotype to it. You can also use this method to override an existing stereotype definition.

Parameters:
stereotype The annotation type to treat as a stereotype
stereotypeDef An optional list of annotations defining the stereotype
Throws:
java.lang.IllegalStateException if called outside of the observer method invocation
    public void addStereotype(Class<? extends AnnotationstereotypeAnnotation... stereotypeDef);

    

Declares an annotation type as an interceptor binding type.

This is only required if you wish to make an annotation an interceptor binding type without adding javax.interceptor.InterceptorBinding to it.

Parameters:
bindingType The annotation type to treat as an interceptor binding type
Throws:
java.lang.IllegalStateException if called outside of the observer method invocation
    public void addInterceptorBinding(AnnotatedType<? extends AnnotationbindingType);

    

Declares an annotation type as an interceptor binding type, and specifies its meta-annotations.

This is only required if you wish to make an annotation an interceptor binding type without adding javax.interceptor.InterceptorBinding to it.

Parameters:
bindingType The annotation type to treat as an interceptor binding type
bindingTypeDef An optional list of annotations defining the interceptor
Throws:
java.lang.IllegalStateException if called outside of the observer method invocation
Since:
1.1
    public void addInterceptorBinding(Class<? extends AnnotationbindingTypeAnnotation... bindingTypeDef);

    

Adds a given AnnotatedType to the set of types which will be scanned during bean discovery.

This method is deprecated from CDI 1.1 and addAnnotatedType(javax.enterprise.inject.spi.AnnotatedType,java.lang.String) should be used instead.

Parameters:
type The AnnotatedType to add for later scanning
Throws:
java.lang.IllegalStateException if called outside of the observer method invocation
    public void addAnnotatedType(AnnotatedType<?> type);

    

Adds a given AnnotatedType to the set of types which will be scanned during bean discovery.

This method allows multiple annotated types, based on the same underlying type, to be defined. AnnotatedTypes discovered by the container use the fully qualified class name of AnnotatedType.getJavaClass() to identify the type.

AfterBeanDiscovery.getAnnotatedType(java.lang.Class,java.lang.String) and AfterBeanDiscovery.getAnnotatedTypes(java.lang.Class) allows annotated types to be obtained by identifier.

Parameters:
type The AnnotatedType to add for later scanning
id The id of the annotated type
Throws:
java.lang.IllegalStateException if called outside of the observer method invocation
Since:
1.1
    public void addAnnotatedType(AnnotatedType<?> typeString id);
New to GrepCode? Check out our FAQ X