diff --git a/independent-projects/arc/runtime/src/main/java/io/quarkus/arc/InstanceHandle.java b/independent-projects/arc/runtime/src/main/java/io/quarkus/arc/InstanceHandle.java index e3845a27ba81a..c03ba183b3dfc 100644 --- a/independent-projects/arc/runtime/src/main/java/io/quarkus/arc/InstanceHandle.java +++ b/independent-projects/arc/runtime/src/main/java/io/quarkus/arc/InstanceHandle.java @@ -2,6 +2,7 @@ import jakarta.enterprise.context.Dependent; import jakarta.enterprise.context.spi.AlterableContext; +import jakarta.enterprise.inject.Instance; /** * Represents an instance handle. @@ -10,7 +11,7 @@ * * @param */ -public interface InstanceHandle extends AutoCloseable { +public interface InstanceHandle extends AutoCloseable, Instance.Handle { /** * diff --git a/independent-projects/arc/runtime/src/main/java/io/quarkus/arc/impl/ArcCDIProvider.java b/independent-projects/arc/runtime/src/main/java/io/quarkus/arc/impl/ArcCDIProvider.java index 30ecfef8a41b8..b8330735d66da 100644 --- a/independent-projects/arc/runtime/src/main/java/io/quarkus/arc/impl/ArcCDIProvider.java +++ b/independent-projects/arc/runtime/src/main/java/io/quarkus/arc/impl/ArcCDIProvider.java @@ -69,6 +69,16 @@ public void destroy(Object instance) { this.instanceDelegate.destroy(instance); } + @Override + public Handle getHandle() { + return this.instanceDelegate.getHandle(); + } + + @Override + public Iterable> handles() { + return this.instanceDelegate.handles(); + } + @Override public Iterator iterator() { return instanceDelegate.iterator(); diff --git a/independent-projects/arc/runtime/src/main/java/io/quarkus/arc/impl/BeanManagerImpl.java b/independent-projects/arc/runtime/src/main/java/io/quarkus/arc/impl/BeanManagerImpl.java index b2025ae93550e..2a5a58d700c81 100644 --- a/independent-projects/arc/runtime/src/main/java/io/quarkus/arc/impl/BeanManagerImpl.java +++ b/independent-projects/arc/runtime/src/main/java/io/quarkus/arc/impl/BeanManagerImpl.java @@ -23,7 +23,6 @@ import jakarta.enterprise.inject.spi.Decorator; import jakarta.enterprise.inject.spi.Extension; import jakarta.enterprise.inject.spi.InjectionPoint; -import jakarta.enterprise.inject.spi.InjectionTarget; import jakarta.enterprise.inject.spi.InjectionTargetFactory; import jakarta.enterprise.inject.spi.InterceptionFactory; import jakarta.enterprise.inject.spi.InterceptionType; @@ -35,7 +34,6 @@ import java.lang.annotation.Annotation; import java.lang.reflect.Type; import java.util.Arrays; -import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Objects; @@ -115,14 +113,6 @@ public void validate(InjectionPoint injectionPoint) { throw new UnsupportedOperationException(); } - // Deprecated method which can be safely removed once we use CDI 4.0+ - @Deprecated - public void fireEvent(Object event, Annotation... qualifiers) { - Set eventQualifiers = new HashSet<>(); - Collections.addAll(eventQualifiers, qualifiers); - new EventImpl(event.getClass(), eventQualifiers).fire(event); - } - @Override public Set> resolveObserverMethods(T event, Annotation... qualifiers) { Type eventType = Types.getCanonicalType(event.getClass()); @@ -236,12 +226,6 @@ public AnnotatedType createAnnotatedType(Class type) { throw new UnsupportedOperationException(); } - // Deprecated method which can be safely removed once we use CDI 4.0+ - @Deprecated - public InjectionTarget createInjectionTarget(AnnotatedType type) { - throw new UnsupportedOperationException(); - } - @Override public InjectionTargetFactory getInjectionTargetFactory(AnnotatedType annotatedType) { throw new UnsupportedOperationException();