Class DeprecationSupport

java.lang.Object
io.helidon.common.DeprecationSupport

public final class DeprecationSupport extends Object
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 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 method
      declaringClass - class that declares the method to be overridden
      methodName - the name of the method to be overridden
      parameterTypes - the parameter types of the method to be overridden
      Returns:
      true if overridden, false otherwise
      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 method
      declaringClass - class that declares the method to be overridden
      methodName - the name of the method to be overridden
      parameterTypes - the parameter types of the method to be overridden
      Throws:
      UnsupportedOperationException - if the method is not overridden
      IllegalStateException - if the method is not found using reflection