Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add SyntheticBeanBuilder.withInjectionPoint() #833

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* Instances are not reusable. For each synthetic bean, new instance
* must be created by {@link SyntheticComponents#addBean(Class)}.
*
* @param <T> the bean class of this synthetic bean
* @param <T> the implementation class of this synthetic bean
* @since 4.0
*/
public interface SyntheticBeanBuilder<T> {
Expand Down Expand Up @@ -435,6 +435,58 @@ public interface SyntheticBeanBuilder<T> {
*/
SyntheticBeanBuilder<T> withParam(String key, InvokerInfo[] value);

/**
* Declares that the creation or destruction function for this synthetic bean will potentially
* look up a bean of given {@code type} with given {@code qualifiers}.
* <p>
* The registered injection points will be validated.
*
* @param type the type of the bean that may be looked up in the creation/destruction function
* @param qualifiers the qualifiers of the bean that may be looked up in the creation/destruction function
* @return this {@code SyntheticBeanBuilder}
* @since 5.0
*/
SyntheticBeanBuilder<T> withInjectionPoint(Class<?> type, Annotation... qualifiers);

/**
* Declares that the creation or destruction function for this synthetic bean will potentially
* look up a bean of given {@code type} with given {@code qualifiers}.
* <p>
* The registered injection points will be validated.
*
* @param type the type of the bean that may be looked up in the creation/destruction function
* @param qualifiers the qualifiers of the bean that may be looked up in the creation/destruction function
* @return this {@code SyntheticBeanBuilder}
* @since 5.0
*/
SyntheticBeanBuilder<T> withInjectionPoint(Class<?> type, AnnotationInfo... qualifiers);

/**
* Declares that the creation or destruction function for this synthetic bean will potentially
* look up a bean of given {@code type} with given {@code qualifiers}.
* <p>
* The registered injection points will be validated.
*
* @param type the type of the bean that may be looked up in the creation/destruction function
* @param qualifiers the qualifiers of the bean that may be looked up in the creation/destruction function
* @return this {@code SyntheticBeanBuilder}
* @since 5.0
*/
SyntheticBeanBuilder<T> withInjectionPoint(Type type, Annotation... qualifiers);

/**
* Declares that the creation or destruction function for this synthetic bean will potentially
* look up a bean of given {@code type} with given {@code qualifiers}.
* <p>
* The registered injection points will be validated.
*
* @param type the type of the bean that may be looked up in the creation/destruction function
* @param qualifiers the qualifiers of the bean that may be looked up in the creation/destruction function
* @return this {@code SyntheticBeanBuilder}
* @since 5.0
*/
SyntheticBeanBuilder<T> withInjectionPoint(Type type, AnnotationInfo... qualifiers);

/**
* Sets the class of the synthetic bean {@linkplain SyntheticBeanCreator creation} function.
* CDI container will create an instance of the creation function every time when it needs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* to obtain an instance of the synthetic bean. Implementations must be {@code public}
* classes with a {@code public} zero-parameter constructor; they must not be beans.
*
* @param <T> the bean class of the synthetic bean
* @param <T> the implementation class of the synthetic bean
* @since 4.0
*/
public interface SyntheticBeanCreator<T> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* to destroy an instance of the synthetic bean. Implementations must be {@code public}
* classes with a {@code public} zero-parameter constructor; they must not be beans.
*
* @param <T> the bean class of the synthetic bean
* @param <T> the implementation class of the synthetic bean
* @since 4.0
*/
public interface SyntheticBeanDisposer<T> {
Expand Down
Loading