This is an automated email from the ASF dual-hosted git repository.

jamesbognar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/juneau.git


The following commit(s) were added to refs/heads/master by this push:
     new d41bf4c3aa org.apache.juneau.common.reflect API improvements
d41bf4c3aa is described below

commit d41bf4c3aa14dc26ddd8925edfdb9094091be03e
Author: James Bognar <[email protected]>
AuthorDate: Wed Nov 19 10:44:29 2025 -0500

    org.apache.juneau.common.reflect API improvements
---
 .../org/apache/juneau/common/reflect/AnnotationProvider.java | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git 
a/juneau-core/juneau-common/src/main/java/org/apache/juneau/common/reflect/AnnotationProvider.java
 
b/juneau-core/juneau-common/src/main/java/org/apache/juneau/common/reflect/AnnotationProvider.java
index 509fc11ab0..2278a2a582 100644
--- 
a/juneau-core/juneau-common/src/main/java/org/apache/juneau/common/reflect/AnnotationProvider.java
+++ 
b/juneau-core/juneau-common/src/main/java/org/apache/juneau/common/reflect/AnnotationProvider.java
@@ -542,7 +542,9 @@ public class AnnotationProvider {
         * @param onClass The class to search on.
         * @return A list of {@link AnnotationInfo} objects representing 
annotations declared directly on the class.
         *      Never <jk>null</jk>.
+        * @deprecated Use {@link #find(ClassInfo, AnnotationTraversal...)} 
with {@link AnnotationTraversal#SELF SELF} instead.
         */
+       @Deprecated
        public List<AnnotationInfo<Annotation>> xfindDeclared(Class<?> onClass) 
{
                assertArgNotNull("onClass", onClass);
                return classDeclaredAnnotations.get(onClass);
@@ -559,7 +561,9 @@ public class AnnotationProvider {
         * @param onClass The class to search on.
         * @return A stream of {@link AnnotationInfo} objects representing 
annotations of the specified type declared
         *      directly on the class. Never <jk>null</jk>.
+        * @deprecated Use {@link #find(Class, ClassInfo, 
AnnotationTraversal...)} with {@link AnnotationTraversal#SELF SELF} instead.
         */
+       @Deprecated
        @SuppressWarnings("unchecked")
        public <A extends Annotation> Stream<AnnotationInfo<A>> 
xfindDeclared(Class<A> type, Class<?> onClass) {
                assertArgNotNull("type", type);
@@ -590,7 +594,9 @@ public class AnnotationProvider {
         *
         * @param onClass The class to search on.
         * @return A stream of {@link AnnotationInfo} objects in 
parent-to-child order.
+        * @deprecated Use {@link #findTopDown(ClassInfo, 
AnnotationTraversal...)} with {@link AnnotationTraversal#SELF SELF} instead.
         */
+       @Deprecated
        public Stream<AnnotationInfo<Annotation>> 
xfindDeclaredParentFirst(Class<?> onClass) {
                assertArgNotNull("onClass", onClass);
                var list = classDeclaredAnnotations.get(onClass);
@@ -608,7 +614,9 @@ public class AnnotationProvider {
         * @param type The annotation type to find.
         * @param onClass The class to search on.
         * @return A stream of {@link AnnotationInfo} objects in 
parent-to-child order.
+        * @deprecated Use {@link #findTopDown(Class, ClassInfo, 
AnnotationTraversal...)} with {@link AnnotationTraversal#SELF SELF} instead.
         */
+       @Deprecated
        @SuppressWarnings("unchecked")
        public <A extends Annotation> Stream<AnnotationInfo<A>> 
xfindDeclaredParentFirst(Class<A> type, Class<?> onClass) {
                assertArgNotNull("type", type);
@@ -886,7 +894,9 @@ public class AnnotationProvider {
         * @param mi The method info to traverse.
         * @param filter Optional filter to apply to annotations. Can be 
<jk>null</jk>.
         * @param action The action to perform on each matching annotation.
+        * @deprecated Use {@link #findTopDown(Class, MethodInfo, 
AnnotationTraversal...)} instead.
         */
+       @Deprecated
        public <A extends Annotation> void xforEachMethodAnnotation(Class<A> 
type, MethodInfo mi, Predicate<A> filter, Consumer<A> action) {
                xforEachClassAnnotation(type, mi.getDeclaringClass(), filter, 
action);
                rstream(mi.getMatchingMethods())
@@ -914,7 +924,9 @@ public class AnnotationProvider {
         * @param ci The class info to traverse.
         * @param filter Optional filter to apply to annotations. Can be 
<jk>null</jk>.
         * @param action The action to perform on each matching annotation.
+        * @deprecated Use {@link #findTopDown(Class, ClassInfo, 
AnnotationTraversal...)} instead.
         */
+       @Deprecated
        public <A extends Annotation> void xforEachClassAnnotation(Class<A> 
type, ClassInfo ci, Predicate<A> filter, Consumer<A> action) {
                A t2 = ci.getPackageAnnotation(type);
                if (nn(t2))

Reply via email to