Skip to content

Commit

Permalink
Small adjustments to javadoc of ExludeBean[Classes].
Browse files Browse the repository at this point in the history
  • Loading branch information
manovotn committed Apr 4, 2019
1 parent 21c4444 commit d8b41e1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
10 changes: 5 additions & 5 deletions junit5/src/main/java/org/jboss/weld/junit5/auto/ExcludeBean.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@
import java.lang.annotation.Target;

/**
* {@code ExcludeBean} excludes a class, or all classes within a hierarchy, that include a bean defining annotation (
* {@code ExcludeBean} excludes a bean, or multiple beans, that include a bean defining annotation (
* e.g. scope) from automatic discovery. This can be helpful to allow replacing a bean class with a different
* implementation; typically a mock.
*
* The type of bean to exclude is implied by the annotated field's type or annotated method's return type. If the type
* is a base class or interface all beans in the hierarchy will be excluded.
* is a base class or interface all beans extending/implementing that type will be excluded.
*
* NOTE: This annotation will only exclude beans defined by class annotations. It will not exclude beans of the
* implied type that are defined by {@link javax.enterprise.inject.Produces producer methods or fields}. Also, the
* current implementation excludes beans based on type, disregarding any qualifiers that are specified.
* implied type that are defined by {@link javax.enterprise.inject.Produces} producer methods/fields or synthetic
* beans. Also, current implementation excludes beans based on type, disregarding any qualifiers that are specified.
*
* Example:
* <pre>
Expand All @@ -27,7 +27,7 @@
* SomeFoo someFoo; // SomeFoo depends upon application scoped bean Foo
*
* &#64;Produces
* &#64;ExcludeBean // Excludes Foo bean class from automatic discovery
* &#64;ExcludeBean // Excludes beans with type Foo from automatic discovery
* Foo mockFoo = mock(Foo.class); // mockFoo is now produced in place of original Foo impl
*
* &#64;Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@
* {@code ExcludeBeanClasses} excludes a set of classes with bean defining annotations (e.g. scopes) from automatic
* discovery. This can be helpful to allow replacing bean classes with a different implementation; typically a mock.
*
* This annotation works as an inverse of {@link AddBeanClasses} hence usually requires actual bean implementation
* classes as parameters.
*
* NOTE: This annotation will only exclude beans defined by class annotations. It will not exclude beans of the
* specified type that are defined by {@link javax.enterprise.inject.Produces producer methods or fields}.
* specified type that are defined by {@link javax.enterprise.inject.Produces} producer methods/fields or synthetic
* beans.
*
* Example:
* <pre>
Expand Down

0 comments on commit d8b41e1

Please sign in to comment.