Class NullInvoker

java.lang.Object
org.aoju.bus.proxy.invoker.NullInvoker
All Implemented Interfaces:
Invoker

public class NullInvoker extends Object implements Invoker
一个仅为所有方法调用返回null的Invoker实现 这个类对于需要“空对象”设计模式的场景非常有用
Since:
Java 17+
Author:
Kimi Liu
  • Constructor Details

    • NullInvoker

      public NullInvoker()
  • Method Details

    • invoke

      public Object invoke(Object proxy, Method method, Object[] args)
      Description copied from interface: Invoker
      调用方法 如果在尝试调用方法时出现问题,实现应该抛出异常
      Specified by:
      invoke in interface Invoker
      Parameters:
      proxy - 代理对象
      method - 被调用的方法
      args - 参数
      Returns:
      返回值