private int getMaxRemoteMethodId( Class<?> serviceInterface )
    {
        int methodMax = 0;

        for (Method method : serviceInterface.getMethods())
        {
            RemoteMethod remoteMethod = method.getAnnotation( RemoteMethod.class );

            if (remoteMethod != null)
            {
                methodMax = Math.max( methodMax, remoteMethod.id() );
            }
        }

        return methodMax;
    }