java.lang.Object
io.helidon.common.DeprecationSupport
Deprecation utility.
This is NOT part of any supported API. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisOverridden(Object obj, Class<?> declaringClass, String methodName, Class<?>... parameterTypes) Test if a method is overridden.static voidrequireOverride(Object obj, Class<?> declaringClass, String methodName, Class<?>... parameterTypes) Require a method override.
-
Method Details
-
isOverridden
public static boolean isOverridden(Object obj, Class<?> declaringClass, String methodName, Class<?>... parameterTypes) Test if a method is overridden.- Parameters:
obj- object whose class should override the methoddeclaringClass- class that declares the method to be overriddenmethodName- the name of the method to be overriddenparameterTypes- the parameter types of the method to be overridden- Returns:
trueif overridden,falseotherwise- Throws:
IllegalStateException- if the method is not found using reflection
-
requireOverride
public static void requireOverride(Object obj, Class<?> declaringClass, String methodName, Class<?>... parameterTypes) Require a method override.- Parameters:
obj- object whose class should override the methoddeclaringClass- class that declares the method to be overriddenmethodName- the name of the method to be overriddenparameterTypes- the parameter types of the method to be overridden- Throws:
UnsupportedOperationException- if the method is not overriddenIllegalStateException- if the method is not found using reflection
-