From: Robert Varga Date: Wed, 2 Nov 2022 14:33:33 +0000 (+0100) Subject: Deprecate BindingReflections.findHierarchicalParent() X-Git-Tag: v11.0.0~86 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=c422bbd24a03f0f335151d0544a13f31b9467f50;p=mdsal.git Deprecate BindingReflections.findHierarchicalParent() These methods are not used, deprecate them for removal. Change-Id: Idee358f004fb36fb01a3c5222430a808dd68bbfd Signed-off-by: Robert Varga --- diff --git a/binding/mdsal-binding-spec-util/src/main/java/org/opendaylight/mdsal/binding/spec/reflect/BindingReflections.java b/binding/mdsal-binding-spec-util/src/main/java/org/opendaylight/mdsal/binding/spec/reflect/BindingReflections.java index 95a5d9a86b..f4f218a464 100644 --- a/binding/mdsal-binding-spec-util/src/main/java/org/opendaylight/mdsal/binding/spec/reflect/BindingReflections.java +++ b/binding/mdsal-binding-spec-util/src/main/java/org/opendaylight/mdsal/binding/spec/reflect/BindingReflections.java @@ -106,10 +106,11 @@ public final class BindingReflections { * Find data hierarchy parent from concrete Data class. This method uses first generic argument of implemented * {@link ChildOf} interface. * - * @param childClass - * child class for which we want to find the parent class. + * @param childClass child class for which we want to find the parent class. * @return Parent class, e.g. class of which the childClass is ChildOf. + * @deprecated This method is unused and scheduled for removal */ + @Deprecated(since = "10.0.3", forRemoval = true) public static Class findHierarchicalParent(final Class> childClass) { return ClassLoaderUtils.findFirstGenericArgument(childClass, ChildOf.class).orElse(null); } @@ -118,10 +119,11 @@ public final class BindingReflections { * Find data hierarchy parent from concrete Data class. This method is shorthand which gets DataObject class by * invoking {@link DataObject#implementedInterface()} and uses {@link #findHierarchicalParent(Class)}. * - * @param child - * Child object for which the parent needs to be located. + * @param child Child object for which the parent needs to be located. * @return Parent class, or null if a parent is not found. + * @deprecated This method is unused and scheduled for removal */ + @Deprecated(since = "10.0.3", forRemoval = true) public static Class findHierarchicalParent(final DataObject child) { if (child instanceof ChildOf) { return ClassLoaderUtils.findFirstGenericArgument(child.implementedInterface(), ChildOf.class).orElse(null);