brikar-client/src/main/java/com/truward/brikar/client/rest/support/StandardRestServiceBinder.java
@Nonnull
  private MethodInvocationHandler getMethodInvocationHandler(@Nonnull Method method,
                                                             @Nonnull final Class<?> clazz,
                                                             @Nonnull String serviceBaseUrl) {
    // toString+hashCode+equals
    if (method.getName().equals("toString") && method.getParameterTypes().length == 0) {
      return (proxy, method1, args) -> clazz.getSimpleName();
    } else if (method.getName().equals("hashCode") && method.getParameterTypes().length == 0) {
      return new MethodInvocationHandler() {
        @Override
        public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
          return this.hashCode();
        }
      };
    } else if (method.getName().equals("equals") && method.getParameterTypes().length == 1 &&
        method.getParameterTypes()[0] == Object.class) {
      return (proxy, method12, args) -> proxy == args[0];
    }

    return createRequestMappingHandler(method, serviceBaseUrl);
  }
@Nonnull
  private MethodInvocationHandler getMethodInvocationHandler(@Nonnull Method method,
                                                             @Nonnull final Class<?> clazz,
                                                             @Nonnull String serviceBaseUrl) {
    // toString+hashCode+equals
    if (method.getName().equals("toString") && method.getParameterTypes().length == 0) {
      return (proxy, method1, args) -> clazz.getSimpleName();
    } else if (method.getName().equals("hashCode") && method.getParameterTypes().length == 0) {
      return new MethodInvocationHandler() {
        @Override
        public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
          return this.hashCode();
        }
      };
    } else if (method.getName().equals("equals") && method.getParameterTypes().length == 1 &&
        method.getParameterTypes()[0] == Object.class) {
      return (proxy, method12, args) -> proxy == args[0];
    }

    return createRequestMappingHandler(method, serviceBaseUrl);
  }
@ Nonnull private MethodInvocationHandler getMethodInvocationHandler ( @ Nonnull Method method , @ Nonnull final Class < ? > clazz , @ Nonnull String serviceBaseUrl ) { // toString+hashCode+equals if ( method . getName ( ) . equals ( "toString" ) && method . getParameterTypes ( ) . length == 0 ) { return ( proxy , method1 , args ) -> clazz . getSimpleName ( ) ; } else if ( method . getName ( ) . equals ( "hashCode" ) && method . getParameterTypes ( ) . length == 0 ) { return new MethodInvocationHandler ( ) { @ Override public Object invoke ( Object proxy , Method method , Object [ ] args ) throws Throwable { return this . hashCode ( ) ; } } ; } else if ( method . getName ( ) . equals ( "equals" ) && method . getParameterTypes ( ) . length == 1 && method . getParameterTypes ( ) [ 0 ] == Object . class ) { return ( proxy , method12 , args ) -> proxy == args [ 0 ] ; } return createRequestMappingHandler ( method , serviceBaseUrl ) ; }
/*
Creates an instance of an interface which is supposed to handle method calls in the proxy.
/ * Creates an instance of an interface which is supposed to handle method calls in the proxy .