static int IndexOf(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2)
            {
                Spine.ExposedList <Spine.Animation> obj = (Spine.ExposedList <Spine.Animation>)ToLua.CheckObject <Spine.ExposedList <Spine.Animation> >(L, 1);
                Spine.Animation arg0 = (Spine.Animation)ToLua.CheckObject <Spine.Animation>(L, 2);
                int             o    = obj.IndexOf(arg0);
                LuaDLL.lua_pushinteger(L, o);
                return(1);
            }
            else if (count == 3)
            {
                Spine.ExposedList <Spine.Animation> obj = (Spine.ExposedList <Spine.Animation>)ToLua.CheckObject <Spine.ExposedList <Spine.Animation> >(L, 1);
                Spine.Animation arg0 = (Spine.Animation)ToLua.CheckObject <Spine.Animation>(L, 2);
                int             arg1 = (int)LuaDLL.luaL_checknumber(L, 3);
                int             o    = obj.IndexOf(arg0, arg1);
                LuaDLL.lua_pushinteger(L, o);
                return(1);
            }
            else if (count == 4)
            {
                Spine.ExposedList <Spine.Animation> obj = (Spine.ExposedList <Spine.Animation>)ToLua.CheckObject <Spine.ExposedList <Spine.Animation> >(L, 1);
                Spine.Animation arg0 = (Spine.Animation)ToLua.CheckObject <Spine.Animation>(L, 2);
                int             arg1 = (int)LuaDLL.luaL_checknumber(L, 3);
                int             arg2 = (int)LuaDLL.luaL_checknumber(L, 4);
                int             o    = obj.IndexOf(arg0, arg1, arg2);
                LuaDLL.lua_pushinteger(L, o);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: Spine.ExposedList<Spine.Animation>.IndexOf"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }