diff --git a/hibernate-core/src/main/java/org/hibernate/jpa/event/internal/AbstractCallback.java b/hibernate-core/src/main/java/org/hibernate/jpa/event/internal/AbstractCallback.java index 6a197d2263..e7441e2a89 100644 --- a/hibernate-core/src/main/java/org/hibernate/jpa/event/internal/AbstractCallback.java +++ b/hibernate-core/src/main/java/org/hibernate/jpa/event/internal/AbstractCallback.java @@ -14,11 +14,11 @@ import org.hibernate.jpa.event.spi.CallbackType; * * @author Steve Ebersole */ -public abstract class AbstractCallback implements Callback { +abstract class AbstractCallback implements Callback { + private final CallbackType callbackType; - @SuppressWarnings("WeakerAccess") - public AbstractCallback(CallbackType callbackType) { + AbstractCallback(CallbackType callbackType) { this.callbackType = callbackType; } diff --git a/hibernate-core/src/main/java/org/hibernate/jpa/event/internal/EmbeddableCallback.java b/hibernate-core/src/main/java/org/hibernate/jpa/event/internal/EmbeddableCallback.java index d25356f26b..8111e0b2f6 100644 --- a/hibernate-core/src/main/java/org/hibernate/jpa/event/internal/EmbeddableCallback.java +++ b/hibernate-core/src/main/java/org/hibernate/jpa/event/internal/EmbeddableCallback.java @@ -17,12 +17,12 @@ import org.hibernate.property.access.spi.Getter; * * @author Vlad Mihalcea */ -public class EmbeddableCallback extends AbstractCallback { +final class EmbeddableCallback extends AbstractCallback { + private final Getter embeddableGetter; private final Method callbackMethod; - @SuppressWarnings("WeakerAccess") - public EmbeddableCallback(Getter embeddableGetter, Method callbackMethod, CallbackType callbackType) { + EmbeddableCallback(Getter embeddableGetter, Method callbackMethod, CallbackType callbackType) { super( callbackType ); this.embeddableGetter = embeddableGetter; this.callbackMethod = callbackMethod; diff --git a/hibernate-core/src/main/java/org/hibernate/jpa/event/internal/EntityCallback.java b/hibernate-core/src/main/java/org/hibernate/jpa/event/internal/EntityCallback.java index 748868e2e7..8bae4ed6a7 100644 --- a/hibernate-core/src/main/java/org/hibernate/jpa/event/internal/EntityCallback.java +++ b/hibernate-core/src/main/java/org/hibernate/jpa/event/internal/EntityCallback.java @@ -17,11 +17,11 @@ import org.hibernate.jpa.event.spi.CallbackType; * @author Kabir Khan * @author Steve Ebersole */ -public class EntityCallback extends AbstractCallback { +final class EntityCallback extends AbstractCallback { + private final Method callbackMethod; - @SuppressWarnings("WeakerAccess") - public EntityCallback(Method callbackMethod, CallbackType callbackType) { + EntityCallback(Method callbackMethod, CallbackType callbackType) { super( callbackType ); this.callbackMethod = callbackMethod; } diff --git a/hibernate-core/src/main/java/org/hibernate/jpa/event/internal/ListenerCallback.java b/hibernate-core/src/main/java/org/hibernate/jpa/event/internal/ListenerCallback.java index 0bd454f8ea..e47c47a4d7 100644 --- a/hibernate-core/src/main/java/org/hibernate/jpa/event/internal/ListenerCallback.java +++ b/hibernate-core/src/main/java/org/hibernate/jpa/event/internal/ListenerCallback.java @@ -18,12 +18,12 @@ import org.hibernate.resource.beans.spi.ManagedBean; * @author Kabir Khan * @author Steve Ebersole */ -public class ListenerCallback extends AbstractCallback { +class ListenerCallback extends AbstractCallback { + private final Method callbackMethod; private final ManagedBean listenerManagedBean; - @SuppressWarnings("WeakerAccess") - public ListenerCallback(ManagedBean listenerManagedBean, Method callbackMethod, CallbackType callbackType) { + ListenerCallback(ManagedBean listenerManagedBean, Method callbackMethod, CallbackType callbackType) { super( callbackType ); this.listenerManagedBean = listenerManagedBean; this.callbackMethod = callbackMethod;