Class AbstractProxyHandler

java.lang.Object
dev.orne.config.impl.AbstractProxyHandler
All Implemented Interfaces:
InvocationHandler
Direct Known Subclasses:
ConfigSubset, ConfigSubtype

@API(status=INTERNAL, since="1.0") public abstract class AbstractProxyHandler extends Object implements InvocationHandler
Abstract Config invocation handler with common utility methods.
Since:
1.1
Version:
1.0, 2026-04
Author:
(w) Iker Hernaez
  • Field Details

    • instance

      protected final Config instance
      The configuration instance.
  • Constructor Details

    • AbstractProxyHandler

      protected AbstractProxyHandler(Config instance)
      Creates a new instance.
      Parameters:
      instance - The configuration instance to be proxied.
  • Method Details

    • handleObjectMethod

      protected @Nullable Object handleObjectMethod(Method method, @Nullable Object[] args) throws ReflectiveOperationException
      Handles Object methods invocations.
      Parameters:
      method - The invoked method.
      args - The method arguments.
      Returns:
      The method invocation result.
      Throws:
      ReflectiveOperationException - If an error occurs during method invocation.
    • proxyEquals

      protected boolean proxyEquals(@Nullable Object other)
      Checks equality with another proxy instance.
      Parameters:
      other - The other proxy instance.
      Returns:
      true if both proxies are equal, false otherwise.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(@Nullable Object obj)
      Overrides:
      equals in class Object