Skip to content

Commit

Permalink
fix SyntheticObserverBuilder copy&paste mistake
Browse files Browse the repository at this point in the history
  • Loading branch information
Ladicek committed Sep 13, 2021
1 parent fd159ab commit 7b81e32
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,11 @@ public interface ObserverInfo {
boolean isAsync();

/**
* Returns the {@link Reception reception type} of this observer. Allows distinguishing
* Returns the {@linkplain Reception reception type} of this observer. Allows distinguishing
* conditional observer methods from always notified observer methods.
* Returns {@link Reception#ALWAYS} if this is a synthetic observer.
*
* @return the reception type of this observer
* @return the reception type of this observer, never {@code null}
*/
Reception reception();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
package jakarta.enterprise.inject.build.compatible.spi;

import jakarta.enterprise.event.Reception;
import jakarta.enterprise.event.TransactionPhase;
import jakarta.enterprise.lang.model.AnnotationInfo;
import jakarta.enterprise.lang.model.declarations.ClassInfo;
import jakarta.enterprise.lang.model.types.Type;

import java.lang.annotation.Annotation;

Expand Down Expand Up @@ -106,7 +104,7 @@ public interface SyntheticObserverBuilder<T> {
* Note that transactional observers can't be asynchronous. If this synthetic observer
* is configured to be both transactional and asynchronous, its registration will fail.
*
* @param transactionPhase the {@link Reception} mode, must not be {@code null}
* @param transactionPhase the {@link TransactionPhase}, must not be {@code null}
* @return this {@code SyntheticObserverBuilder}
* @throws IllegalStateException if this method is called multiple times
*/
Expand All @@ -121,7 +119,7 @@ public interface SyntheticObserverBuilder<T> {
* @param value the parameter value
* @return this {@code SyntheticObserverBuilder}
*/
SyntheticBeanBuilder<T> withParam(String key, boolean value);
SyntheticObserverBuilder<T> withParam(String key, boolean value);

/**
* Adds a {@code boolean} array-valued parameter to the map of event notification parameters.
Expand All @@ -132,7 +130,7 @@ public interface SyntheticObserverBuilder<T> {
* @param value the parameter value
* @return this {@code SyntheticObserverBuilder}
*/
SyntheticBeanBuilder<T> withParam(String key, boolean[] value);
SyntheticObserverBuilder<T> withParam(String key, boolean[] value);

/**
* Adds an {@code int}-valued parameter to the map of event notification parameters.
Expand All @@ -143,7 +141,7 @@ public interface SyntheticObserverBuilder<T> {
* @param value the parameter value
* @return this {@code SyntheticObserverBuilder}
*/
SyntheticBeanBuilder<T> withParam(String key, int value);
SyntheticObserverBuilder<T> withParam(String key, int value);

/**
* Adds an {@code int} array-valued parameter to the map of event notification parameters.
Expand All @@ -154,7 +152,7 @@ public interface SyntheticObserverBuilder<T> {
* @param value the parameter value
* @return this {@code SyntheticObserverBuilder}
*/
SyntheticBeanBuilder<T> withParam(String key, int[] value);
SyntheticObserverBuilder<T> withParam(String key, int[] value);

/**
* Adds a {@code long}-valued parameter to the map of event notification parameters.
Expand All @@ -165,7 +163,7 @@ public interface SyntheticObserverBuilder<T> {
* @param value the parameter value
* @return this {@code SyntheticObserverBuilder}
*/
SyntheticBeanBuilder<T> withParam(String key, long value);
SyntheticObserverBuilder<T> withParam(String key, long value);

/**
* Adds a {@code long} array-valued parameter to the map of event notification parameters.
Expand All @@ -176,7 +174,7 @@ public interface SyntheticObserverBuilder<T> {
* @param value the parameter value
* @return this {@code SyntheticObserverBuilder}
*/
SyntheticBeanBuilder<T> withParam(String key, long[] value);
SyntheticObserverBuilder<T> withParam(String key, long[] value);

/**
* Adds a {@code double}-valued parameter to the map of event notification parameters.
Expand All @@ -187,7 +185,7 @@ public interface SyntheticObserverBuilder<T> {
* @param value the parameter value
* @return this {@code SyntheticObserverBuilder}
*/
SyntheticBeanBuilder<T> withParam(String key, double value);
SyntheticObserverBuilder<T> withParam(String key, double value);

/**
* Adds a {@code double} array-valued parameter to the map of event notification parameters.
Expand All @@ -198,7 +196,7 @@ public interface SyntheticObserverBuilder<T> {
* @param value the parameter value
* @return this {@code SyntheticObserverBuilder}
*/
SyntheticBeanBuilder<T> withParam(String key, double[] value);
SyntheticObserverBuilder<T> withParam(String key, double[] value);

/**
* Adds a {@code String}-valued parameter to the map of event notification parameters.
Expand All @@ -209,7 +207,7 @@ public interface SyntheticObserverBuilder<T> {
* @param value the parameter value
* @return this {@code SyntheticObserverBuilder}
*/
SyntheticBeanBuilder<T> withParam(String key, String value);
SyntheticObserverBuilder<T> withParam(String key, String value);

/**
* Adds a {@code String} array-valued parameter to the map of event notification parameters.
Expand All @@ -220,7 +218,7 @@ public interface SyntheticObserverBuilder<T> {
* @param value the parameter value
* @return this {@code SyntheticObserverBuilder}
*/
SyntheticBeanBuilder<T> withParam(String key, String[] value);
SyntheticObserverBuilder<T> withParam(String key, String[] value);

/**
* Adds a {@code Class}-valued parameter to the map of event notification parameters.
Expand All @@ -231,7 +229,7 @@ public interface SyntheticObserverBuilder<T> {
* @param value the parameter value
* @return this {@code SyntheticObserverBuilder}
*/
SyntheticBeanBuilder<T> withParam(String key, Class<?> value);
SyntheticObserverBuilder<T> withParam(String key, Class<?> value);
// TODO add a variant that takes a `ClassInfo`? the value would be `Class` at runtime

/**
Expand All @@ -243,7 +241,7 @@ public interface SyntheticObserverBuilder<T> {
* @param value the parameter value
* @return this {@code SyntheticObserverBuilder}
*/
SyntheticBeanBuilder<T> withParam(String key, Class<?>[] value);
SyntheticObserverBuilder<T> withParam(String key, Class<?>[] value);
// TODO add a variant that takes a `ClassInfo[]`? the value would be `Class[]` at runtime

/**
Expand All @@ -258,7 +256,7 @@ public interface SyntheticObserverBuilder<T> {
* @param value the parameter value
* @return this {@code SyntheticObserverBuilder}
*/
SyntheticBeanBuilder<T> withParam(String key, AnnotationInfo value);
SyntheticObserverBuilder<T> withParam(String key, AnnotationInfo value);

/**
* Adds an {@code annotation}-valued parameter to the map of event notification parameters.
Expand All @@ -269,7 +267,7 @@ public interface SyntheticObserverBuilder<T> {
* @param value the parameter value
* @return this {@code SyntheticObserverBuilder}
*/
SyntheticBeanBuilder<T> withParam(String key, Annotation value);
SyntheticObserverBuilder<T> withParam(String key, Annotation value);

/**
* Adds an {@code annotation} array-valued parameter to the map of event notification parameters.
Expand All @@ -283,7 +281,7 @@ public interface SyntheticObserverBuilder<T> {
* @param value the parameter value
* @return this {@code SyntheticObserverBuilder}
*/
SyntheticBeanBuilder<T> withParam(String key, AnnotationInfo[] value);
SyntheticObserverBuilder<T> withParam(String key, AnnotationInfo[] value);

/**
* Adds an {@code annotation} array-valued parameter to the map of event notification parameters.
Expand All @@ -294,7 +292,7 @@ public interface SyntheticObserverBuilder<T> {
* @param value the parameter value
* @return this {@code SyntheticObserverBuilder}
*/
SyntheticBeanBuilder<T> withParam(String key, Annotation[] value);
SyntheticObserverBuilder<T> withParam(String key, Annotation[] value);

/**
* Sets the class of the synthetic observer {@linkplain SyntheticObserver event notification} function.
Expand Down

0 comments on commit 7b81e32

Please sign in to comment.